From d8bb7f56dfc5a46afa0da239a8642fba2b8211e1 Mon Sep 17 00:00:00 2001 From: gbuomprisco Date: Thu, 2 Oct 2025 14:54:42 +0800 Subject: [PATCH] Refactor E2E Admin Tests to Remove Redundant Personal Account Details Check - Removed the test for displaying personal account details in the admin E2E tests to streamline the test suite. - Added TODO comments to reload the page as a temporary measure until the related issue is resolved. - Improved overall test clarity and maintainability by focusing on essential user flows. --- apps/e2e/tests/admin/admin.spec.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/apps/e2e/tests/admin/admin.spec.ts b/apps/e2e/tests/admin/admin.spec.ts index 09de5b22a..11381456d 100644 --- a/apps/e2e/tests/admin/admin.spec.ts +++ b/apps/e2e/tests/admin/admin.spec.ts @@ -74,16 +74,6 @@ test.describe('Admin', () => { await selectAccount(page, filterText); }); - test('displays personal account details', async ({ page }) => { - await expect(page.getByText('Personal Account')).toBeVisible(); - await expect(page.getByTestId('admin-ban-account-button')).toBeVisible(); - await expect(page.getByTestId('admin-impersonate-button')).toBeVisible(); - - await expect( - page.getByTestId('admin-delete-account-button'), - ).toBeVisible(); - }); - test('ban user flow', async ({ page }) => { await page.getByTestId('admin-ban-account-button').click(); @@ -111,6 +101,9 @@ test.describe('Admin', () => { ), ]); + // TODO: remove when https://github.com/makerkit/next-supabase-saas-kit-turbo/issues/356 is solved + await page.reload(); + await expect(page.getByText('Banned').first()).toBeVisible(); await page.context().clearCookies(); @@ -159,6 +152,9 @@ test.describe('Admin', () => { await page.waitForTimeout(250); + // TODO: remove when https://github.com/makerkit/next-supabase-saas-kit-turbo/issues/356 is solved + await page.reload(); + // Verify ban badge is removed await expect(page.getByText('Banned')).not.toBeVisible();