test: migrate integration tests to Playwright
Merged
HA
1mo ago+4612+4612+0123456789012345678901234567890123456789-6687-6687-0123456789012345678901234567890123456789
Part of #7617
Summary
- Migrate the Selenium-driven integration tests to Playwright. Each test keeps its checks, test ID and dev/prod parameters.
- Keep the existing Selenium-backed
AppHarnessAPIs and testing dependencies for downstream compatibility. Step 4 of #7617 (remove Selenium and its dependency) stays open. - Consolidate the integration workflows under the
integration-testsrequired gate. The Playwright job runs in twopytest-splitgroups. - Move the large-state browser benchmark to
tests/performance(smoke scale: 1 and 100 vars). Also fix it: its app template was invalid Python for every size above 1, and the harness reran the 1-var app for all sizes (on main too). It now asserts that the app has the requested number of state vars.
Testing
- The changed modules pass locally in dev and prod with reruns turned off (
-p no:rerunfailures): all 21 changed Playwright modules on the memory state manager (102 passed, 1 redis-only skip), and the modules with logic changes on redis. - Lifespan on redis: the app fixture is session-scoped, and
test_lifespancloses its page and waits until the server drops the token before it stops the backend. A disconnect still in flight at shutdown loggedRedis error deleting tokenand failed the test (the per-test fixture hit this in every local run; the in-test shutdown hit it in CI). test_large_statepasses at smoke scale. With a sharedapp_name, the new state-var check fails (assert 1 == 100).tests/units/test_workflow_gates.py, ruff, pyright and pre-commit pass on the changed files.