Commit 73ea2d6
committed
feat(e2e): Migrate react-router-7-lazy-routes to use Spotlight correctly
Instead of using Playwright's webServer to spawn Spotlight (which runs
in a separate process and can't share the event buffer), tests now call
startSpotlight() directly in beforeAll hooks.
This way:
- Test process spawns Spotlight via `spotlight run -f json`
- Spotlight auto-runs the app and streams events to stdout
- Test process parses stdout and populates the event buffer
- waitForSpotlightTransaction() works because it's in the same process
Changes:
- playwright.config.mjs: Empty webServer (Spotlight handles app startup)
- src/index.tsx: Use Spotlight DSN workaround instead of tunnel
- tests/*.ts: Add beforeAll/afterAll for Spotlight lifecycle
- Deleted start-event-proxy.mjs (no longer needed)1 parent 03eb6e5 commit 73ea2d6
File tree
5 files changed
+102
-58
lines changed- dev-packages/e2e-tests/test-applications/react-router-7-lazy-routes
- src
- tests
5 files changed
+102
-58
lines changedLines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | | - | |
79 | | - | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
3 | 25 | | |
4 | 26 | | |
5 | | - | |
| 27 | + | |
6 | 28 | | |
7 | 29 | | |
8 | 30 | | |
| |||
27 | 49 | | |
28 | 50 | | |
29 | 51 | | |
30 | | - | |
| 52 | + | |
31 | 53 | | |
32 | 54 | | |
33 | 55 | | |
| |||
51 | 73 | | |
52 | 74 | | |
53 | 75 | | |
54 | | - | |
| 76 | + | |
55 | 77 | | |
56 | 78 | | |
57 | 79 | | |
| |||
79 | 101 | | |
80 | 102 | | |
81 | 103 | | |
82 | | - | |
| 104 | + | |
83 | 105 | | |
84 | 106 | | |
85 | 107 | | |
| |||
107 | 129 | | |
108 | 130 | | |
109 | 131 | | |
110 | | - | |
| 132 | + | |
111 | 133 | | |
112 | 134 | | |
113 | 135 | | |
| |||
0 commit comments