mirror of
https://github.com/appwrite/console.git
synced 2026-04-07 19:17:46 +00:00
bump: timeouts, attempt to see if this helps on staging!
This commit is contained in:
+11
-11
@@ -31,10 +31,10 @@ async function dismissNotification(page: Page, messagePattern: RegExp): Promise<
|
||||
await notification.getByRole('button').first().click();
|
||||
}
|
||||
} catch {
|
||||
await expect(notification).not.toBeVisible({ timeout: 10000 });
|
||||
await expect(notification).not.toBeVisible({ timeout: 15000 });
|
||||
return;
|
||||
}
|
||||
await expect(notification).not.toBeVisible({ timeout: 10000 });
|
||||
await expect(notification).not.toBeVisible({ timeout: 15000 });
|
||||
}
|
||||
|
||||
export async function createUser(
|
||||
@@ -165,10 +165,10 @@ export async function updateUserName(
|
||||
});
|
||||
|
||||
const nameInput = nameSection.locator('id=name');
|
||||
await nameInput.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await nameInput.waitFor({ state: 'visible', timeout: 15000 });
|
||||
await nameInput.fill(newName);
|
||||
const updateButton = nameSection.getByRole('button', { name: 'Update' });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 10000 });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 15000 });
|
||||
await updateButton.click();
|
||||
await expect(page.getByText(/name has been updated/i)).toBeVisible();
|
||||
await dismissNotification(page, /name has been updated/i);
|
||||
@@ -191,10 +191,10 @@ export async function updateUserEmail(
|
||||
});
|
||||
|
||||
const emailInput = emailSection.locator('id=email');
|
||||
await emailInput.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await emailInput.waitFor({ state: 'visible', timeout: 15000 });
|
||||
await emailInput.fill(newEmail);
|
||||
const updateButton = emailSection.getByRole('button', { name: 'Update' });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 10000 });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 15000 });
|
||||
await updateButton.click();
|
||||
await expect(page.getByText(/email has been updated/i)).toBeVisible();
|
||||
await dismissNotification(page, /email has been updated/i);
|
||||
@@ -217,10 +217,10 @@ export async function updateUserPhone(
|
||||
});
|
||||
|
||||
const phoneInput = phoneSection.locator('id=phone');
|
||||
await phoneInput.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await phoneInput.waitFor({ state: 'visible', timeout: 15000 });
|
||||
await phoneInput.fill(newPhone);
|
||||
const updateButton = phoneSection.getByRole('button', { name: 'Update' });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 10000 });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 15000 });
|
||||
await updateButton.click();
|
||||
await expect(page.getByText(/phone has been updated/i)).toBeVisible();
|
||||
await dismissNotification(page, /phone has been updated/i);
|
||||
@@ -243,10 +243,10 @@ export async function updateUserPassword(
|
||||
});
|
||||
|
||||
const passwordInput = passwordSection.locator('#newPassword');
|
||||
await passwordInput.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await passwordInput.waitFor({ state: 'visible', timeout: 15000 });
|
||||
await passwordInput.fill(newPassword);
|
||||
const updateButton = passwordSection.getByRole('button', { name: 'Update' });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 10000 });
|
||||
await expect(updateButton).toBeEnabled({ timeout: 15000 });
|
||||
await updateButton.click();
|
||||
await expect(page.getByText(/password has been updated/i)).toBeVisible();
|
||||
await dismissNotification(page, /password has been updated/i);
|
||||
@@ -265,7 +265,7 @@ export async function updateUserStatus(
|
||||
|
||||
const buttonText = enabled ? 'Unblock account' : 'Block account';
|
||||
const button = page.getByRole('button', { name: buttonText });
|
||||
await button.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await button.waitFor({ state: 'visible', timeout: 15000 });
|
||||
await button.click();
|
||||
await expect(page.getByText(/has been (blocked|unblocked)/i)).toBeVisible();
|
||||
await dismissNotification(page, /has been (blocked|unblocked)/i);
|
||||
|
||||
@@ -57,24 +57,24 @@ export async function deleteAccount(page: Page, maxRetries = 3) {
|
||||
|
||||
// click the Delete button in the CardGrid actions section
|
||||
const trigger = page.getByRole('button', { name: 'Delete', exact: true });
|
||||
await trigger.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await trigger.waitFor({ state: 'visible', timeout: 15000 });
|
||||
await trigger.click();
|
||||
|
||||
// wait for confirm modal to open
|
||||
const dialog = page.locator('dialog[open]');
|
||||
await expect(dialog).toBeVisible({ timeout: 10000 });
|
||||
await expect(dialog).toBeVisible({ timeout: 15000 });
|
||||
|
||||
// click the confirm button in the modal
|
||||
const confirm = dialog.getByRole('button', { name: 'Delete', exact: true });
|
||||
await confirm.waitFor({ state: 'attached', timeout: 5000 });
|
||||
await expect(confirm).toBeVisible({ timeout: 10000 });
|
||||
await expect(confirm).toBeEnabled({ timeout: 10000 });
|
||||
await expect(confirm).toBeVisible({ timeout: 15000 });
|
||||
await expect(confirm).toBeEnabled({ timeout: 15000 });
|
||||
try {
|
||||
await confirm.click({ timeout: 5000 });
|
||||
} catch {
|
||||
const retryConfirm = dialog.getByRole('button', { name: 'Delete', exact: true });
|
||||
await retryConfirm.waitFor({ state: 'attached', timeout: 5000 });
|
||||
await expect(retryConfirm).toBeEnabled({ timeout: 10000 });
|
||||
await expect(retryConfirm).toBeEnabled({ timeout: 15000 });
|
||||
await retryConfirm.click({ timeout: 5000 });
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export async function deleteAccount(page: Page, maxRetries = 3) {
|
||||
);
|
||||
|
||||
await page.keyboard.press('Escape').catch(() => {});
|
||||
await expect(dialog).toBeHidden({ timeout: 10000 });
|
||||
await expect(dialog).toBeHidden({ timeout: 15000 });
|
||||
await page.waitForTimeout(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -53,14 +53,14 @@ test('auth flow - free tier', async ({ page, project }) => {
|
||||
await test.step('verify blocked status', async () => {
|
||||
await navigateToUsers(page, project.region, project.id);
|
||||
const userRow = page.locator('[role="row"]').filter({ hasText: 'Updated Test User' });
|
||||
await expect(userRow.getByText('blocked')).toBeVisible({ timeout: 10000 });
|
||||
await expect(userRow.getByText('blocked')).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
await updateUserStatus(page, project.region, project.id, user.id, true);
|
||||
await test.step('verify unblocked status', async () => {
|
||||
await navigateToUsers(page, project.region, project.id);
|
||||
const userRow = page.locator('[role="row"]').filter({ hasText: 'Updated Test User' });
|
||||
await expect(userRow.getByText('blocked')).not.toBeVisible({ timeout: 10000 });
|
||||
await expect(userRow.getByText('blocked')).not.toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
await updateUserLabels(page, project.region, project.id, user.id, ['test', 'e2e', 'freeTier']);
|
||||
|
||||
Reference in New Issue
Block a user