Skip to content

Commit 91913c9

Browse files
test: [UIE-9804] - Fix e2e tests impacted by Generational Plans release (#13192)
* fix what i can fix * Added changeset: Fix e2e tests impacted by Generational Plans release * one more
1 parent 1414925 commit 91913c9

File tree

5 files changed

+27
-107
lines changed

5 files changed

+27
-107
lines changed
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+
Fix e2e tests impacted by Generational Plans release ([#13192](https://github.com/linode/manager/pull/13192))

packages/manager/cypress/e2e/core/kubernetes/lke-create.spec.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,13 @@ describe('LKE Cluster Creation with APL enabled', () => {
446446

447447
cy.wait('@getRegionAvailability');
448448

449-
cy.findByTestId('apl-label').should('have.text', 'Akamai App Platform');
450-
cy.findByTestId('newFeatureChip')
451-
.should('be.visible')
452-
.should('have.text', 'new');
449+
cy.findByTestId('application-platform-form').within(() => {
450+
cy.findByTestId('apl-label').should('have.text', 'Akamai App Platform');
451+
cy.findByTestId('newFeatureChip')
452+
.should('be.visible')
453+
.should('have.text', 'new');
454+
});
455+
453456
cy.findByTestId('apl-radio-button-yes').should('be.visible').click();
454457
cy.findByTestId('ha-radio-button-yes').should('be.disabled');
455458
cy.get(
@@ -1926,7 +1929,7 @@ describe('smoketest for Nvidia Blackwell GPUs in kubernetes/create page', () =>
19261929
ui.tabList.findTabByTitle('GPU').should('be.visible').click();
19271930

19281931
cy.findByRole('table', {
1929-
name: 'List of NVIDIA RTX PRO 6000 Blackwell Server Edition Plans',
1932+
name: 'List of Linode Plans',
19301933
}).within(() => {
19311934
cy.get('tbody tr')
19321935
.should('have.length', 4)

packages/manager/cypress/e2e/core/linodes/create-linode-blackwell.spec.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,8 @@ describe('smoketest for Nvidia blackwell GPUs in linodes/create page', () => {
7373
cy.get('[data-qa-error="true"]').should('be.visible');
7474

7575
cy.findByRole('table', {
76-
name: 'List of NVIDIA RTX PRO 6000 Blackwell Server Edition Plans',
76+
name: 'List of Linode Plans',
7777
}).within(() => {
78-
cy.findByText('NVIDIA RTX PRO 6000 Blackwell Server Edition').should(
79-
'be.visible'
80-
);
8178
cy.get('tbody tr')
8279
.should('have.length', 4)
8380
.each((_, index) => {
@@ -107,11 +104,8 @@ describe('smoketest for Nvidia blackwell GPUs in linodes/create page', () => {
107104
});
108105

109106
cy.findByRole('table', {
110-
name: 'List of NVIDIA RTX PRO 6000 Blackwell Server Edition Plans',
107+
name: 'List of Linode Plans',
111108
}).within(() => {
112-
cy.findByText('NVIDIA RTX PRO 6000 Blackwell Server Edition').should(
113-
'be.visible'
114-
);
115109
cy.get('tbody tr')
116110
.should('have.length', 4)
117111
.each((_, index) => {

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

Lines changed: 4 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { linodeCreatePage } from 'support/ui/pages';
3030
import { cleanUp } from 'support/util/cleanup';
3131
import { randomLabel, randomNumber, randomString } from 'support/util/random';
3232
import { chooseRegion } from 'support/util/regions';
33-
import { skip } from 'support/util/skip';
3433

3534
import { accountFactory, accountUserFactory } from 'src/factories';
3635

@@ -156,81 +155,16 @@ describe('Create Linode', () => {
156155
});
157156

158157
/*
159-
* - Confirms Premium Plan Linode can be created end-to-end.
160-
* - Confirms creation flow, that Linode boots, and that UI reflects status.
158+
* - Confirms Premium Plan Tab is disabled in Linodes Create
161159
*/
162-
it(`creates a Premium CPU Linode`, () => {
163-
cy.tag('env:premiumPlans');
164-
165-
// TODO Allow `chooseRegion` to be configured not to throw.
166-
const linodeRegion = (() => {
167-
try {
168-
return chooseRegion({
169-
capabilities: ['Linodes', 'Premium Plans', 'Vlans'],
170-
});
171-
} catch {
172-
skip();
173-
}
174-
return;
175-
})()!;
176-
177-
const linodeLabel = randomLabel();
178-
const planId = 'g7-premium-2';
179-
const planLabel = 'Premium 4 GB';
180-
const planType = 'Premium CPU';
181-
160+
it(`should feature a disabled Premium Tab in Linodes Create`, () => {
182161
interceptGetProfile().as('getProfile');
183162
interceptCreateLinode().as('createLinode');
184163
cy.visitWithLogin('/linodes/create');
185164

186-
// Set Linode label, OS, plan type, password, etc.
187-
linodeCreatePage.setLabel(linodeLabel);
188-
linodeCreatePage.selectImage('Debian 12');
189-
linodeCreatePage.selectRegionById(linodeRegion.id);
190-
linodeCreatePage.selectPlan(planType, planLabel);
191-
linodeCreatePage.setRootPassword(randomString(32));
192-
193-
// Confirm information in summary is shown as expected.
194-
cy.get('[data-qa-linode-create-summary]').scrollIntoView();
195-
cy.get('[data-qa-linode-create-summary]').within(() => {
196-
cy.findByText('Debian 12').should('be.visible');
197-
cy.findByText(linodeRegion.label).should('be.visible');
198-
cy.findByText(planLabel).should('be.visible');
199-
});
200-
201-
// Create Linode and confirm it's provisioned as expected.
202-
ui.button
203-
.findByTitle('Create Linode')
165+
cy.findByRole('tab', { name: 'Premium CPU' })
204166
.should('be.visible')
205-
.should('be.enabled')
206-
.click();
207-
208-
cy.wait('@createLinode').then((xhr) => {
209-
const requestPayload = xhr.request.body;
210-
const responsePayload = xhr.response?.body;
211-
212-
// Confirm that API request and response contain expected data
213-
expect(requestPayload['label']).to.equal(linodeLabel);
214-
expect(requestPayload['region']).to.equal(linodeRegion.id);
215-
expect(requestPayload['type']).to.equal(planId);
216-
217-
expect(responsePayload['label']).to.equal(linodeLabel);
218-
expect(responsePayload['region']).to.equal(linodeRegion.id);
219-
expect(responsePayload['type']).to.equal(planId);
220-
221-
// Confirm that Cloud redirects to details page
222-
cy.url().should('endWith', `/linodes/${responsePayload['id']}`);
223-
});
224-
225-
cy.wait('@getProfile').then((xhr) => {
226-
username = xhr.response?.body.username;
227-
});
228-
229-
// Confirm toast notification should appear on Linode create.
230-
ui.toast.assertMessage(`Your Linode ${linodeLabel} is being created.`);
231-
cy.findByText('RUNNING', { timeout: LINODE_CREATE_TIMEOUT }).should(
232-
'be.visible'
233-
);
167+
.should('be.disabled');
234168
});
235169
});
236170
});

packages/manager/cypress/e2e/core/linodes/plan-selection.spec.ts

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ describe('displays specific linode plans for GPU', () => {
390390
}).as('getFeatureFlags');
391391
});
392392

393-
it('Should render divided tables when GPU divider enabled', () => {
393+
it('Should render GPU plans in Linodes Create', () => {
394394
cy.visitWithLogin('/linodes/create');
395395
cy.wait(['@getRegions', '@getLinodeTypes', '@getFeatureFlags']);
396396
ui.regionSelect.find().click();
@@ -406,19 +406,11 @@ describe('displays specific linode plans for GPU', () => {
406406
cy.get(notices.unavailable).should('be.visible');
407407

408408
cy.findByRole('table', {
409-
name: 'List of NVIDIA RTX 4000 Ada Plans',
409+
name: 'List of Linode Plans',
410410
}).within(() => {
411-
cy.findByText('NVIDIA RTX 4000 Ada').should('be.visible');
412-
cy.findAllByRole('row').should('have.length', 2);
413-
cy.get('[id="gpu-2"]').should('be.disabled');
414-
});
415-
416-
cy.findByRole('table', {
417-
name: 'List of NVIDIA Quadro RTX 6000 Plans',
418-
}).within(() => {
419-
cy.findByText('NVIDIA Quadro RTX 6000').should('be.visible');
420-
cy.findAllByRole('row').should('have.length', 2);
411+
cy.findAllByRole('row').should('have.length', 3);
421412
cy.get('[id="gpu-1"]').should('be.disabled');
413+
cy.get('[id="gpu-2"]').should('be.disabled');
422414
});
423415
});
424416
});
@@ -439,7 +431,7 @@ describe('displays specific kubernetes plans for GPU', () => {
439431
}).as('getFeatureFlags');
440432
});
441433

442-
it('Should render divided tables when GPU divider enabled', () => {
434+
it('Should render GPU plans in Kubernetes Create', () => {
443435
cy.visitWithLogin('/kubernetes/create');
444436
cy.wait(['@getRegions', '@getLinodeTypes', '@getFeatureFlags']);
445437
ui.regionSelect.find().click();
@@ -455,23 +447,15 @@ describe('displays specific kubernetes plans for GPU', () => {
455447
cy.get(notices.unavailable).should('be.visible');
456448

457449
cy.findByRole('table', {
458-
name: 'List of NVIDIA RTX 4000 Ada Plans',
450+
name: 'List of Linode Plans',
459451
}).within(() => {
460-
cy.findByText('NVIDIA RTX 4000 Ada').should('be.visible');
461-
cy.findAllByRole('row').should('have.length', 2);
452+
cy.findAllByRole('row').should('have.length', 3);
453+
cy.get('[data-qa-plan-row="gpu-1"]').should('have.attr', 'disabled');
462454
cy.get('[data-qa-plan-row="gpu-2 Ada"]').should(
463455
'have.attr',
464456
'disabled'
465457
);
466458
});
467-
468-
cy.findByRole('table', {
469-
name: 'List of NVIDIA Quadro RTX 6000 Plans',
470-
}).within(() => {
471-
cy.findByText('NVIDIA Quadro RTX 6000').should('be.visible');
472-
cy.findAllByRole('row').should('have.length', 2);
473-
cy.get('[data-qa-plan-row="gpu-1"]').should('have.attr', 'disabled');
474-
});
475459
});
476460
});
477461
});

0 commit comments

Comments
 (0)