Commit c1a4b7a
committed
fix(e2e): forward mock option from setRecipeFixture to configureDevServer
setRecipeFixture accepted a `mock` option in its call sites but silently
discarded it — RecipeFixtureOptions had no `mock` property and the
destructuring never extracted it. Since the e2e directory lacks a
tsconfig, TypeScript couldn't catch the extra property.
Without `mock` reaching configureDevServer:
- createMockEnvFile was never called (no scenario env var)
- The MSW entry point was never set (no fetch interception)
- No session cookie injection occurred
- account.tsx's isLoggedIn check always returned false
- All authenticated tests redirected to /account/login
The fix adds `mock` to RecipeFixtureOptions and forwards it through to
configureDevServer, which already handles it correctly.1 parent 7a3dda2 commit c1a4b7a
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| |||
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
| 68 | + | |
59 | 69 | | |
60 | 70 | | |
61 | 71 | | |
| |||
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
| 100 | + | |
90 | 101 | | |
91 | 102 | | |
92 | 103 | | |
| |||
0 commit comments