fix(e2e): update routing tests to use cbf2026 as default festival - #224
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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
beforeAllstep to derivedefaultFestivalIdfrom the redirected root URL. - Replace hardcoded festival routes in routing tests with
defaultFestivalId.
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(); |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
🚀 Cloudflare Pages PreviewYour 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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