Skip to content

Get the test workflow green: pin the runner and fix stale e2e setup - #20

Open
wirelessdreamer wants to merge 1 commit into
mainfrom
fix/ci-test-workflow
Open

wirelessdreamer wants to merge 1 commit into
mainfrom
fix/ci-test-workflow

Conversation

@wirelessdreamer

Copy link
Copy Markdown
Owner

Fixes the red test check seen on #19, which comes from two problems unrelated to that PR's changes.

1. Playwright install fails on the new runner

ubuntu-latest now resolves to Ubuntu 26.04, and npx playwright install --with-deps chromium fails with "Playwright does not support chromium on ubuntu26.04-x64". The lockfile already has @playwright/test 1.59.1, so the smaller fix is to pin test.yml to ubuntu-24.04. The other workflows (validate, audit, release, pages) don't install Playwright and passed on 26.04, so they are left as they are.

2. e2e was already failing on main (18 failures, not 6)

  • No API behind the e2e dev server. playwright.config.ts starts the fixture API on 8765, but Vite proxied to its default 127.0.0.1:43174, which nothing serves in CI. That caused the ECONNREFUSED spam and every API-backed timeout. Fix: the Vite web server now gets VITE_API_BASE_URL=http://127.0.0.1:8765.
  • pages-site.spec.ts was running under the wrong config. It needs the VITE_PUBLIC_SITE production bundle from playwright.pages.config.ts, so it found the dev build's "Open Workbench" link. Fix: the default config ignores it, and CI now also runs npx playwright test -c playwright.pages.config.ts. It passes 3/3 there.
  • The specs were wrong, not the app. Even with a working API, 9 tests in workbench.spec.ts plus both tests in screenshots.spec.ts drive WorkbenchPage. That page hasn't been routed since 4fbd8fd ("Make translation comparison the primary interface"): /#/workbench now renders ComparisonPage, and the token inspector, workflow tab, flow canvas and guided-translation card these specs look for no longer exist. Removed those tests, screenshots.spec.ts, and its dead capture:screenshots script and README instructions. Word-study hover, pin and Escape on the live UI are already covered by arrangement-sources.spec.ts.
  • Updated to the current UI:
    • The welcome page shows "Quick local startup" instead of "Quick local demo".
    • Assistant docking is measured against .comparison-shell instead of .workspace-grid.
    • The mobile test now checks the intended phone behaviour: on the phone workbench the shell assistant is hidden (App.tsx showShellAssistant) and "Verse comparison" shows.

Verification

Run locally on Windows with the system Edge channel, the fixture API on 8765 and Vite on 4173 (not the dev ports):

  • playwright test: 48 passed, 0 ECONNREFUSED
  • playwright test -c playwright.pages.config.ts: 3 passed

🤖 Generated with Claude Code

- Pin test.yml to ubuntu-24.04: ubuntu-latest is now 26.04, where
  `playwright install --with-deps chromium` fails (no Chromium build).
- Point the e2e Vite dev server at the fixture API on 8765. It proxied
  to the dev default 43174, which nothing serves in CI, so every
  API-backed spec timed out.
- Run pages-site.spec.ts only under playwright.pages.config.ts (it needs
  the VITE_PUBLIC_SITE production bundle) and add that run to CI.
- Remove workbench specs and screenshots.spec.ts that drive WorkbenchPage,
  which has not been routed since 4fbd8fd made the comparison page the
  workbench. Word-study hover/pin is covered on the live UI by
  arrangement-sources.spec.ts. Update the welcome, assistant-docking and
  phone specs to the current UI, and drop the dead capture:screenshots
  script and its README instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant