Files
myeasycms-v2/apps/e2e/AGENTS.md
Giancarlo Buomprisco cfa137795b refactor: consolidate AGENTS.md and CLAUDE.md files, update tech stac… (#444)
* refactor: consolidate AGENTS.md and CLAUDE.md files, update tech stack and architecture details

- Merged content from CLAUDE.md into AGENTS.md for better organization.
- Updated tech stack section to reflect the current technologies used, including Next.js, Supabase, and Tailwind CSS.
- Enhanced monorepo structure documentation with detailed directory purposes.
- Streamlined multi-tenant architecture explanation and essential commands.
- Added key patterns for naming conventions and server actions.
- Removed outdated agent files related to Playwright and PostgreSQL, ensuring a cleaner codebase.
- Bumped version to 2.23.7 to reflect changes.
2026-01-18 10:44:40 +01:00

1.2 KiB

End-to-End Testing

Skills

For E2E test implementation:

  • /playwright-e2e - Test patterns and Page Objects

Running Tests

# Single file (preferred)
pnpm --filter web-e2e exec playwright test <name> --workers=1

# All tests
pnpm test

Page Object Pattern (Required)

export class AuthPageObject {
  constructor(private readonly page: Page) {}

  async signIn(params: { email: string; password: string }) {
    await this.page.fill('input[name="email"]', params.email);
    await this.page.fill('input[name="password"]', params.password);
    await this.page.click('button[type="submit"]');
  }
}

Selectors

Always use data-test attributes:

await this.page.click('[data-test="submit-button"]');
await this.page.getByTestId('submit-button').click();

Reliability with toPass()

await expect(async () => {
  const response = await this.page.waitForResponse(
    resp => resp.url().includes('auth/v1/user')
  );
  expect(response.status()).toBe(200);
}).toPass();

Test Organization

tests/
├── authentication/
├── billing/
├── *.po.ts          # Page Objects
└── utils/