diff --git a/.github/workflows/js-tests.yml b/.github/workflows/js-tests.yml index cd96f8ab..d81201cf 100644 --- a/.github/workflows/js-tests.yml +++ b/.github/workflows/js-tests.yml @@ -18,14 +18,14 @@ jobs: python-version: "3.11" - name: Install dependencies run: | - npm install + npm ci python -m pip install . python -m pip install jupyterlab - name: Install Playwright Browser - run: npx playwright install chromium + run: npx playwright install-deps chromium - name: Run Playwright tests run: | - npm run start-test-server & npx playwright test + npx playwright test - uses: actions/upload-artifact@v4 if: always() with: diff --git a/package.json b/package.json index 56b1263a..994b7b59 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "build": "esbuild js/widget.js --minify --format=esm --bundle --outdir=src/ipyaladin/static", "prepare": "husky install", "format": "npx prettier . --write && ruff format", - "start-test-server": "python -m jupyter lab --config js/tests/jupyter_server_test_config.py", + "start-test-server": "python -m jupyter lab --config js/ui-tests/jupyter_server_test_config.py", "python-test": "python -m pytest", "js-test": "npm run start-test-server & npx playwright test", "update-snapshots": "npx playwright test --update-snapshots" diff --git a/playwright.config.js b/playwright.config.js index 09ac926e..1db38573 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -7,12 +7,12 @@ module.exports = { ...baseConfig, testDir: "./js/ui-tests", webServer: { - command: "jlpm start", + command: "npm run start-test-server", url: "http://localhost:8888/lab", timeout: 120 * 1000, reuseExistingServer: !process.env.CI, }, expect: { - toMatchSnapshot: { maxDiffPixelsRatio: 0.02 }, // allow 2% difference on snapshots + toMatchSnapshot: { maxDiffPixelRatio: 0.02 }, // allow 2% difference on snapshots }, };