Skip to content

Commit c18c328

Browse files
change: [M3-9951] - Expose the "CY_TEST_RESOURCE_PREFIX" environment variable to Cypress Docker containers (linode#12766)
* Expose the "CY_TEST_RESOURCE_PREFIX", "CY_TEST_SPLIT_RUN_WEIGHTS", and "CY_TEST_GENWEIGHTS" environment variables to our Cypress Docker containers * Temporarily skip landing page power on/power off/reboot tests pending M3-10588 * Add changesets
1 parent c686656 commit c18c328

File tree

4 files changed

+41
-11
lines changed

4 files changed

+41
-11
lines changed

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ x-e2e-env:
3838
CY_TEST_TAGS: ${CY_TEST_TAGS}
3939
CY_TEST_DISABLE_RETRIES: ${CY_TEST_DISABLE_RETRIES}
4040
CY_TEST_RESET_PREFERENCES: ${CY_TEST_RESET_PREFERENCES}
41+
CY_TEST_RESOURCE_PREFIX: ${CY_TEST_RESOURCE_PREFIX}
4142

4243
# Cypress environment variables for alternative parallelization.
4344
CY_TEST_SPLIT_RUN: ${CY_TEST_SPLIT_RUN}
4445
CY_TEST_SPLIT_RUN_TOTAL: ${CY_TEST_SPLIT_RUN_TOTAL}
4546
CY_TEST_SPLIT_RUN_INDEX: ${CY_TEST_SPLIT_RUN_INDEX}
47+
CY_TEST_SPLIT_RUN_WEIGHTS: ${CY_TEST_SPLIT_RUN_WEIGHTS}
4648

4749
# Cypress performance.
4850
CY_TEST_ACCOUNT_CACHE_DIR: ${CY_TEST_ACCOUNT_CACHE_DIR}
@@ -51,6 +53,7 @@ x-e2e-env:
5153
CY_TEST_JUNIT_REPORT: ${CY_TEST_JUNIT_REPORT}
5254
CY_TEST_HTML_REPORT: ${CY_TEST_HTML_REPORT}
5355
CY_TEST_USER_REPORT: ${CY_TEST_USER_REPORT}
56+
CY_TEST_GENWEIGHTS: ${CY_TEST_GENWEIGHTS}
5457

5558
# Cloud Manager build environment.
5659
HOME: /home/node
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Tech Stories
3+
---
4+
5+
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))
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Tests
3+
---
4+
5+
Temporarily skip Linode landing page power on/off and reboot tests ([#12766](https://github.com/linode/manager/pull/12766))

packages/manager/cypress/e2e/core/linodes/switch-linode-state.spec.ts

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { Linode } from '@linode/api-v4';
88

99
authenticate();
1010
describe('switch linode state', () => {
11-
before(() => {
11+
beforeEach(() => {
1212
cleanUp(['linodes']);
1313
cy.tag('method:e2e');
1414
});
@@ -19,7 +19,8 @@ describe('switch linode state', () => {
1919
* - Confirms that landing page UI updates to reflect Linode power state.
2020
* - Does not wait for Linode to finish being shut down before succeeding.
2121
*/
22-
it('powers off a linode from landing page', () => {
22+
it.skip('powers off a linode from landing page', () => {
23+
// TODO M3-10588 - Unskip landing page power off test, evaluate stability.
2324
// Use `vlan_no_internet` security method.
2425
// This works around an issue where the Linode API responds with a 400
2526
// when attempting to reboot shortly after booting up when the Linode is
@@ -28,8 +29,11 @@ describe('switch linode state', () => {
2829
createTestLinode({ booted: true }, { securityMethod: 'vlan_no_internet' })
2930
).then((linode: Linode) => {
3031
cy.visitWithLogin('/linodes');
31-
cy.get(`[data-qa-linode="${linode.label}"]`)
32+
33+
cy.findByText(linode.label).scrollIntoView();
34+
cy.findByText(linode.label)
3235
.should('be.visible')
36+
.closest('tr')
3337
.within(() => {
3438
cy.contains('Running', { timeout: LINODE_CREATE_TIMEOUT }).should(
3539
'be.visible'
@@ -54,8 +58,9 @@ describe('switch linode state', () => {
5458
.click();
5559
});
5660

57-
cy.get(`[data-qa-linode="${linode.label}"]`)
61+
cy.findByText(linode.label)
5862
.should('be.visible')
63+
.closest('tr')
5964
.within(() => {
6065
cy.contains('Shutting Down').should('be.visible');
6166
});
@@ -110,12 +115,15 @@ describe('switch linode state', () => {
110115
* - Confirms that landing page UI updates to reflect Linode power state.
111116
* - Waits for Linode to finish booting up before succeeding.
112117
*/
113-
it('powers on a linode from landing page', () => {
118+
it.skip('powers on a linode from landing page', () => {
119+
// TODO M3-10588 - Unskip landing page power on test, evaluate stability.
114120
cy.defer(() => createTestLinode({ booted: false })).then(
115121
(linode: Linode) => {
116122
cy.visitWithLogin('/linodes');
117-
cy.get(`[data-qa-linode="${linode.label}"]`)
123+
cy.findByText(linode.label).scrollIntoView();
124+
cy.findByText(linode.label)
118125
.should('be.visible')
126+
.closest('tr')
119127
.within(() => {
120128
cy.contains('Offline', { timeout: LINODE_CREATE_TIMEOUT }).should(
121129
'be.visible'
@@ -140,10 +148,14 @@ describe('switch linode state', () => {
140148
.click();
141149
});
142150

143-
cy.get(`[data-qa-linode="${linode.label}"]`)
151+
cy.findByText(linode.label).scrollIntoView();
152+
cy.findByText(linode.label)
144153
.should('be.visible')
154+
.closest('tr')
145155
.within(() => {
146-
cy.contains('Booting').should('be.visible');
156+
cy.contains('Booting', { timeout: LINODE_CREATE_TIMEOUT }).should(
157+
'be.visible'
158+
);
147159
cy.contains('Running', { timeout: LINODE_CREATE_TIMEOUT }).should(
148160
'be.visible'
149161
);
@@ -196,7 +208,9 @@ describe('switch linode state', () => {
196208
* - Confirms that landing page UI updates to reflect Linode power state.
197209
* - Does not wait for Linode to finish rebooting before succeeding.
198210
*/
199-
it('reboots a linode from landing page', () => {
211+
it.skip('reboots a linode from landing page', () => {
212+
// TODO M3-10588 - Unskip landing page reboot test, evaluate stability.
213+
200214
// Use `vlan_no_internet` security method.
201215
// This works around an issue where the Linode API responds with a 400
202216
// when attempting to reboot shortly after booting up when the Linode is
@@ -205,8 +219,10 @@ describe('switch linode state', () => {
205219
createTestLinode({ booted: true }, { securityMethod: 'vlan_no_internet' })
206220
).then((linode: Linode) => {
207221
cy.visitWithLogin('/linodes');
208-
cy.get(`[data-qa-linode="${linode.label}"]`)
222+
cy.findByText(linode.label).scrollIntoView();
223+
cy.findByText(linode.label)
209224
.should('be.visible')
225+
.closest('tr')
210226
.within(() => {
211227
cy.contains('Running', { timeout: LINODE_CREATE_TIMEOUT }).should(
212228
'be.visible'
@@ -231,8 +247,9 @@ describe('switch linode state', () => {
231247
.click();
232248
});
233249

234-
cy.get(`[data-qa-linode="${linode.label}"]`)
250+
cy.findByText(linode.label)
235251
.should('be.visible')
252+
.closest('tr')
236253
.within(() => {
237254
cy.contains('Rebooting').should('be.visible');
238255
});

0 commit comments

Comments
 (0)