test: playkit v0.3.1 adoption, Zod widening, PROD smoke, NextAuth write gates #68
@@ -113,4 +113,14 @@ export class ManageUsersPanel extends BasePage {
|
||||
async waitForRowGone(email: string, timeout = 15_000): Promise<void> {
|
||||
await waitForHidden(this.row(email), { timeout });
|
||||
}
|
||||
|
||||
/** The table defaults to the "Active only" filter and refetches with it on
|
||||
* every save (`ManageUsersContent.handleEditUser` → `fetchUsers()`), so a
|
||||
* just-deactivated row silently drops out of view. Switch to "All" before
|
||||
* reading a status badge you expect to still be visible post-deactivation. */
|
||||
async showAllUsers(): Promise<void> {
|
||||
await this.click(this.page.locator('#status-filter'));
|
||||
await this.click(this.page.getByRole('option', { name: 'All', exact: true }));
|
||||
await waitForHidden(this.page.getByRole('option', { name: 'All', exact: true }));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,10 @@ test.describe('admin manage users: causal cross-session effect @smoke', () => {
|
||||
timings,
|
||||
}) => {
|
||||
test.skip(!e2eCredentials, 'E2E_ADMIN_EMAIL/PASSWORD required (admin user)');
|
||||
// Two full UI logins + create/edit/verify against a shared-CI DEV LXC push
|
||||
// this past the default 60s under load (observed: a single login step
|
||||
// alone took ~90s during a concurrent CI burst) — give it more headroom.
|
||||
test.setTimeout(120_000);
|
||||
const email = throwawayEmail('deactivate');
|
||||
let userContext: import('@playwright/test').BrowserContext | undefined;
|
||||
|
||||
@@ -135,6 +139,11 @@ test.describe('admin manage users: causal cross-session effect @smoke', () => {
|
||||
await manageUsersPanel.setActive(false);
|
||||
await manageUsersPanel.saveEdit();
|
||||
});
|
||||
// The table defaults to (and refetches with) the "Active only" filter,
|
||||
// so the just-deactivated row drops out of view immediately — switch to
|
||||
// "All" before reading its badge, or this hangs forever waiting for a
|
||||
// row that the current filter will never show again.
|
||||
await manageUsersPanel.showAllUsers();
|
||||
expect(await manageUsersPanel.statusBadgeText(email)).toMatch(/inactive/i);
|
||||
await accountMenu.closeManageUsers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user