Commit 4d07bf3
committed
Fix slug-read race in the billing trial-checkout scenario
The scenario landed on "/" with waitUntil networkidle and immediately read the
org slug from the pathname. networkidle proves the network went quiet, not
that the client-side canonicalization redirect ran: on a slow CI runner the
pathname is still "/" at that point, so split("/").filter(Boolean)[0] is
undefined and the test navigates to the literal /undefined/billing/plans. The
billing fetches fire under that bogus slug and cache their failure (autumn-js
staleTime 60s, no refetch on focus); the shell then canonicalizes the URL
client-side but nothing refetches, so the plans grid stays empty and the
"Start free trial" waitFor times out through every retry. The run artifacts
show exactly this: timeline.json records the /undefined/billing/plans
navigation and failure.png shows the plans page with an empty grid.
Wait for the URL to canonicalize onto the slug pattern before reading it, the
same barrier member-invite-seat-limit already uses.1 parent 6834eb2 commit 4d07bf3
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
| |||
0 commit comments