Skip to content

Commit 70a97de

Browse files
authored
chore(e2e): address flakiness in deployment check (#5521)
1 parent 423650c commit 70a97de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

e2e/playwright/regression/shared/version-history.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ export const deployNewVersion = async (
160160
await expect(confirmDeploymentModal).not.toBeVisible();
161161
}
162162

163-
await expect(versionRow).toContainText('Deploying', { timeout: 10000 });
163+
// check if the deployment started or it it has already finished
164+
await expect(versionRow).toContainText(/(Deploying|Currently deployed version)/, { timeout: 10000 });
164165
await expect(versionRow).toContainText('Currently deployed version', { timeout: 45000 });
165166
await expect(versionRow.getByRole('button', { name: 'Redeploy', exact: true })).toBeVisible();
166167

@@ -200,7 +201,8 @@ export const rollbackToVersion = async (page: Page, expect: Expect, rowIndex: nu
200201
await confirmDeploymentModal.getByRole('button', { name: 'Yes, redeploy', exact: true }).click();
201202
await expect(confirmDeploymentModal).not.toBeVisible();
202203

203-
await expect(versionRow).toContainText('Deploying', { timeout: 10000 });
204+
// check if the deployment started or it it has already finished
205+
await expect(versionRow).toContainText(/(Deploying|Currently deployed version)/, { timeout: 10000 });
204206
await expect(versionRow).toContainText('Currently deployed version', { timeout: 45000 });
205207
await expect(versionRow.getByRole('button', { name: 'Redeploy', exact: true })).toBeVisible();
206208

0 commit comments

Comments
 (0)