Files
6aeda0ddf6 feat: add Playwright setup and login flow test (#13578)
## Description

Adds Playwright E2E testing infrastructure with project configuration
and a login flow test. This is
Phase 1 of the Playwright E2E suite, kept minimal with only the core
setup and login component.

  Ref: Discussion #13500, PR #13067

## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Verified all imports resolve correctly
(`login-flow-ui-validation.spec.ts` only imports `Login` from
  `@components/ui`)
  - Ran login flow test locally against a running Chatwoot instance


## Checklist:

  - [x] My code follows the style guidelines of this project
  - [x] I have performed a self-review of my code
  - [x] I have made corresponding changes to the documentation
  - [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works

---------

Co-authored-by: Sony Mathew <sony@chatwoot.com>
Co-authored-by: Sony Mathew <2040199+sony-mathew@users.noreply.github.com>
2026-04-28 18:21:05 +05:30

60 lines
1.2 KiB
Markdown

# Chatwoot E2E Testing
End-to-end testing framework for Chatwoot using Component Object Model pattern.
## Setup
```bash
# Install dependencies
pnpm install
# Install Playwright browsers
npx playwright install
# Configure environment
cp .env.example .env
```
Edit `.env` with your Chatwoot instance URL and credentials.
## Usage
```bash
# Run all tests
pnpm run playwright:run
# Run tests in UI mode
pnpm run playwright:open
# Lint tests and page objects
pnpm run lint
# Generate test code
pnpm run playwright:codegen
```
## Project Structure
```
tests/playwright/
├── components/
│ ├── api/ # API interaction components
│ └── ui/ # UI page objects
├── tests/
│ └── e2e/
│ ├── api/ # Pure API tests
│ └── ui/ # UI tests
├── utils/ # Shared utilities and helpers
├── response-schemas/ # API response schemas for validation
├── fixtures/ # Test fixtures
└── helpers/ # Helper functions
```
## Documentation
See [DOCS.md](./DOCS.md) for complete testing guide including patterns, conventions, and troubleshooting.
## Configuration
See `.env.example` for the full list of variables.