Skip to main content

e2e

Purpose and Production Relevance

e2e is a Playwright browser test suite for validating Crimoo workflows from the outside. It contains tests, page objects, fixtures, docs, reports, screenshots, and videos.

Production relevance: test suite.

Stack and Main Dependencies

  • Playwright.
  • TypeScript.
  • Node.js.

Important files and folders:

  • e2e/tests
  • e2e/pages
  • e2e/fixtures
  • e2e/docs
  • e2e/playwright.config.ts
  • e2e/.env.example

Business Responsibilities

The suite should validate user-visible workflows such as:

  • Login and auth redirects.
  • Dashboard navigation.
  • GTM setup and settings.
  • CRM views and interactions.
  • Offline conversions views.
  • Billing flows in safe/test mode.

Technical Architecture and Source-Code Entry Points

  • Tests live under tests.
  • Page objects live under pages.
  • Test data/helpers live under fixtures.
  • Runtime configuration lives in playwright.config.ts.

Key Data Flows and Service Integrations

The suite exercises the deployed or local UI, which then calls node-api, gtm-proxy, and other services depending the flow under test.

Environment, Deploy, and Runtime Notes

Common commands:

cd e2e
npm install
npm run test
npm run test:chromium
npm run test:headed
npm run report

Configure base URLs and credentials through .env based on .env.example.

Debugging Checklist

  • If tests cannot start, check base URL and whether the UI/backend are running.
  • If auth fails, check test credentials and cookie persistence.
  • If selectors are flaky, prefer stable app-facing selectors over text that changes with locale.
  • If tests pass headed but fail headless, inspect waits, animations, and network idle assumptions.
  • If screenshots/videos show old state, clear test data or isolate workspace/user fixtures.

Tests or Validation Commands

cd e2e
npm run test
npm run report

Mastery Checklist

  • Add a Playwright test with fixture setup, page object usage, and reliable assertions.
  • Diagnose failures using trace, screenshot, and video artifacts.
  • Know when E2E coverage is needed beyond unit/integration tests.