# E2E Test Selector Audit

> **Status**: 200+ `data-testid` selectors referenced by tests. **3 exist** in production code.
>
> This file is the actionable backlog for frontend developers. Add the `data-testid`
> attributes listed below to enable the corresponding E2E tests.

---

## Existing `data-testid` in Production Code

| Value | File | Line(s) |
|-------|------|---------|
| `mobile-menu-toggle` | `components/layout/TopBar.tsx` | 119 |
| `formula-editor` | `components/formula/FormulaEditor.tsx` | 165 |
| `field-mapping-builder` | `features/flows/components/FieldMappingBuilder.tsx` | 71, 79, 88, 96 |

**None of the above are referenced by any E2E test.** There is zero overlap between
what exists in the frontend and what the tests need.

---

## Priority Order for Adding Selectors

Recommended order based on test criticality and blast radius:

1. **Login & Auth** — unblocks `auth.spec.ts` (24 tests) and `smoke.spec.ts` (7 tests)
2. **Navigation** — unblocks `navigation.spec.ts` (18 tests)
3. **Record List Tables** — unblocks list views in all CRUD specs (~40 tests)
4. **Record Forms & Modals** — unblocks create/edit/delete in all CRUD specs (~60 tests)
5. **Notifications** — unblocks save/delete success assertions (~30 tests)
6. **Setup / Object Manager** — unblocks `object-manager.spec.ts`, `object-fields.spec.ts` (~38 tests)
7. **Dashboards** — unblocks dashboard specs (~48 tests)
8. **Reports** — unblocks `reports.spec.ts` (22 tests)
9. **Search** — unblocks `search.spec.ts` (16 tests)
10. **Flows & Approvals** — unblocks flows/approvals specs (~64 tests)

---

## Selectors by Component Area

### 1. Login & Auth (`LoginScreen.tsx` and related)

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `login-form` | Login form container | auth, smoke |
| `email-input` | Email/username input | auth, setup-landing, object-creation |
| `password-input` | Password input | auth, setup-landing |
| `login-button` | Submit button | auth, setup-landing |
| `app-logo` | Logo image/container | auth |
| `login-title` | Login heading | auth |
| `error-message` | Error alert | auth |
| `email-error` | Email field error | auth |
| `remember-me` | Remember me checkbox | auth |
| `forgot-password-link` | Forgot password link | auth |
| `help-link` | Help/support link | auth |
| `password-visibility-toggle` | Show/hide password | auth |

### 2. Navigation (`TopBar.tsx`, `Sidebar.tsx`, `Layout.tsx`)

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `nav-dashboard` | Dashboard nav item | navigation |
| `nav-accounts` | Accounts nav item | navigation |
| `nav-contacts` | Contacts nav item | navigation |
| `nav-opportunities` | Opportunities nav item | navigation |
| `nav-reports` | Reports nav item | navigation |
| `user-menu` | User avatar/menu trigger | auth, navigation |
| `user-menu-dropdown` | User menu dropdown | navigation |
| `user-menu-logout` | Logout button | auth (via selectors.ts) |
| `user-profile-link` | Profile link in menu | navigation |
| `user-settings-link` | Settings link in menu | navigation |
| `hamburger-menu` | Mobile hamburger | navigation |
| `mobile-menu` | Mobile nav drawer | navigation |
| `breadcrumbs` | Breadcrumb container | navigation |
| `breadcrumb-home` | Home breadcrumb | navigation |
| `breadcrumb-accounts` | Accounts breadcrumb | navigation |

### 3. Record List Tables (`PowerList.tsx`, `ObjectView.tsx`)

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `accounts-table` | Accounts list table | accounts-crud, navigation, search |
| `contacts-table` | Contacts list table | contacts-crud, navigation |
| `opportunities-table` | Opportunities list table | opportunities-crud, navigation |
| `table-row-{n}` (prefix) | Table rows | accounts/contacts/opportunities-crud, navigation |
| `row-view` | Row view action | accounts-crud |
| `row-edit` | Row edit action | accounts/contacts/opportunities-crud |
| `row-delete` | Row delete action | accounts/contacts/opportunities-crud |
| `cell-name` | Name cell | accounts/contacts/opportunities-crud |
| `cell-industry` | Industry cell | accounts-crud |
| `cell-email` | Email cell | contacts-crud |
| `cell-stage` (prefix) | Stage cells | opportunities-crud |
| `cell-amount` (prefix) | Amount cells | opportunities-crud |
| `table-pagination` | Pagination container | accounts-crud |
| `search-input` | List search input | accounts/contacts/opportunities-crud, reports, dashboard-list, flows, approvals, approval-queue |
| `new-button` | New record button | accounts/contacts/opportunities-crud |
| `select-all` | Select all checkbox | accounts-crud |
| `bulk-actions` | Bulk action bar | accounts/contacts-crud, approval-queue |
| `bulk-delete` | Bulk delete button | accounts/contacts-crud |
| `import-button` | Import button | accounts-crud |
| `export-button` | Export button | accounts-crud |

### 4. Record Forms (Create/Edit modal or page)

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `account-form` | Account form container | accounts-crud, setup-landing |
| `contact-form` | Contact form container | contacts-crud, setup-landing |
| `opportunity-form` | Opportunity form container | opportunities-crud |
| `record-form` | Generic record form | object-creation |
| `form-title` | Form heading | accounts-crud |
| `name-input` | Name field | accounts/opportunities-crud |
| `industry-input` | Industry field | accounts-crud |
| `website-input` | Website field | accounts-crud |
| `phone-input` | Phone field | accounts-crud, object-creation |
| `billing-address-input` | Billing address | accounts-crud |
| `description-input` | Description field | accounts-crud |
| `first-name-input` | First name | contacts-crud |
| `last-name-input` | Last name | contacts-crud |
| `amount-input` | Amount field | opportunities-crud |
| `stage-select` | Stage dropdown | opportunities-crud |
| `close-date-input` | Close date | opportunities-crud |
| `account-select` | Account lookup | contacts/opportunities-crud |
| `contact-select` | Contact lookup | opportunities-crud |
| `account-filter` | Account filter dropdown | contacts-crud |
| `stage-filter` | Stage filter | opportunities-crud |
| `date-filter` | Date filter | opportunities-crud |
| `name-error` | Name validation error | accounts-crud, opportunities-crud, object-manager, object-fields, reports, dashboard-creation |
| `amount-error` | Amount validation error | opportunities-crud |
| `first-name-error` | First name error | contacts-crud |
| `last-name-error` | Last name error | contacts-crud |
| `email-error` | Email validation error | contacts-crud |

### 5. Record Detail Views

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `account-detail` | Account detail container | accounts-crud |
| `contact-detail` | Contact detail container | contacts-crud |
| `record-detail` | Generic record detail | smoke |
| `related-account` | Related account section | contacts-crud |
| `activities-timeline` | Activities timeline | contacts-crud |
| `add-activity-button` | Add activity button | contacts-crud |
| `activity-note-input` | Activity note input | contacts-crud |
| `save-activity-button` | Save activity button | contacts-crud |

### 6. Modals & Notifications (via `selectors.ts`)

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `modal` | Modal container | approvals, all CRUD delete flows |
| `modal-confirm` | Confirm button | all CRUD deletes, object-manager, object-fields |
| `modal-cancel` | Cancel button | all CRUD deletes |
| `confirm-delete-modal` | Delete confirmation | accounts-crud, object-manager |
| `toast-success` | Success notification | all CRUD specs (via `notifications.toastSuccess`) |
| `submit-button` | Form submit (via `forms.submitButton`) | all CRUD specs |
| `cancel-button` | Form cancel (via `forms.cancelButton`) | all CRUD specs |

### 7. Object Manager (`Setup.tsx` → Object Manager section)

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `objects-table` | Objects list | object-manager |
| `custom-objects-section` | Custom objects section | object-manager |
| `custom-object-row` (prefix) | Custom object rows | object-manager, object-creation, object-fields |
| `standard-object-row` (prefix) | Standard object rows | object-manager |
| `new-object-button` | Create object | object-manager |
| `create-object-modal` | Create dialog | object-manager |
| `object-name-input` | Object API name | object-manager |
| `object-label-input` | Object label | object-manager |
| `object-description-input` | Description | object-manager |
| `object-icon-select` | Icon picker | object-manager |
| `edit-object-button` | Edit object | object-manager |
| `edit-object-modal` | Edit dialog | object-manager |
| `delete-object-button` | Delete object | object-manager |
| `view-records-button` | View records link | object-manager |
| `manage-fields-button` | Manage fields link | object-manager, object-fields |
| `fields-manager` | Fields manager container | object-manager |
| `object-settings-panel` | Settings panel | object-manager |
| `enable-features-toggle` | Feature toggle | object-manager |
| `permissions-tab` | Permissions tab | object-manager |
| `permissions-panel` | Permissions content | object-manager |

### 8. Field Manager

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `fields-table` | Fields list | object-fields |
| `field-name` (prefix) | Field name cells | object-fields |
| `field-type` (prefix) | Field type cells | object-fields |
| `standard-fields-section` | Standard fields | object-fields |
| `custom-fields-section` | Custom fields | object-fields |
| `new-field-button` | Create field | object-fields |
| `create-field-modal` | Create field dialog | object-fields |
| `field-name-input` | Field API name | object-fields |
| `field-label-input` | Field label | object-fields |
| `field-type-select` | Field type dropdown | object-fields |
| `field-required-checkbox` | Required toggle | object-fields |
| `field-help-input` | Help text | object-fields |
| `field-default-input` | Default value | object-fields |
| `edit-field-button` | Edit field | object-fields |
| `edit-field-modal` | Edit dialog | object-fields |
| `delete-field-button` | Delete field | object-fields |
| `custom-field-row` (prefix) | Custom field rows | object-fields |
| `standard-field-row` (prefix) | Standard field rows | object-fields |
| `reorder-fields-button` | Reorder mode | object-fields |
| `drag-handle` | Drag handle | object-fields |
| `field-visibility-toggle` (prefix) | Visibility toggle | object-fields |

### 9. Custom Object Record Creation

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `new-record-button` | New record | object-creation |
| `records-table` | Records list | object-creation |
| `text-input` | Text field | object-creation |
| `number-input` | Number field | object-creation |
| `date-input` | Date field | object-creation |
| `select-input` | Select field | object-creation |
| `checkbox-input` | Checkbox field | object-creation |
| `multi-select-input` | Multi-select | object-creation |
| `textarea-input` | Textarea field | object-creation |
| `url-input` | URL field | object-creation |
| `currency-input` | Currency field | object-creation |
| `percent-input` | Percent field | object-creation |
| `character-count` | Char counter | object-creation |

### 10. Dashboards

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `dashboards-container` | Dashboard library | dashboard-list, dashboard-creation |
| `dashboard-card` (prefix) | Dashboard cards | dashboard-list, dashboard-view |
| `dashboard-view` | Dashboard viewer | dashboard-view, dashboard-list |
| `dashboard-title` | Title display | dashboard-view |
| `dashboard-container` | Dashboard page container | setup-landing |
| `dashboard-widget` (prefix) | Widgets | dashboard-view |
| `chart-widget` (prefix) | Chart widgets | dashboard-view, dashboard-creation |
| `table-widget` (prefix) | Table widgets | dashboard-view, dashboard-creation |
| `metric-widget` (prefix) | Metric widgets | dashboard-view, dashboard-creation |
| `widget-title` (prefix) | Widget titles | dashboard-view |
| `widget-expand` (prefix) | Expand buttons | dashboard-view |
| `expanded-widget` | Expanded widget | dashboard-view |
| `widget-refresh` (prefix) | Refresh buttons | dashboard-view |
| `widget-content` (prefix) | Widget content | dashboard-view |
| `widget-menu` (prefix) | Widget menus | dashboard-view |
| `widget-context-menu` | Context menu | dashboard-view |
| `widget-config-modal` | Config modal | dashboard-view |
| `widget-config-panel` | Config panel | dashboard-creation |
| `widget-library` | Widget library | dashboard-creation |
| `new-dashboard-button` | Create dashboard | dashboard-creation |
| `create-dashboard-modal` | Create dialog | dashboard-creation |
| `dashboard-name-input` | Name input | dashboard-creation |
| `dashboard-description-input` | Description | dashboard-creation |
| `edit-dashboard-button` | Edit button | dashboard-creation |
| `save-dashboard-button` | Save button | dashboard-creation |
| `dashboard-title-edit` | Editable title | dashboard-creation |
| `dashboard-description-edit` | Editable description | dashboard-creation |
| `edit-mode-indicator` | Edit mode badge | dashboard-creation |
| `cancel-edit-button` | Cancel edit | dashboard-creation |
| `add-widget-button` | Add widget | dashboard-creation |
| `chart-widget-option` | Chart option | dashboard-creation |
| `table-widget-option` | Table option | dashboard-creation |
| `metric-widget-option` | Metric option | dashboard-creation |
| `blank-dashboard-option` | Blank template | dashboard-creation |
| `dashboard-template` (prefix) | Template cards | dashboard-creation |
| `visibility-select` | Visibility dropdown | dashboard-creation |
| `delete-action` | Delete action | dashboard-creation |
| `shared-warning` | Shared warning | dashboard-creation |
| `dashboard-filter` | Filter dropdown | dashboard-list |
| `dashboard-menu-button` | Menu button | dashboard-list |
| `context-menu` | Context menu | dashboard-list |
| `duplicate-action` | Duplicate action | dashboard-list |
| `share-action` | Share action | dashboard-list |
| `dashboard-thumbnail` (prefix) | Thumbnails | dashboard-list |
| `dashboard-name` (prefix) | Name labels | dashboard-list |
| `dashboard-favorite` (prefix) | Favorite toggles | dashboard-list |
| `view-toggle` | Grid/list toggle | dashboard-list |
| `owner-filter` | Owner filter | dashboard-list |
| `favorites-filter` | Favorites filter | dashboard-list |
| `sort-dropdown` | Sort dropdown | dashboard-list |
| `sort-name-asc` | Sort by name | dashboard-list |
| `sort-created-desc` | Sort by created | dashboard-list |
| `sort-modified-desc` | Sort by modified | dashboard-list |
| `pagination` | Pagination | dashboard-list |
| `next-page` | Next page | dashboard-list |
| `dashboard-filters` | Filter panel | dashboard-view |
| `date-range-filter` | Date range | dashboard-view |
| `this-month` | "This month" option | dashboard-view |
| `filter-applied-indicator` | Filter indicator | dashboard-view |
| `clear-filters-button` | Clear filters | dashboard-view |

### 11. Reports

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `reports-container` | Reports page | reports |
| `report-folder` (prefix) | Folders | reports |
| `report-item` (prefix) | Report items | reports |
| `report-type` (prefix) | Type indicators | reports |
| `report-type-filter` | Type filter | reports |
| `new-report-button` | Create report | reports |
| `report-builder` | Builder container | reports |
| `report-type-option` (prefix) | Type options | reports |
| `report-object-select` | Object selector | reports |
| `available-column` (prefix) | Available columns | reports |
| `selected-column` (prefix) | Selected columns | reports |
| `add-filter-button` | Add filter | reports |
| `filter-row` (prefix) | Filter rows | reports |
| `filter-field` (prefix) | Filter fields | reports |
| `filter-operator` (prefix) | Operators | reports |
| `filter-value` (prefix) | Values | reports |
| `group-by-select` | Group by | reports |
| `sort-by-select` | Sort by | reports |
| `sort-order-select` | Sort order | reports |
| `preview-report-button` | Preview | reports |
| `report-preview` | Preview container | reports |
| `report-name-input` | Report name | reports |
| `save-report-button` | Save report | reports |
| `report-results` | Results container | reports |
| `report-table` | Results table | reports |
| `report-chart` (prefix) | Charts | reports |
| `export-report-button` | Export | reports |
| `export-options` | Export menu | reports |
| `export-pdf-option` | PDF export | reports |
| `export-csv-option` | CSV export | reports |
| `export-excel-option` | Excel export | reports |
| `edit-report-button` | Edit report | reports |
| `delete-report-button` | Delete report | reports |
| `menu-button` | Report menu | reports |
| `clone-action` | Clone report | reports |
| `subscribe-button` | Subscribe | reports |
| `schedule-button` | Schedule | reports |
| `schedule-modal` | Schedule dialog | reports |
| `new-folder-button` | Create folder | reports |
| `folder-name-input` | Folder name | reports |
| `move-action` | Move report | reports |
| `folder-option` (prefix) | Folder options | reports |

### 12. Search

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `global-search-input` | Global search | search |
| `search-results-dropdown` | Results dropdown | search |
| `search-accounts-section` | Accounts results | search |
| `search-result-` (prefix) | Result items | search |
| `no-results-message` | No results | search |
| `recent-searches` | Recent searches | search |
| `clear-recent-searches` | Clear recents | search |
| `advanced-search-button` | Advanced search | search |
| `advanced-search-modal` | Advanced dialog | search |
| `industry-filter` | Industry filter | search |
| `apply-filters-button` | Apply filters | search |
| `save-search-button` | Save search | search |
| `save-search-modal` | Save dialog | search |
| `saved-searches-button` | Load saved | search |
| `saved-searches-dropdown` | Saved dropdown | search |

### 13. Flows

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `status-filter` | Status filter | flows |
| `flow-builder-canvas` | Builder canvas | flows |
| `flow-toolbox` | Element toolbox | flows |
| `flow-name-input` | Flow name | flows |
| `flow-description-input` | Description | flows |
| `element-start` | Start element | flows |
| `trigger-config` | Trigger config | flows |
| `trigger-type` | Trigger type | flows |
| `connection-point` | Connection point | flows |
| `save-flow` | Save button | flows |
| `flow-palette` | Element palette | flows |
| `properties-panel` | Properties panel | flows |
| `flow-toolbar` | Toolbar | flows |

### 14. Approvals

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `approval-wizard` | Approval wizard | approvals |
| `process-name-input` | Process name | approvals |
| `process-label-input` | Process label | approvals |
| `object-select` | Object selector | approvals |
| `criteria-panel` | Criteria panel | approvals |
| `criteria-field` | Criteria field | approvals |
| `approval-steps` | Steps section | approvals |
| `approver-input` | Approver input | approvals |
| `approval-order` | Approval order | approvals |
| `rejection-actions` | Rejection actions | approvals |
| `approval-actions` | Approval actions | approvals |
| `approval-item` (prefix) | Queue items | approval-queue |
| `empty-state` | Empty state | approval-queue, setup-landing, dashboard-list |
| `assignee-select` | Reassign select | approval-queue |
| `refresh-button` | Refresh | approval-queue, object-manager, object-fields |

### 15. Opportunity Pipeline

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `pipeline-view-button` | Toggle kanban | opportunities-crud |
| `pipeline-board` | Kanban board | opportunities-crud |
| `opportunity-card` (prefix) | Kanban cards | opportunities-crud |
| `stage-column` (prefix) | Stage columns | opportunities-crud |
| `pipeline-total` | Pipeline total | opportunities-crud |
| `weighted-pipeline` | Weighted pipeline | opportunities-crud |
| `stage-breakdown` | Stage breakdown | opportunities-crud |
| `pipeline-overview` | Pipeline overview | setup-landing |

### 16. Setup / Landing

| `data-testid` | Element | Spec file(s) |
|---|---|---|
| `setup-wizard` | Setup wizard | setup-landing |
| `setup-next-button` | Next step | setup-landing |
| `setup-skip-button` | Skip setup | setup-landing |
| `welcome-message` | Welcome message | setup-landing |
| `metrics-accounts` | Accounts metric | setup-landing |
| `metrics-contacts` | Contacts metric | setup-landing |
| `metrics-opportunities` | Opportunities metric | setup-landing |
| `recent-activity` | Recent activity | setup-landing |
| `quick-actions` | Quick actions | setup-landing |
| `quick-create-account` | Create account shortcut | setup-landing |
| `quick-create-contact` | Create contact shortcut | setup-landing |
| `onboarding-tips` | Onboarding tips | setup-landing |
| `dismiss-tip-button` | Dismiss tip | setup-landing |
| `empty-state-cta` | Empty state CTA | setup-landing, dashboard-list |
| `empty-state-create` | Empty state create | setup-landing |
