How abishek-gitspace/suitecrm-playwright-e2e works
Purpose and Execution Model
This repository is a TypeScript Playwright end-to-end test suite for a locally hosted SuiteCRM instance. Its current implemented scope is authentication behavior: login success/failure, logout, and unauthenticated dashboard access. Test execution is driven by npm scripts in package.json and Playwright configuration in playwright.config.ts.
CRM Runtime Boundary
SuiteCRM is an external system under test, not application code in this repository. Docker Compose provisions the local CRM environment, expected at http://localhost:8080; browser tests interact with it only through its UI.
• docker-compose.yml
• .env.example
• README.md
Playwright Test Orchestration
playwright.config.ts is the central execution boundary for browser projects, workers, reporting, base URL behavior, and likely authentication-state reuse. The suite runs Chromium-based UI automation and separates a setup phase from normal authenticated tests.
• playwright.config.ts
• package.json
• tests/auth.spec.ts
Authentication Bootstrap and Session Reuse
Authentication setup logs in once and persists browser storage/session state for subsequent tests. This avoids repeating login for tests that require an authenticated SuiteCRM session, while explicit negative-access coverage can run without that state.
• fixtures/auth.setup.ts
• playwright.config.ts
• tests/auth.spec.ts
Page Object Layer
Page objects isolate SuiteCRM UI selectors and user workflows from test assertions. BasePage provides shared browser/page behavior, while LoginPage encapsulates login-page actions and state checks. This is the main maintainability boundary as future CRM modules are added.
• pages/BasePage.ts
• pages/LoginPage.ts
• tests/auth.spec.ts
Authentication Test Flow
tests/auth.spec.ts composes page objects and Playwright fixtures to verify the auth lifecycle: valid credentials reach the dashboard; invalid/empty input remains or errors on login; logout returns to login; and direct dashboard navigation without authentication redirects appropriately. Credentials/environment-specific values are expected to remain outside test code.
• tests/auth.spec.ts
• pages/LoginPage.ts
• .env.example
Tooling and Planned Integration Boundaries
The material runtime is Node.js/TypeScript plus Playwright and Chromium, with Docker hosting SuiteCRM. Allure reporting, GitHub Actions, and Claude-powered locator recovery are stated future phases rather than present architecture; no corresponding implementation paths appear in the repository tree.
• package.json
• playwright.config.ts
• docker-compose.yml
Main entry points: playwright.config.ts Playwright configuration · auth.setup.ts Authentication setup · docker-compose.yml Docker Compose · LoginPage.ts Login page
Components 12
Local CRM Runtime
- Docker Compose · Provisions the local SuiteCRM environment.
docker-compose.yml - Environment template · Keeps credentials and environment-specific values outside test code.
.env.example - SuiteCRM · Locally hosted CRM reached only through the browser UI.
Test Orchestration
- npm scripts & dependencies · Starts the Playwright test workflow.
package.json - Playwright configuration · Defines projects, workers, reporting, base URL, and setup ordering.
playwright.config.ts
Browser Automation
- Authentication setup · Logs in once and persists browser storage state.
fixtures/auth.setup.ts - Authentication tests · Covers login, logout, invalid input, and unauthenticated dashboard access.
tests/auth.spec.ts - Base page · Provides shared page/browser behavior.
pages/BasePage.ts - Login page · Encapsulates login selectors, actions, and state checks.
pages/LoginPage.ts - Chromium browser · Executes UI automation against local SuiteCRM.
- Persisted session state · Reused by authenticated test projects.
Other components
- Repository guidance · Documents local CRM setup and test use.
README.md
Connections 14
- npm scripts & dependencies → Playwright configuration: runs with
- Playwright configuration → Authentication setup: orders setup
- Playwright configuration → Authentication tests: runs spec
- Docker Compose → SuiteCRM: provisions
- Environment template → Docker Compose: supplies environment
- Environment template → Authentication setup: supplies credentials
- Authentication setup → Login page: uses
- Authentication setup → Persisted session state: persists
- Authentication tests → Login page: uses
- Login page → Base page: extends
- Playwright configuration → Persisted session state: reuses for authenticated projects
- Playwright configuration → Chromium browser: launches
- Chromium browser → SuiteCRM: drives UI at localhost:8080
- Repository guidance → Docker Compose: documents setup