mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-11-13 01:03:45 +01:00
test(eosdash): run EOSdash in a headless Chromium browser
Run EOSdash in a headless Chromium browser for testing. Every menu tab must load with HTTP 200 and render content, in light and dark mode, without JavaScript errors. Additional changes Enable the browser tests by --browser-test (marker browser), skip them otherwise Add the CI job browser-test that installs Chromium and runs them Add the make target test-browser, run with --extra dev so playwright is installed Add playwright to the dev dependencies Document how to run the browser tests with --extra dev, incl. the browser system libraries on Linux Accept a child PID of the started server in the server startup checks, on Windows only: there the venv python.exe runs the real interpreter as a child process Share one Chromium per test class, so Playwright stops before other tests run Request chromium before servers so a missing browser fails before EOS starts Make the missing-browser hint platform neutral (Linux: add --with-deps) Set PYTHONIOENCODING=utf-8 for the test server to avoid encoding errors on Windows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2245976de4
commit
4475774c06
@@ -41,3 +41,33 @@ jobs:
|
||||
name: optimize-results
|
||||
path: tests/testdata/**/new_optimize_result*
|
||||
if-no-files-found: ignore
|
||||
|
||||
browser-test:
|
||||
# EOSdash in headless Chromium (tests marked 'browser', enabled by --browser-test).
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v7
|
||||
with:
|
||||
python-version: "3.13.15"
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install uv
|
||||
|
||||
- name: Sync environment with uv
|
||||
run: |
|
||||
uv sync --extra dev
|
||||
|
||||
- name: Install Chromium with its system libraries
|
||||
run: |
|
||||
uv run playwright install --with-deps chromium
|
||||
|
||||
- name: Run browser tests
|
||||
run: |
|
||||
uv run pytest --browser-test -m browser -vs
|
||||
|
||||
Reference in New Issue
Block a user