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.
This commit is contained in:
@@ -74,16 +74,6 @@ test.describe('Admin', () => {
|
|||||||
await selectAccount(page, filterText);
|
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 }) => {
|
test('ban user flow', async ({ page }) => {
|
||||||
await page.getByTestId('admin-ban-account-button').click();
|
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 expect(page.getByText('Banned').first()).toBeVisible();
|
||||||
|
|
||||||
await page.context().clearCookies();
|
await page.context().clearCookies();
|
||||||
@@ -159,6 +152,9 @@ test.describe('Admin', () => {
|
|||||||
|
|
||||||
await page.waitForTimeout(250);
|
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
|
// Verify ban badge is removed
|
||||||
await expect(page.getByText('Banned')).not.toBeVisible();
|
await expect(page.getByText('Banned')).not.toBeVisible();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user