Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix flaky auth test (#41287)

Ali Waseem5c685ccebaa9
diff --git a/e2e/studio/utils/auth-helpers.ts b/e2e/studio/utils/auth-helpers.ts
index cbe2a8de211..ec639cbdb88 100644
--- a/e2e/studio/utils/auth-helpers.ts
+++ b/e2e/studio/utils/auth-helpers.ts
@@ -79,11 +79,12 @@ export const deleteUserViaUI = async (page: Page, ref: string, email: string) =>
}
export const navigateToAuthUsers = async (page: Page, ref: string) => {
+ const userListResponse = waitForApiResponse(page, 'platform/pg-meta', ref, 'query?key=')
await page.goto(toUrl(`/project/${ref}/auth/users`))
// Wait for the page to load by checking for the "Users" heading
await expect(page.getByRole('heading', { name: 'Users', level: 3 })).toBeVisible()
// Wait for initial users list to load
- await waitForApiResponse(page, 'platform/pg-meta', ref, 'query?key=')
+ await userListResponse
}