Skip to content

test(web): add UI tests for chat, contacts, companies, deals, and settings#15

Open
Baba-2001 wants to merge 3 commits intomainfrom
ui-tests
Open

test(web): add UI tests for chat, contacts, companies, deals, and settings#15
Baba-2001 wants to merge 3 commits intomainfrom
ui-tests

Conversation

@Baba-2001
Copy link
Contributor

@Baba-2001 Baba-2001 commented Mar 3, 2026

Summary

Adds Vitest-based UI tests for the web app: contacts, chat, companies, deals, and settings. Includes Vitest setup and lint fixes across the test files.

What's included

Setup

  • Vitest config and test setup (vitest.config.ts, __tests__/setup.ts)
  • Jest-DOM matchers for assertions

Contacts (contacts.test.tsx)

  • ContactForm: Fields, create vs edit, validation, submit & redirect, cancel, errors, loading state
  • ContactsList: Heading, search, New Contact, empty state, table, row click → detail, loading, pagination
  • ContactDetail: Loading, not found, content, Edit, Hide (confirm/cancel)
  • EmptyContactsList: Message and New Contact link

Chat (chat.test.tsx)

  • ChatInput: Render, send, mentions
  • NewChatPage: Flow and behaviour

Companies (companies.test.tsx — 29 tests)

  • CompanyForm: All fields, create vs edit, validation (required name, website URL), submit & redirect, cancel, errors, loading
  • CompaniesList: Heading, search, New Company, empty state, table, row click → detail, loading, pagination
  • CompanyDetail: Loading, not found, content, Edit, Hide (confirm/cancel)
  • EmptyCompaniesList: Message and New Company link

Deals (deals.test.tsx — 28 tests)

  • DealForm: Key fields, create vs edit, validation (title, value), submit & redirect, cancel, errors, loading
  • DealsList: Heading, search, New Deal, empty state, table, row click → detail, loading, pagination
  • DealDetail: Loading, not found, content, Edit, Hide (confirm/cancel)
  • EmptyDealsList: Message and New Deal link

Settings (settings.test.tsx — 15 tests)

  • SettingsPage: Heading, Integrations & Connections, GitHub App, GitHub, Google Calendar, Connected/Not connected
  • ConnectGitHub: Loading skeleton, Connected state, Connect button, linkSocial, Connecting… state
  • InstallGitHubApp: Loading skeleton, Installed vs not installed, Install/Re-install, redirect on Install

Contacts:
- ContactForm: create, edit, validation (name, contact method, phone),
  submit success/failure, loading state, cancel navigation
- ContactsList: list, empty state, search, loading, pagination,
  phone-only contact, multi-owner badge, row click navigation
- ContactDetail: loading, not found, view details, edit, hide (with confirm)
- EmptyContactsList: empty state and New Contact link

Chat:
- ChatInput: placeholder, submit, empty/whitespace, Shift+Enter,
  clear on success / keep on reject, status=streaming (Stop), initialContext
- Mentions: contact/company suggestions, submit with contextEntities,
  filter by search
- NewChatPage: create chat via fetch, redirect, localStorage firstMessage,
  failure handling, disabled while submitting

Made-with: Cursor
@Baba-2001 Baba-2001 changed the title test(web): add UI tests for companies, deals, and settings test(web): add UI tests for chat, contacts, companies, deals, and settings Mar 3, 2026
- companies.test.tsx: CompanyForm, CompaniesList, CompanyDetail, EmptyCompaniesList
- deals.test.tsx: DealForm, DealsList, DealDetail, EmptyDealsList
- settings.test.tsx: SettingsPage, ConnectGitHub, InstallGitHubApp
- Covers forms, lists, detail views, validation, navigation, and API mocks

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant