Repository navigation
test(e2e/studio): drop racy post-action waits in database specs (from #46424) - #47106
Conversation
…s (from #46424) Follow-up to #47077. Three more waitForResponse waits in database.spec were registered *after* their triggering action, so they could miss the (under TanStack, SSR-streamed) response and time out: - Schema Visualizer 'actions': waitForSchemaVisualizerToLoad('auth') after the schema-selector click — the focusTableInVisualizer loop below already gates. - table update / duplicate: waitForDatabaseToLoad after the save mutation — the toBeVisible assertion right after each already waits for the list refetch. Remove all three (and the now-unused imports). Framework-agnostic; the UI assertions are the real gates.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRemoves explicit Database E2E Synchronization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright Test ResultsDetails
Flaky testsFeatures › realtime-inspector.spec.ts › Realtime Inspector › Basic Inspector UI › start/stop listening button works Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
…46424) (#47106) Follow-up to #47077, extracted from the TanStack Start migration (#46424). Three `waitForResponse` waits in `database.spec.ts` were registered *after* their triggering action, so the response could resolve before the listener attached and the wait would time out (this surfaced under TanStack, where the data is SSR-streamed, but the waits are redundant on Next too). **Removed:** - Schema Visualizer *actions*: `waitForSchemaVisualizerToLoad(...'auth')` registered after the schema-selector click — the `focusTableInVisualizer` loop immediately below already auto-waits for the auth schema's tables. - table update / duplicate: `waitForDatabaseToLoad(...)` after the save mutation — the `toBeVisible` assertion right after each already waits for the list to refetch. - the now-unused `waitForDatabaseToLoad` / `waitForSchemaVisualizerToLoad` imports. The UI assertions are the real synchronization points, so behaviour is unchanged on Next. ## To test - Studio E2E `database.spec.ts` passes (the Schema Visualizer + Tables groups). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved database e2e test reliability by optimizing synchronization logic and eliminating timing-sensitive helpers that could introduce flakiness during schema and table operations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Alaister Young <[email protected]>
Follow-up to #47077, extracted from the TanStack Start migration (#46424).
Three
waitForResponsewaits indatabase.spec.tswere registered after their triggering action, so the response could resolve before the listener attached and the wait would time out (this surfaced under TanStack, where the data is SSR-streamed, but the waits are redundant on Next too).Removed:
waitForSchemaVisualizerToLoad(...'auth')registered after the schema-selector click — thefocusTableInVisualizerloop immediately below already auto-waits for the auth schema's tables.waitForDatabaseToLoad(...)after the save mutation — thetoBeVisibleassertion right after each already waits for the list to refetch.waitForDatabaseToLoad/waitForSchemaVisualizerToLoadimports.The UI assertions are the real synchronization points, so behaviour is unchanged on Next.
To test
database.spec.tspasses (the Schema Visualizer + Tables groups).Summary by CodeRabbit