Skip to content

fix(e2e): update routing tests to use cbf2026 as default festival - #224

Merged
richardthe3rd merged 2 commits into
mainfrom
claude/fix-festival-routing-q9cQ9
May 3, 2026
Merged

fix(e2e): update routing tests to use cbf2026 as default festival#224
richardthe3rd merged 2 commits into
mainfrom
claude/fix-festival-routing-q9cQ9

Conversation

@richardthe3rd

Copy link
Copy Markdown
Owner

The default festival was updated to cbf2026 in festivals.json, but the
e2e routing tests still expected cbf2025 as the redirect target. This
caused the root path redirect test (and invalid festival redirect tests)
to fail since the app now redirects to /cbf2026.

https://claude.ai/code/session_01XU3irnKCjdCYaBTJHF4GUA

claude added 2 commits May 3, 2026 20:18
The default festival was updated to cbf2026 in festivals.json, but the
e2e routing tests still expected cbf2025 as the redirect target. This
caused the root path redirect test (and invalid festival redirect tests)
to fail since the app now redirects to /cbf2026.

https://claude.ai/code/session_01XU3irnKCjdCYaBTJHF4GUA
Replaces the hardcoded festival ID constant with a module-level
beforeAll that navigates to / and reads the redirected festival ID from
the URL. Tests now automatically adapt when the default festival changes
in festivals.json.

https://claude.ai/code/session_01XU3irnKCjdCYaBTJHF4GUA
Copilot AI review requested due to automatic review settings May 3, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Playwright E2E routing tests to stop hardcoding the default festival ID (previously cbf2025) and instead discover it at runtime by following the app’s root redirect, aligning tests with the new default festival in festivals.json.

Changes:

  • Introduce a beforeAll step to derive defaultFestivalId from the redirected root URL.
  • Replace hardcoded festival routes in routing tests with defaultFestivalId.

Comment thread test-e2e/routing.spec.ts
Comment on lines +35 to +41
test.beforeAll(async ({ browser }) => {
const page = await browser.newPage();
await page.goto('http://127.0.0.1:8080/', { waitUntil: 'networkidle' });
await page.waitForTimeout(1500);
const [festivalId] = new URL(page.url()).pathname.split('/').filter(Boolean);
defaultFestivalId = festivalId;
await page.close();
@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

LCOV of commit a4b6c80 during CI #63

Summary coverage rate:
  lines......: 77.7% (2242 of 2887 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@codecov

codecov Bot commented May 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Cloudflare Pages Preview

Your preview deployment is ready!

Preview URL: https://claude-fix-festival-routing.staging-cambeerfestival.pages.dev

This preview will be automatically updated when you push new commits to this PR.

@richardthe3rd
richardthe3rd merged commit 39a9732 into main May 3, 2026
14 checks passed
@richardthe3rd
richardthe3rd deleted the claude/fix-festival-routing-q9cQ9 branch May 3, 2026 20:33
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.

3 participants