From 345d888f4ab9301c305d0b29895743f8b3805180 Mon Sep 17 00:00:00 2001 From: Joe D'Amore Date: Mon, 25 Aug 2025 13:53:58 -0400 Subject: [PATCH 1/5] Expose the "CY_TEST_RESOURCE_PREFIX" environment variable to our Cypress Docker containers --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index f37da3eaccd..a9cde1200ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,7 @@ x-e2e-env: CY_TEST_TAGS: ${CY_TEST_TAGS} CY_TEST_DISABLE_RETRIES: ${CY_TEST_DISABLE_RETRIES} CY_TEST_RESET_PREFERENCES: ${CY_TEST_RESET_PREFERENCES} + CY_TEST_RESOURCE_PREFIX: ${CY_TEST_RESOURCE_PREFIX} # Cypress environment variables for alternative parallelization. CY_TEST_SPLIT_RUN: ${CY_TEST_SPLIT_RUN} From ec1d334787d1e8cd7cc4546e93e154f6c230b268 Mon Sep 17 00:00:00 2001 From: Joe D'Amore Date: Wed, 27 Aug 2025 13:22:07 -0400 Subject: [PATCH 2/5] Pass CY_TEST_SPLIT_RUN_WEIGHTS and CY_TEST_GENWEIGHTS to Docker containers --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index a9cde1200ca..5376d075f2e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,6 +44,7 @@ x-e2e-env: CY_TEST_SPLIT_RUN: ${CY_TEST_SPLIT_RUN} CY_TEST_SPLIT_RUN_TOTAL: ${CY_TEST_SPLIT_RUN_TOTAL} CY_TEST_SPLIT_RUN_INDEX: ${CY_TEST_SPLIT_RUN_INDEX} + CY_TEST_SPLIT_RUN_WEIGHTS: ${CY_TEST_SPLIT_RUN_WEIGHTS} # Cypress performance. CY_TEST_ACCOUNT_CACHE_DIR: ${CY_TEST_ACCOUNT_CACHE_DIR} @@ -52,6 +53,7 @@ x-e2e-env: CY_TEST_JUNIT_REPORT: ${CY_TEST_JUNIT_REPORT} CY_TEST_HTML_REPORT: ${CY_TEST_HTML_REPORT} CY_TEST_USER_REPORT: ${CY_TEST_USER_REPORT} + CY_TEST_GENWEIGHTS: ${CY_TEST_GENWEIGHTS} # Cloud Manager build environment. HOME: /home/node From 4ab20a037007a00d5adcbcd8c62d576f5e84c2cc Mon Sep 17 00:00:00 2001 From: Joe D'Amore Date: Tue, 2 Sep 2025 11:00:37 -0400 Subject: [PATCH 3/5] Experimental: improve Linode power on/power off/reboot test stability --- .../core/linodes/switch-linode-state.spec.ts | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts b/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts index 88ab9e12e04..c3d5d5e7433 100644 --- a/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts +++ b/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts @@ -8,7 +8,7 @@ import type { Linode } from '@linode/api-v4'; authenticate(); describe('switch linode state', () => { - before(() => { + beforeEach(() => { cleanUp(['linodes']); cy.tag('method:e2e'); }); @@ -28,8 +28,11 @@ describe('switch linode state', () => { createTestLinode({ booted: true }, { securityMethod: 'vlan_no_internet' }) ).then((linode: Linode) => { cy.visitWithLogin('/linodes'); - cy.get(`[data-qa-linode="${linode.label}"]`) + + cy.findByText(linode.label).scrollIntoView(); + cy.findByText(linode.label) .should('be.visible') + .closest('tr') .within(() => { cy.contains('Running', { timeout: LINODE_CREATE_TIMEOUT }).should( 'be.visible' @@ -54,8 +57,9 @@ describe('switch linode state', () => { .click(); }); - cy.get(`[data-qa-linode="${linode.label}"]`) + cy.findByText(linode.label) .should('be.visible') + .closest('tr') .within(() => { cy.contains('Shutting Down').should('be.visible'); }); @@ -114,8 +118,10 @@ describe('switch linode state', () => { cy.defer(() => createTestLinode({ booted: false })).then( (linode: Linode) => { cy.visitWithLogin('/linodes'); - cy.get(`[data-qa-linode="${linode.label}"]`) + cy.findByText(linode.label).scrollIntoView(); + cy.findByText(linode.label) .should('be.visible') + .closest('tr') .within(() => { cy.contains('Offline', { timeout: LINODE_CREATE_TIMEOUT }).should( 'be.visible' @@ -140,10 +146,14 @@ describe('switch linode state', () => { .click(); }); - cy.get(`[data-qa-linode="${linode.label}"]`) + cy.findByText(linode.label).scrollIntoView(); + cy.findByText(linode.label) .should('be.visible') + .closest('tr') .within(() => { - cy.contains('Booting').should('be.visible'); + cy.contains('Booting', { timeout: LINODE_CREATE_TIMEOUT }).should( + 'be.visible' + ); cy.contains('Running', { timeout: LINODE_CREATE_TIMEOUT }).should( 'be.visible' ); @@ -205,8 +215,10 @@ describe('switch linode state', () => { createTestLinode({ booted: true }, { securityMethod: 'vlan_no_internet' }) ).then((linode: Linode) => { cy.visitWithLogin('/linodes'); - cy.get(`[data-qa-linode="${linode.label}"]`) + cy.findByText(linode.label).scrollIntoView(); + cy.findByText(linode.label) .should('be.visible') + .closest('tr') .within(() => { cy.contains('Running', { timeout: LINODE_CREATE_TIMEOUT }).should( 'be.visible' @@ -231,8 +243,9 @@ describe('switch linode state', () => { .click(); }); - cy.get(`[data-qa-linode="${linode.label}"]`) + cy.findByText(linode.label) .should('be.visible') + .closest('tr') .within(() => { cy.contains('Rebooting').should('be.visible'); }); From 05406cb68db58d50b14e20a97caa856147aeaea4 Mon Sep 17 00:00:00 2001 From: Joe D'Amore Date: Fri, 5 Sep 2025 10:01:21 -0400 Subject: [PATCH 4/5] Temporarily skip landing page power on/power off/reboot tests pending M3-10588 --- .../e2e/core/linodes/switch-linode-state.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts b/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts index c3d5d5e7433..4b26fa9b248 100644 --- a/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts +++ b/packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts @@ -19,7 +19,8 @@ describe('switch linode state', () => { * - Confirms that landing page UI updates to reflect Linode power state. * - Does not wait for Linode to finish being shut down before succeeding. */ - it('powers off a linode from landing page', () => { + it.skip('powers off a linode from landing page', () => { + // TODO M3-10588 - Unskip landing page power off test, evaluate stability. // Use `vlan_no_internet` security method. // This works around an issue where the Linode API responds with a 400 // when attempting to reboot shortly after booting up when the Linode is @@ -114,7 +115,8 @@ describe('switch linode state', () => { * - Confirms that landing page UI updates to reflect Linode power state. * - Waits for Linode to finish booting up before succeeding. */ - it('powers on a linode from landing page', () => { + it.skip('powers on a linode from landing page', () => { + // TODO M3-10588 - Unskip landing page power on test, evaluate stability. cy.defer(() => createTestLinode({ booted: false })).then( (linode: Linode) => { cy.visitWithLogin('/linodes'); @@ -206,7 +208,9 @@ describe('switch linode state', () => { * - Confirms that landing page UI updates to reflect Linode power state. * - Does not wait for Linode to finish rebooting before succeeding. */ - it('reboots a linode from landing page', () => { + it.skip('reboots a linode from landing page', () => { + // TODO M3-10588 - Unskip landing page reboot test, evaluate stability. + // Use `vlan_no_internet` security method. // This works around an issue where the Linode API responds with a 400 // when attempting to reboot shortly after booting up when the Linode is From db75d537517b9d88e2589316cd767ba0ef99a2ca Mon Sep 17 00:00:00 2001 From: Joe D'Amore Date: Tue, 9 Sep 2025 17:00:54 -0400 Subject: [PATCH 5/5] Add changesets --- .../.changeset/pr-12766-tech-stories-1757451408820.md | 5 +++++ packages/manager/.changeset/pr-12766-tests-1757451467483.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 packages/manager/.changeset/pr-12766-tech-stories-1757451408820.md create mode 100644 packages/manager/.changeset/pr-12766-tests-1757451467483.md diff --git a/packages/manager/.changeset/pr-12766-tech-stories-1757451408820.md b/packages/manager/.changeset/pr-12766-tech-stories-1757451408820.md new file mode 100644 index 00000000000..af4a7ab85c8 --- /dev/null +++ b/packages/manager/.changeset/pr-12766-tech-stories-1757451408820.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tech Stories +--- + +Pass "CY_TEST_RESOURCE_PREFIX", "CY_TEST_GENWEIGHTS", and "CY_TEST_SPLIT_RUN_WEIGHTS" environment variables to Cypress containers ([#12766](https://github.com/linode/manager/pull/12766)) diff --git a/packages/manager/.changeset/pr-12766-tests-1757451467483.md b/packages/manager/.changeset/pr-12766-tests-1757451467483.md new file mode 100644 index 00000000000..ee82c1421e3 --- /dev/null +++ b/packages/manager/.changeset/pr-12766-tests-1757451467483.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tests +--- + +Temporarily skip Linode landing page power on/off and reboot tests ([#12766](https://github.com/linode/manager/pull/12766))