From 4828d4133a5cc1fdd7c25a770ac77615ea677c0a Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Tue, 23 Jun 2026 16:59:06 +0100 Subject: [PATCH 1/7] test: add UI E2E tests for Argo CD Resource Tree and Pod logs Signed-off-by: Triona Doyle --- test/ui-e2e/README.md | 2 +- test/ui-e2e/run-ui-tests.sh | 13 ++++++++----- test/ui-e2e/tests/resource-tree.spec.ts | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/test/ui-e2e/README.md b/test/ui-e2e/README.md index fae9ca41057..9ecd4afb805 100644 --- a/test/ui-e2e/README.md +++ b/test/ui-e2e/README.md @@ -68,7 +68,7 @@ All executions are driven via the ./run-ui-tests.sh wrapper script. This wrapper | `--headed` | Launches the visible Chromium browser UI. Excellent for local debugging. | | `--trace on` | Records a granular execution trace (DOM snapshots, network calls, actions) for visual triage. | | `--reporter=list` | Switches stdout to a clean line-by-line format, ideal for monitoring real-time execution steps. | -| --env= | Overrides the local setup to simulate automation. It forces headless execution, performs a clean `npm ci`, and installs required browser binaries dynamically. | +| `--env=` | Overrides the local setup to simulate automation. It forces headless execution, performs a clean `npm ci`, and installs required browser binaries dynamically. | ### Visual Debugging (Trace Viewer) diff --git a/test/ui-e2e/run-ui-tests.sh b/test/ui-e2e/run-ui-tests.sh index 87b684f40d2..d4dfa9b7ea7 100755 --- a/test/ui-e2e/run-ui-tests.sh +++ b/test/ui-e2e/run-ui-tests.sh @@ -73,8 +73,8 @@ if [ -z "$GITOPS_VERSION" ]; then GITOPS_VERSION="Unknown" fi -#get Argo CD version -ARGO_API_VERSION=$(curl -s -k "$ARGOCD_URL/api/version" | grep -o '"Version":"[^"]*"' | cut -d'"' -f4) +#get Argo CD version (with CodeRabbit timeout fix) +ARGO_API_VERSION=$(curl -s -k --max-time 10 "$ARGOCD_URL/api/version" | grep -o '"Version":"[^"]*"' | cut -d'"' -f4) if [ -z "$ARGO_API_VERSION" ]; then ARGO_API_VERSION="Unknown" fi @@ -86,11 +86,14 @@ echo " " # 2. Execute based on the environment if [ "$ENV" = "ci" ] || [ "$ENV" = "pipeline" ]; then echo "Running headlessly in automation ($ENV)..." - npm ci + + # CodeRabbit hard-fails + npm ci || { echo "Error: npm ci failed."; exit 1; } + if [ "$(uname -s)" = "Darwin" ]; then - npx playwright install chromium + npx playwright install chromium || { echo "Error: Playwright browser install failed."; exit 1; } else - npx playwright install chromium --with-deps + npx playwright install chromium --with-deps || { echo "Error: Playwright browser install failed."; exit 1; } fi #headed from args diff --git a/test/ui-e2e/tests/resource-tree.spec.ts b/test/ui-e2e/tests/resource-tree.spec.ts index e262fa9b221..4123e396f0b 100644 --- a/test/ui-e2e/tests/resource-tree.spec.ts +++ b/test/ui-e2e/tests/resource-tree.spec.ts @@ -6,7 +6,7 @@ test.describe('Argo CD Resource Tree and Pod Logs', () => { test.use({ storageState: '.auth/storageState.json' }); - test('Navigate to app details, open a Pod, and verify logs stream', async ({ page, managedApp, argoVersion }) => { + test('Navigate to app details, open a Pod, and verify logs stream', async ({ page, managedApp }) => { test.setTimeout(120000); const appsPage = new ApplicationsPage(page); From 8eaa716c1cbdb2b66fba1997feb02093705399f2 Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Wed, 24 Jun 2026 13:52:51 +0100 Subject: [PATCH 2/7] test updates and address coderabbit feedback Signed-off-by: Triona Doyle --- test/ui-e2e/.auth/setup.ts | 6 +++--- test/ui-e2e/global.setup.ts | 4 ++-- test/ui-e2e/src/fixtures.ts | 28 ---------------------------- 3 files changed, 5 insertions(+), 33 deletions(-) diff --git a/test/ui-e2e/.auth/setup.ts b/test/ui-e2e/.auth/setup.ts index 03fad54e779..2a5ba878808 100644 --- a/test/ui-e2e/.auth/setup.ts +++ b/test/ui-e2e/.auth/setup.ts @@ -34,8 +34,8 @@ setup('authenticate to OpenShift Cluster', async ({ page, baseURL }) => { if (await idpScreenText.isVisible()) { console.log(`IDP selection screen detected. Selecting provider: "${idpName}"`); - //look for the specific IDP - const idpLink = page.getByRole('link', { name: idpName, exact: true }); + //look for the specific idp link without exact matching + const idpLink = page.getByRole('link', { name: idpName }); await idpLink.waitFor({ state: 'visible', timeout: TIMEOUTS.short }); await idpLink.click(); @@ -58,7 +58,7 @@ setup('authenticate to OpenShift Cluster', async ({ page, baseURL }) => { await passwordInput.fill(process.env.CLUSTER_PASSWORD); await page.getByRole('button', { name: /Log in/i }).click(); -//handle the OpenShift 4.x Welcome Tour modal if it appears + //handle the openshift welcome tour modal if it appears try { const skipTourButton = page.getByRole('button', { name: /skip tour/i }); //wait up to 5 seconds for the modal to pop up diff --git a/test/ui-e2e/global.setup.ts b/test/ui-e2e/global.setup.ts index abad09b10e0..466a9e675bb 100644 --- a/test/ui-e2e/global.setup.ts +++ b/test/ui-e2e/global.setup.ts @@ -13,10 +13,10 @@ async function globalSetup() { execSync('oc delete all -l app=spring-petclinic -n openshift-gitops --wait=false', { stdio: 'ignore' }); console.log('* Cluster sanitized. Starting test suite.'); - } catch (error) { + } catch (error) { console.error('Pre-flight cleanup failed. Check your cluster connection.', error); throw error; - } + } } export default globalSetup; \ No newline at end of file diff --git a/test/ui-e2e/src/fixtures.ts b/test/ui-e2e/src/fixtures.ts index f64787d22a1..29cea47f0f6 100644 --- a/test/ui-e2e/src/fixtures.ts +++ b/test/ui-e2e/src/fixtures.ts @@ -5,7 +5,6 @@ import { ApplicationsPage } from './pages/ApplicationsPage'; //define custom fixture types type MyFixtures = { managedApp: string; - argoVersion: string; }; export const test = base.extend({ @@ -31,33 +30,6 @@ export const test = base.extend({ await use(page); }, - //get target argocd version - argoVersion: async ({ page }, use) => { - try { - //get version - const response = await page.request.get('/api/version'); - - if (!response.ok()) { - throw new Error(`API returned status: ${response.status()}`); - } - - const data = await response.json(); - const fullVersion = data.Version || 'Unknown'; - - //extract the major.minor version (e.g., "v2.10.1" -> "2.10") - const match = fullVersion.match(/v(\d+\.\d+)/); - const version = match ? match[1] : '3.0'; - - //for debugging/CI logs - console.log(`TARGETING ARGO CD VERSION: ${fullVersion}`); - - await use(version); - } catch (error) { - console.warn(`\n[warn] Failed to fetch Argo CD version from API. Defaulting to 3.0. Reason: ${error instanceof Error ? error.message : 'Unknown'}\n`); - await use('3.0'); // Default to 3.0 - } - }, - managedApp: [ async ({ page }, use) => { const appName = `e2e-app-${Date.now()}`; const appsPage = new ApplicationsPage(page); From 8f613ad6feef9bfe433c88efbdfb0b8b406e05d2 Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Wed, 24 Jun 2026 19:19:07 +0100 Subject: [PATCH 3/7] address yet more coderabbit feedback .. Signed-off-by: Triona Doyle --- test/ui-e2e/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ui-e2e/README.md b/test/ui-e2e/README.md index 9ecd4afb805..fae9ca41057 100644 --- a/test/ui-e2e/README.md +++ b/test/ui-e2e/README.md @@ -68,7 +68,7 @@ All executions are driven via the ./run-ui-tests.sh wrapper script. This wrapper | `--headed` | Launches the visible Chromium browser UI. Excellent for local debugging. | | `--trace on` | Records a granular execution trace (DOM snapshots, network calls, actions) for visual triage. | | `--reporter=list` | Switches stdout to a clean line-by-line format, ideal for monitoring real-time execution steps. | -| `--env=` | Overrides the local setup to simulate automation. It forces headless execution, performs a clean `npm ci`, and installs required browser binaries dynamically. | +| --env= | Overrides the local setup to simulate automation. It forces headless execution, performs a clean `npm ci`, and installs required browser binaries dynamically. | ### Visual Debugging (Trace Viewer) From eb41eef5b8cc3a137ffc9d8cf74a36378e7bb4f2 Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Fri, 26 Jun 2026 11:13:58 +0100 Subject: [PATCH 4/7] add Argocd version check and harden app health locators Signed-off-by: Triona Doyle --- test/ui-e2e/src/fixtures.ts | 28 +++++++++++++++++++++++++ test/ui-e2e/tests/resource-tree.spec.ts | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/test/ui-e2e/src/fixtures.ts b/test/ui-e2e/src/fixtures.ts index 29cea47f0f6..f64787d22a1 100644 --- a/test/ui-e2e/src/fixtures.ts +++ b/test/ui-e2e/src/fixtures.ts @@ -5,6 +5,7 @@ import { ApplicationsPage } from './pages/ApplicationsPage'; //define custom fixture types type MyFixtures = { managedApp: string; + argoVersion: string; }; export const test = base.extend({ @@ -30,6 +31,33 @@ export const test = base.extend({ await use(page); }, + //get target argocd version + argoVersion: async ({ page }, use) => { + try { + //get version + const response = await page.request.get('/api/version'); + + if (!response.ok()) { + throw new Error(`API returned status: ${response.status()}`); + } + + const data = await response.json(); + const fullVersion = data.Version || 'Unknown'; + + //extract the major.minor version (e.g., "v2.10.1" -> "2.10") + const match = fullVersion.match(/v(\d+\.\d+)/); + const version = match ? match[1] : '3.0'; + + //for debugging/CI logs + console.log(`TARGETING ARGO CD VERSION: ${fullVersion}`); + + await use(version); + } catch (error) { + console.warn(`\n[warn] Failed to fetch Argo CD version from API. Defaulting to 3.0. Reason: ${error instanceof Error ? error.message : 'Unknown'}\n`); + await use('3.0'); // Default to 3.0 + } + }, + managedApp: [ async ({ page }, use) => { const appName = `e2e-app-${Date.now()}`; const appsPage = new ApplicationsPage(page); diff --git a/test/ui-e2e/tests/resource-tree.spec.ts b/test/ui-e2e/tests/resource-tree.spec.ts index 4123e396f0b..e262fa9b221 100644 --- a/test/ui-e2e/tests/resource-tree.spec.ts +++ b/test/ui-e2e/tests/resource-tree.spec.ts @@ -6,7 +6,7 @@ test.describe('Argo CD Resource Tree and Pod Logs', () => { test.use({ storageState: '.auth/storageState.json' }); - test('Navigate to app details, open a Pod, and verify logs stream', async ({ page, managedApp }) => { + test('Navigate to app details, open a Pod, and verify logs stream', async ({ page, managedApp, argoVersion }) => { test.setTimeout(120000); const appsPage = new ApplicationsPage(page); From 2c94e1fabd034e53842c27c5ddfa13ad91433d8e Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Thu, 9 Jul 2026 10:50:46 +0100 Subject: [PATCH 5/7] Add test Login with HA enabled Signed-off-by: Triona Doyle --- test/ui-e2e/.auth/setup.ts | 2 +- test/ui-e2e/run-ui-tests.sh | 2 +- test/ui-e2e/src/pages/LoginPage.ts | 2 +- test/ui-e2e/tests/ha-login.spec.ts | 122 ++++++++++++++++++++++++ test/ui-e2e/tests/resource-tree.spec.ts | 2 +- 5 files changed, 126 insertions(+), 4 deletions(-) create mode 100644 test/ui-e2e/tests/ha-login.spec.ts diff --git a/test/ui-e2e/.auth/setup.ts b/test/ui-e2e/.auth/setup.ts index 2a5ba878808..8cf9728ee04 100644 --- a/test/ui-e2e/.auth/setup.ts +++ b/test/ui-e2e/.auth/setup.ts @@ -61,7 +61,7 @@ setup('authenticate to OpenShift Cluster', async ({ page, baseURL }) => { //handle the openshift welcome tour modal if it appears try { const skipTourButton = page.getByRole('button', { name: /skip tour/i }); - //wait up to 5 seconds for the modal to pop up + //wait briefly for the modal to pop up await skipTourButton.waitFor({ state: 'visible', timeout: TIMEOUTS.short }); await skipTourButton.click(); console.log('Dismissed the OpenShift Welcome Tour modal.'); diff --git a/test/ui-e2e/run-ui-tests.sh b/test/ui-e2e/run-ui-tests.sh index d4dfa9b7ea7..0e090a3d3e0 100755 --- a/test/ui-e2e/run-ui-tests.sh +++ b/test/ui-e2e/run-ui-tests.sh @@ -87,7 +87,7 @@ echo " " if [ "$ENV" = "ci" ] || [ "$ENV" = "pipeline" ]; then echo "Running headlessly in automation ($ENV)..." - # CodeRabbit hard-fails + #coderabbit hard-fails npm ci || { echo "Error: npm ci failed."; exit 1; } if [ "$(uname -s)" = "Darwin" ]; then diff --git a/test/ui-e2e/src/pages/LoginPage.ts b/test/ui-e2e/src/pages/LoginPage.ts index a1b107c0ff1..8665c2d52a6 100644 --- a/test/ui-e2e/src/pages/LoginPage.ts +++ b/test/ui-e2e/src/pages/LoginPage.ts @@ -63,6 +63,6 @@ export class LoginPage { } //Success Checking make we land on the applications dashboard - await this.page.waitForURL('**/applications**', { timeout: 20000 }); + await this.page.waitForURL('**/applications**', { timeout: 30000 }); } } \ No newline at end of file diff --git a/test/ui-e2e/tests/ha-login.spec.ts b/test/ui-e2e/tests/ha-login.spec.ts new file mode 100644 index 00000000000..fa4804e92e2 --- /dev/null +++ b/test/ui-e2e/tests/ha-login.spec.ts @@ -0,0 +1,122 @@ +import { test, expect } from '@playwright/test'; +import { execSync } from 'child_process'; +import { LoginPage } from '../src/pages/LoginPage'; + +//run tests together (same ha state setup) +test.describe.configure({ mode: 'serial' }); + +test.describe('HA Login Verification', () => { + + //force fresh login + test.use({ storageState: { cookies: [], origins: [] } }); + + test.beforeAll(async () => { + test.setTimeout(360000); //6 mins for ha rollout + + console.log('\n[setup] Enabling High Availability (HA) for Argo CD...'); + try { + //patch cr + execSync('oc patch argocd openshift-gitops -n openshift-gitops --type=merge -p \'{"spec":{"ha":{"enabled":true}}}\'', { stdio: 'inherit' }); + + console.log('[setup] Polling cluster for new HA deployment (this may take a few minutes)...'); + let retries = 15; + let podsReady = false; + + while (retries > 0 && !podsReady) { + try { + execSync('oc wait --for=condition=Available deployment/openshift-gitops-redis-ha-haproxy -n openshift-gitops --timeout=30s', { stdio: 'pipe' }); + podsReady = true; + } catch (e) { + console.log(`[setup] HA proxy not provisioned yet. Retrying in 10s... (${retries} attempts left)`); + await new Promise(resolve => setTimeout(resolve, 10000)); + retries--; + } + } + + if (!podsReady) { + throw new Error('HA proxy deployment never appeared or became available after polling.'); + } + + console.log('[setup] Waiting for Operator to roll out HA-aware components...'); + + //wait for rollouts + execSync('oc rollout status statefulset/openshift-gitops-redis-ha-server -n openshift-gitops --timeout=300s', { stdio: 'inherit' }); + execSync('oc rollout status deployment/openshift-gitops-server -n openshift-gitops --timeout=300s', { stdio: 'inherit' }); + execSync('oc rollout status deployment/openshift-gitops-dex-server -n openshift-gitops --timeout=300s', { stdio: 'inherit' }); + + console.log('[setup] Rollouts complete. Giving cluster time to stabilize network routes...'); + await new Promise(resolve => setTimeout(resolve, 10000)); + + console.log('[setup] HA successfully enabled and stabilized.'); + } catch (error) { + console.error('[setup] Failed to enable HA. Aborting tests.', error); + throw error; + } + }); + + test.afterAll(async () => { + test.setTimeout(300000); //5 mins for teardown + + console.log('\n[teardown] Disabling High Availability (HA) to restore cluster state...'); + try { + //disable ha + execSync('oc patch argocd openshift-gitops -n openshift-gitops --type=merge -p \'{"spec":{"ha":{"enabled":false}}}\'', { stdio: 'inherit' }); + + //wait for rollbacks + execSync('oc wait --for=condition=Available deployment/openshift-gitops-server -n openshift-gitops --timeout=300s', { stdio: 'inherit' }); + execSync('oc rollout status deployment/openshift-gitops-dex-server -n openshift-gitops --timeout=300s', { stdio: 'inherit' }); + + //wait for ha components to delete + try { + execSync('oc wait --for=delete statefulset/openshift-gitops-redis-ha-server -n openshift-gitops --timeout=300s', { stdio: 'ignore' }); + execSync('oc wait --for=delete deployment/openshift-gitops-redis-ha-haproxy -n openshift-gitops --timeout=300s', { stdio: 'ignore' }); + } catch (e) { + //ignore if already deleted + } + + console.log('[teardown] Cluster successfully restored to non-HA state.'); + } catch (error) { + console.error('[teardown] Failed to disable HA during cleanup! Cluster may be in a dirty state.', error); + throw error; + } + }); + + test('Local Admin Login under HA', async ({ page }) => { + test.setTimeout(120000); + + let rawOutput = execSync('oc extract secret/openshift-gitops-cluster -n openshift-gitops --keys=admin.password --to=-', { timeout: 30000 }).toString(); + const adminPassword = rawOutput.split('\n').map(l => l.trim()).filter(l => l && !l.startsWith('#'))[0]; + + if (!adminPassword) { + throw new Error('failed to extract admin password from cluster secret'); + } + + await page.goto('/login?dex=none', { waitUntil: 'load' }); + + const userField = page.getByLabel(/username/i); + await userField.waitFor({ state: 'visible', timeout: 30000 }); + + //fill form + await userField.fill('admin'); + await page.locator('input[type="password"]').fill(adminPassword); + await page.getByRole('button', { name: /sign in/i }).click(); + + await expect(page.getByText('Applications', { exact: true }).first()).toBeVisible({ timeout: 30000 }); + }); + + test('OpenShift SSO Login under HA', async ({ page }) => { + test.setTimeout(120000); + + const loginPage = new LoginPage(page); + await loginPage.goto(); + + await loginPage.loginViaOpenShift( + process.env.CLUSTER_USER!, + process.env.CLUSTER_PASSWORD!, + process.env.IDP || 'kube:admin' + ); + + await expect(page.getByText('Applications', { exact: true }).first()).toBeVisible({ timeout: 30000 }); + }); + +}); \ No newline at end of file diff --git a/test/ui-e2e/tests/resource-tree.spec.ts b/test/ui-e2e/tests/resource-tree.spec.ts index e262fa9b221..4123e396f0b 100644 --- a/test/ui-e2e/tests/resource-tree.spec.ts +++ b/test/ui-e2e/tests/resource-tree.spec.ts @@ -6,7 +6,7 @@ test.describe('Argo CD Resource Tree and Pod Logs', () => { test.use({ storageState: '.auth/storageState.json' }); - test('Navigate to app details, open a Pod, and verify logs stream', async ({ page, managedApp, argoVersion }) => { + test('Navigate to app details, open a Pod, and verify logs stream', async ({ page, managedApp }) => { test.setTimeout(120000); const appsPage = new ApplicationsPage(page); From e5e604717a0ce9e4a6fe870e1a2c939caaecf5e8 Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Tue, 21 Jul 2026 12:22:45 +0100 Subject: [PATCH 6/7] address coderabbit feedback for timeouts Signed-off-by: Triona Doyle --- test/ui-e2e/tests/ha-login.spec.ts | 35 +++++++++++++++++++----------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/test/ui-e2e/tests/ha-login.spec.ts b/test/ui-e2e/tests/ha-login.spec.ts index fa4804e92e2..091067f5e7b 100644 --- a/test/ui-e2e/tests/ha-login.spec.ts +++ b/test/ui-e2e/tests/ha-login.spec.ts @@ -11,15 +11,15 @@ test.describe('HA Login Verification', () => { test.use({ storageState: { cookies: [], origins: [] } }); test.beforeAll(async () => { - test.setTimeout(360000); //6 mins for ha rollout + test.setTimeout(600000); //10 mins for ha rollout console.log('\n[setup] Enabling High Availability (HA) for Argo CD...'); try { - //patch cr - execSync('oc patch argocd openshift-gitops -n openshift-gitops --type=merge -p \'{"spec":{"ha":{"enabled":true}}}\'', { stdio: 'inherit' }); + //patch cr with strict timeout + execSync('oc patch argocd openshift-gitops -n openshift-gitops --type=merge -p \'{"spec":{"ha":{"enabled":true}}}\'', { stdio: 'inherit', timeout: 30000 }); console.log('[setup] Polling cluster for new HA deployment (this may take a few minutes)...'); - let retries = 15; + let retries = 30; let podsReady = false; while (retries > 0 && !podsReady) { @@ -59,20 +59,29 @@ test.describe('HA Login Verification', () => { console.log('\n[teardown] Disabling High Availability (HA) to restore cluster state...'); try { - //disable ha - execSync('oc patch argocd openshift-gitops -n openshift-gitops --type=merge -p \'{"spec":{"ha":{"enabled":false}}}\'', { stdio: 'inherit' }); + //disable ha with strict timeout + execSync('oc patch argocd openshift-gitops -n openshift-gitops --type=merge -p \'{"spec":{"ha":{"enabled":false}}}\'', { stdio: 'inherit', timeout: 30000 }); //wait for rollbacks execSync('oc wait --for=condition=Available deployment/openshift-gitops-server -n openshift-gitops --timeout=300s', { stdio: 'inherit' }); execSync('oc rollout status deployment/openshift-gitops-dex-server -n openshift-gitops --timeout=300s', { stdio: 'inherit' }); - //wait for ha components to delete - try { - execSync('oc wait --for=delete statefulset/openshift-gitops-redis-ha-server -n openshift-gitops --timeout=300s', { stdio: 'ignore' }); - execSync('oc wait --for=delete deployment/openshift-gitops-redis-ha-haproxy -n openshift-gitops --timeout=300s', { stdio: 'ignore' }); - } catch (e) { - //ignore if already deleted - } + //helper to independently wait for deletions and only ignore NotFound errors + const waitForDelete = (resource: string) => { + try { + execSync(`oc wait --for=delete ${resource} -n openshift-gitops --timeout=300s`, { stdio: 'pipe' }); + } catch (e: any) { + const stderr = e.stderr ? e.stderr.toString() : ''; + const message = e.message || ''; + if (!stderr.includes('NotFound') && !message.includes('NotFound')) { + throw e; //rethrow timeouts or api failures + } + } + }; + + //wait for ha components to delete independently + waitForDelete('statefulset/openshift-gitops-redis-ha-server'); + waitForDelete('deployment/openshift-gitops-redis-ha-haproxy'); console.log('[teardown] Cluster successfully restored to non-HA state.'); } catch (error) { From 480a0632b72efe513e330ee9bdd7fc5aeb830a1e Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Tue, 21 Jul 2026 12:51:34 +0100 Subject: [PATCH 7/7] use testInfo.setTimeout in hook fixtures per coderabbit feedback Signed-off-by: Triona Doyle --- test/ui-e2e/tests/ha-login.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ui-e2e/tests/ha-login.spec.ts b/test/ui-e2e/tests/ha-login.spec.ts index 091067f5e7b..81634abb8a2 100644 --- a/test/ui-e2e/tests/ha-login.spec.ts +++ b/test/ui-e2e/tests/ha-login.spec.ts @@ -10,8 +10,8 @@ test.describe('HA Login Verification', () => { //force fresh login test.use({ storageState: { cookies: [], origins: [] } }); - test.beforeAll(async () => { - test.setTimeout(600000); //10 mins for ha rollout + test.beforeAll(async ({}, testInfo) => { + testInfo.setTimeout(600000); //10 mins for ha rollout console.log('\n[setup] Enabling High Availability (HA) for Argo CD...'); try { @@ -54,8 +54,8 @@ test.describe('HA Login Verification', () => { } }); - test.afterAll(async () => { - test.setTimeout(300000); //5 mins for teardown + test.afterAll(async ({}, testInfo) => { + testInfo.setTimeout(300000); //5 mins for teardown console.log('\n[teardown] Disabling High Availability (HA) to restore cluster state...'); try {