Repository navigation
fix: correct toHaveRedirect failure message in 11.test-db - #47
Merged
Merged
Conversation
Checkout the PR head and run epicshop setup so Setup works for forks instead of cloning epicweb-dev and missing fork-only branches. Pin the Test job to ubuntu-24.04 because Playwright 1.56.1 does not support ubuntu26.04. Add a short learner note next to the corrected toHaveRedirect failure message ternary. Supersedes the follow-up needed on #46 (maintainer could not push to the fork). Keeps Davien21's matcher fix commits. Co-authored-by: Kent C. Dodds <[email protected]>
Solution apps use vitest for npm run test; epicshop/test.js never runs test:e2e. The with-deps Chromium install has been hanging after download on GitHub Actions (cancelled on this PR and on recent main), so drop it. Co-authored-by: Kent C. Dodds <[email protected]>
Epicshop workflow updates dropped the Node 22 Test runner, setup:custom prep, and the completed-Vitest-only app filter from #45. Without those, solution CI fails on Playwright-collected e2e suites and Node 26 AbortSignal/MSW issues. Restore that Test job shape; keep fork-safe Setup and skip hung Playwright browser install. Co-authored-by: Kent C. Dodds <[email protected]>
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.
Summary
Follow-up to #46 by @Davien21 (Chidiebere Ekennia). This branch keeps their matcher commits and adds CI + learner-note follow-ups so we can ship.
Same inverted ternary as the Epic Stack (epicweb-dev/epic-stack#1104): in
tests/setup/custom-matchers.ts, a missing redirect reportsbut got null, and a failing.not.toHaveRedirect()reportsbut got no redirectinstead of the location.This fixes it in all six step apps in
exercises/11.test-dbthat share the matcher. Pass/fail logic is unchanged.toHaveRedirect('/login')on a 200but got nullbut got no redirect.not.toHaveRedirect()on a 302 to/dashboardbut got no redirectbut got "/dashboard"Also:
epicshop setup(fork branches are not onepicweb-dev, soepicshop add repo#branchfailed on fix: correct toHaveRedirect failure message in 11.test-db #46).ubuntu-24.04because Playwright 1.56.1 does not support chromium on ubuntu26.04 (ubuntu-latest).Unable to push onto the fork PR branch (no write access to
Davien21/full-stack-testingdespitemaintainer_can_modify), so this PR supersedes #46 while preserving contributor commits.Test plan
pathspec 'pr/fix-to-have-redirect-message' did not matchNote
Low Risk
Matcher changes only affect test failure text; CI changes target fork PRs and test runner stability without touching deploy or production paths.
Reviewed by Cursor Bugbot for commit 6ef797d. Bugbot is set up for automated code reviews on this repo. Configure here.