From 2a1dd481e9c4d385193392ef194e81e46f524890 Mon Sep 17 00:00:00 2001 From: Ajith KV Date: Thu, 23 Jul 2026 23:24:03 +0530 Subject: [PATCH] test(playwright): add agent onboarding and inbox creation UI tests (#14707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds E2E UI tests for two core Phase 2 flows, building on the Playwright setup from #13578. **Agent onboarding** — validates the Agents settings page, Add Agent modal elements, form validation (name + email required, submit disabled until valid), and cancel behaviour. **Inbox creation** — walks through the full API channel inbox creation journey: channel selection → form fill → agent assignment → finish screen. ## What changed New UI component objects (`tests/playwright/components/ui/`): - `agent-page.component.ts` - `add-agent-modal.component.ts` - `add-agents-form.component.ts` - `settings-inbox-page.component.ts` - `channel-selector.component.ts` - `api-channel-form.component.ts` - `finish-setup.component.ts` New test specs (`tests/playwright/tests/e2e/ui/`): - `agent-onboarding-flow-ui-validation.spec.ts` - `inbox-creation-flow.spec.ts` Updated `components/ui/index.ts` barrel export to include all new components. ## How to test ```bash cd tests/playwright npx playwright test tests/e2e/ui/ ``` All 5 tests pass locally (3 login + 2 new flows). Closes part of the Phase 2 scope from the [Playwright E2E discussion #13500](https://github.com/orgs/chatwoot/discussions/13500). --------- Co-authored-by: Sony Mathew Co-authored-by: Sony Mathew <2040199+sony-mathew@users.noreply.github.com> --- .../dashboard/settings/inbox/AddAgents.vue | 1 + .../ui/add-agent-modal.component.ts | 61 +++++++++++ .../ui/add-agents-form.component.ts | 73 +++++++++++++ .../components/ui/agent-page.component.ts | 35 ++++++ .../ui/api-channel-form.component.ts | 41 +++++++ .../ui/channel-selector.component.ts | 25 +++++ .../components/ui/finish-setup.component.ts | 32 ++++++ tests/playwright/components/ui/index.ts | 7 ++ .../ui/settings-inbox-page.component.ts | 57 ++++++++++ ...gent-onboarding-flow-ui-validation.spec.ts | 60 ++++++++++ .../tests/e2e/ui/inbox-creation-flow.spec.ts | 103 ++++++++++++++++++ 11 files changed, 495 insertions(+) create mode 100644 tests/playwright/components/ui/add-agent-modal.component.ts create mode 100644 tests/playwright/components/ui/add-agents-form.component.ts create mode 100644 tests/playwright/components/ui/agent-page.component.ts create mode 100644 tests/playwright/components/ui/api-channel-form.component.ts create mode 100644 tests/playwright/components/ui/channel-selector.component.ts create mode 100644 tests/playwright/components/ui/finish-setup.component.ts create mode 100644 tests/playwright/components/ui/settings-inbox-page.component.ts create mode 100644 tests/playwright/tests/e2e/ui/agent-onboarding-flow-ui-validation.spec.ts create mode 100644 tests/playwright/tests/e2e/ui/inbox-creation-flow.spec.ts diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/AddAgents.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/AddAgents.vue index 8be54e19b..47ff4c221 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/AddAgents.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/AddAgents.vue @@ -103,6 +103,7 @@ export default {