Skip to content

Commit 9b88c55

Browse files
committed
skip cluster update modal for noop test
1 parent b6c0471 commit 9b88c55

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

e2e/playwright/tests/deploy-upgrade/test.spec.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ test('deploy upgrade', async ({ page }) => {
55
test.setTimeout(15 * 60 * 1000); // 15 minutes
66
await login(page);
77
await page.getByRole('link', { name: 'Version history', exact: true }).click();
8-
await page.locator('.available-update-row', { hasText: process.env.APP_UPGRADE_VERSION }).getByRole('button', { name: 'Deploy', exact: true }).click();
8+
// TODO NOW: uncomment this
9+
// await page.locator('.available-update-row', { hasText: process.env.APP_UPGRADE_VERSION }).getByRole('button', { name: 'Deploy', exact: true }).click();
10+
// TODO NOW: remove this line
11+
await page.getByText(process.env.APP_UPGRADE_VERSION, { exact: true }).locator('../../..').getByRole('button', { name: 'Deploy', exact: true }).click();
912
const iframe = page.frameLocator('#upgrade-service-iframe');
1013
await expect(iframe.locator('h3')).toContainText('The First Config Group', { timeout: 20 * 1000 });
1114
await expect(iframe.locator('input[type="text"]')).toHaveValue('initial-hostname.com');
@@ -23,11 +26,13 @@ test('deploy upgrade', async ({ page }) => {
2326
await expect(iframe.locator('#app')).toContainText('All preflight checks passed');
2427
await expect(iframe.getByRole('button', { name: 'Back: Preflight checks' })).toBeVisible();
2528
await iframe.getByRole('button', { name: 'Deploy', exact: true }).click();
26-
await expect(page.locator('.Modal-body')).toContainText('Cluster update in progress');
27-
await expect(page.locator('.Modal-body').getByText('Cluster update in progress')).not.toBeVisible({ timeout: 10 * 60 * 1000 });
28-
// wait for the page to refresh after cluster update
29-
await page.waitForTimeout(5000);
30-
await expect(page.locator('.available-update-row', { hasText: process.env.APP_UPGRADE_VERSION })).not.toBeVisible();
29+
30+
if (process.env.SKIP_CLUSTER_UPGRADE_CHECK !== 'true') {
31+
await expect(page.locator('.Modal-body')).toContainText('Cluster update in progress');
32+
await expect(page.locator('.Modal-body').getByText('Cluster update in progress')).not.toBeVisible({ timeout: 10 * 60 * 1000 });
33+
}
34+
35+
await expect(page.locator('.available-update-row', { hasText: process.env.APP_UPGRADE_VERSION })).not.toBeVisible({ timeout: 10 * 1000 });
3136
await expect(page.locator('.VersionHistoryRow', { hasText: process.env.APP_UPGRADE_VERSION })).toContainText('Currently deployed version', { timeout: 30 * 1000 });
3237
await page.getByRole('link', { name: 'Dashboard', exact: true }).click();
3338
await expect(page.locator('.VersionCard-content--wrapper')).toContainText(process.env.APP_UPGRADE_VERSION);

e2e/scripts/playwright.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ main() {
1717
export DR_AWS_SECRET_ACCESS_KEY="$7"
1818
elif [ "$test_name" == "deploy-upgrade" ]; then
1919
export APP_UPGRADE_VERSION="$2"
20+
export SKIP_CLUSTER_UPGRADE_CHECK="$3"
2021
fi
2122

22-
2323
export BASE_URL="http://10.0.0.2:30001"
2424
cd /automation/playwright
2525
npx playwright test "$test_name"

0 commit comments

Comments
 (0)