Skip to content

test: browser tests for every template and the mobile navigation, in CI - #1

Merged
ogorzalka merged 2 commits into
mainfrom
feature/e2e
Sep 29, 2026
Merged

ogorzalka merged 2 commits into
mainfrom
feature/e2e

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Browser tests

bin/tests/e2e/buzz.spec.ts, run on the framework's Playwright harness (same model as theme-apiary): the active theme is Buzz and a block theme; masthead and colophon on every template; front page, post, page, category archive, search with and without results, 404 (status, error404, content); the design-system pattern registered; on a phone, the navigation opens and closes, and nothing overflows sideways.

.github/workflows/tests.yml: fresh skeleton ^13.32@beta on DDEV, two legs (locked, develop), theme copied as-is (no placeholders), built, activated, then npx playwright test specs/buzz. Nightly too. First CI this repository has.

Fix found by the tests

The Vite script is now loaded in the footer (->loadInFooter()). Printed in the head, it came before WordPress's import map; Firefox and Safari then ignore the import map, and the navigation block's module failed on every page with @wordpress/interactivity was a bare specifier. Chromium tolerates it, which is why it went unnoticed.

Results (local, buzz-demo)

  • Chromium 11/11, Firefox 11/11.
  • WebKit not run: this machine lacks libicu74/libavif16. The CI installs Chromium only, like apiary.

⚠️ Expected red until the framework catches up

The error404 assertion needs Pollora/framework#356:

  • develop leg: red until #356 is merged;
  • locked leg: red until the next framework beta ships it.

The theme's Vite script now loads in the footer: printed in the head, it came
before WordPress's import map, which Firefox and Safari then ignore — the
navigation block's module failed to resolve @wordpress/interactivity on every
page.
@ogorzalka
ogorzalka merged commit e568e7c into main Sep 29, 2026
2 of 4 checks passed
@ogorzalka
ogorzalka deleted the feature/e2e branch September 29, 2026 14:44
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