NXT-14655 [POC] investigate screenshot tests using Playwright#366
NXT-14655 [POC] investigate screenshot tests using Playwright#366dan-ichim-lgp wants to merge 22 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #366 +/- ##
========================================
Coverage 82.07% 82.07%
========================================
Files 153 153
Lines 7507 7507
Branches 2262 2262
========================================
Hits 6161 6161
Misses 1041 1041
Partials 305 305 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3f24daa to
6d8d7d6
Compare
Now there is an (doumented in ReadMe, i know) error message:
|
8dd98df to
9092ae3
Compare
14fb3e4 to
f55a96f
Compare
Checklist
Issue Resolved / Feature Added
NXT-14655 — Add a Playwright-based screenshot testing suite alongside the existing WebdriverIO runner (npm run test-ss).
Playwright reuses the same scenario source (tests/screenshot/apps/components/), build output (tests/screenshot/dist/), and case indices (component + testId) as WDIO. It provides an alternative runner with toHaveScreenshot, component-level scripts, benchmarking, and validated Jenkins CI integration (companion PR on build-scripts: enact-playwright-tests.sh chained from enact-screenshot-tests.sh).
Resolution
Added tests/screenshot/playwright/ — config, 27 spec files (9× Default, 9× HighContrast, 9× Light), global setup/teardown, utilities, and developer guide.
Added npm scripts: test-playwright, test-playwright:update, test-playwright:report, test-playwright:component, test-ss:component, benchmark-screenshots, prepare-playwright.
Added helper scripts under tests/screenshot/scripts/ for full-suite and single-component runs (Playwright and WDIO) with optional --parallel.
Playwright serves dist/ on port 4568 (WDIO stays on 4567) so both can coexist locally.
Snapshot paths follow the same naming convention as WDIO reference images (getScreenshotName).
CI tuning: 120s test timeout, 60s navigation/action timeouts, 2 retries in CI; WDIO-aligned page ready (goto → 200ms → fonts.ready); shard coverage validation in global-teardown via shard-registry.js.
Jenkins validation: full suite passed on CI (13,983 tests, 5 workers / 5 instances, ~1h12m). Requires companion build-scripts PR for the Jenkins job.
Additional Considerations
Links
NXT-14655
Comments
Enact-DCO-1.0-Signed-off-by: Dan Ichim (dan.ichim@lgepartner.com)