Skip to content

Commit 19fa944

Browse files
authored
fix(ci): e2e snapshot test flake (#2761)
1 parent 4a400db commit 19fa944

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

e2e/playwright/tests/create-backup/test.spec.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ test('create backup', async ({ page }) => {
1818
await page.getByPlaceholder('http[s]://hostname[:port]').fill(process.env.DR_S3_ENDPOINT);
1919
await page.getByPlaceholder('us-east-1').click();
2020
await page.getByPlaceholder('us-east-1').fill(process.env.DR_S3_REGION);
21-
await page.getByRole('button', { name: 'Update storage settings' }).click();
22-
await expect(page.locator('.Loader')).toBeVisible();
23-
await expect(page.getByRole('button', { name: 'Updating', exact: true })).toBeDisabled();
24-
await expect(page.getByRole('button', { name: 'Update storage settings' })).not.toBeVisible();
25-
await expect(page.locator('form')).toContainText('Settings updated', { timeout: 90000 });
26-
await expect(page.locator('.Loader')).not.toBeVisible();
27-
await expect(page.getByRole('button', { name: 'Update storage settings' })).toBeEnabled();
21+
22+
const storageCard = page.locator('[data-testid="snapshots-storage-settings-card"]');
23+
await expect(storageCard.getByRole('button', { name: 'Update storage settings' })).toBeVisible();
24+
await storageCard.getByRole('button', { name: 'Update storage settings' }).click();
25+
await expect(storageCard.locator('.Loader')).toBeVisible();
26+
await expect(storageCard.getByRole('button', { name: 'Updating', exact: true })).toBeDisabled();
27+
await expect(storageCard.getByRole('button', { name: 'Update storage settings' })).not.toBeVisible();
28+
await expect(storageCard.locator('form')).toContainText('Settings updated', { timeout: 90000 });
29+
await expect(storageCard.locator('.Loader')).not.toBeVisible();
30+
await expect(storageCard.getByRole('button', { name: 'Update storage settings' })).toBeEnabled();
31+
2832
await page.locator('.subnav-item').getByText('Backups', { exact: true }).click();
2933
await expect(page.locator('#app')).toContainText('No backups yet');
3034
await page.getByRole('button', { name: 'Start a backup' }).click();

0 commit comments

Comments
 (0)