The E2E test "should show script path field when Script type is selected" was failing because the locator didn't match the actual UI field. Update locator from /create/i to /script path/i Update placeholder matcher from /create-dns/i to /dns-challenge.sh/i Matches actual ScriptProvider field: label="Script Path", placeholder="/scripts/dns-challenge.sh" Also includes skill infrastructure for Playwright (separate feature): Add test-e2e-playwright.SKILL.md for non-interactive test execution Add run.sh script with argument parsing and report URL output Add VS Code tasks for skill execution and report viewing
7.1 KiB
name, version, description, author, license, tags, compatibility, requirements, environment_variables, parameters, outputs, metadata
| name | version | description | author | license | tags | compatibility | requirements | environment_variables | parameters | outputs | metadata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| test-e2e-playwright | 1.0.0 | Run Playwright E2E tests against the Charon application with browser selection and filtering | Charon Project | MIT |
|
|
|
|
|
|
|
Test E2E Playwright
Overview
Executes Playwright end-to-end tests against the Charon application. This skill supports browser selection, headed mode for debugging, and test filtering by name pattern.
The skill runs non-interactively by default (HTML report does not auto-open), making it suitable for CI/CD pipelines and automated testing scenarios.
Prerequisites
- Node.js 18.0 or higher installed and in PATH
- Playwright browsers installed (
npx playwright install) - Charon application running (default:
http://localhost:8080) - Test files in
tests/directory
Usage
Basic Usage
Run E2E tests with default settings (Chromium, headless):
.github/skills/scripts/skill-runner.sh test-e2e-playwright
Browser Selection
Run tests in a specific browser:
# Chromium (default)
.github/skills/scripts/skill-runner.sh test-e2e-playwright --project=chromium
# Firefox
.github/skills/scripts/skill-runner.sh test-e2e-playwright --project=firefox
# WebKit (Safari)
.github/skills/scripts/skill-runner.sh test-e2e-playwright --project=webkit
# All browsers
.github/skills/scripts/skill-runner.sh test-e2e-playwright --project=all
Headed Mode (Debugging)
Run tests with a visible browser window:
.github/skills/scripts/skill-runner.sh test-e2e-playwright --headed
Filter Tests
Run only tests matching a pattern:
# Run tests with "login" in the title
.github/skills/scripts/skill-runner.sh test-e2e-playwright --grep="login"
# Run tests with "DNS" in the title
.github/skills/scripts/skill-runner.sh test-e2e-playwright --grep="DNS"
Combined Options
.github/skills/scripts/skill-runner.sh test-e2e-playwright --project=firefox --headed --grep="dashboard"
CI/CD Integration
For use in GitHub Actions or other CI/CD pipelines:
- name: Run E2E Tests
run: .github/skills/scripts/skill-runner.sh test-e2e-playwright
env:
PLAYWRIGHT_BASE_URL: http://localhost:8080
CI: true
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| project | string | No | chromium | Browser project: chromium, firefox, webkit, all |
| headed | boolean | No | false | Run with visible browser window |
| grep | string | No | "" | Filter tests by title pattern (regex) |
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
| PLAYWRIGHT_BASE_URL | No | http://localhost:8080 | Application URL to test against |
| PLAYWRIGHT_HTML_OPEN | No | never | HTML report auto-open behavior |
| CI | No | "" | Set to "true" for CI environment behavior |
Outputs
Success Exit Code
- 0: All tests passed
Error Exit Codes
- 1: One or more tests failed
- Non-zero: Configuration or execution error
Output Directories
- playwright-report/: HTML report with test results and traces
- test-results/: Test artifacts, screenshots, and trace files
Viewing the Report
After test execution, view the HTML report using VS Code Simple Browser:
Method 1: Start Report Server
npx playwright show-report --port 9323
Then open in VS Code Simple Browser: http://127.0.0.1:9323
Method 2: VS Code Task
Use the VS Code task "Test: E2E Playwright - View Report" to start the report server as a background task, then open http://127.0.0.1:9323 in Simple Browser.
Method 3: Direct File Access
Open playwright-report/index.html directly in a browser.
Examples
Example 1: Quick Smoke Test
.github/skills/scripts/skill-runner.sh test-e2e-playwright --grep="smoke"
Example 2: Debug Failing Test
.github/skills/scripts/skill-runner.sh test-e2e-playwright --headed --grep="failing-test-name"
Example 3: Cross-Browser Validation
.github/skills/scripts/skill-runner.sh test-e2e-playwright --project=all
Test Structure
Tests are located in the tests/ directory and follow Playwright conventions:
tests/
├── auth.setup.ts # Authentication setup (runs first)
├── dashboard.spec.ts # Dashboard tests
├── dns-records.spec.ts # DNS management tests
├── login.spec.ts # Login flow tests
└── ...
Error Handling
Common Errors
Error: Target page, context or browser has been closed
Solution: Ensure the application is running at the configured base URL
Error: page.goto: net::ERR_CONNECTION_REFUSED
Solution: Start the Charon application before running tests
Error: browserType.launch: Executable doesn't exist
Solution: Run npx playwright install to install browser binaries
Related Skills
- test-frontend-unit - Frontend unit tests with Vitest
- docker-start-dev - Start development environment
- integration-test-all - Run all integration tests
Notes
- Authentication: Tests use stored auth state from
playwright/.auth/user.json - Parallelization: Tests run in parallel locally, sequential in CI
- Retries: CI automatically retries failed tests twice
- Traces: Traces are collected on first retry for debugging
- Report: HTML report is generated at
playwright-report/index.html
Last Updated: 2026-01-15
Maintained by: Charon Project Team
Source: tests/ directory