Skip to content

Commit 71f5bbb

Browse files
test: [UIE-10347] - Fix Cypress test failures following 1.159.0 release (linode#13438)
* Fix Cypress test failures following 1.159.0 release * Added changeset: Fix Cypress test failures following v1.159.0 release --------- Co-authored-by: Alban Bailly <130582365+abailly-akamai@users.noreply.github.com>
1 parent 7b504a7 commit 71f5bbb

File tree

4 files changed

+35
-33
lines changed

4 files changed

+35
-33
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 Cypress test failures following v1.159.0 release ([#13438](https://github.com/linode/manager/pull/13438))

packages/manager/cypress/e2e/core/cloudpulse/alerting-notification-channel-permission-tests.spec.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ describe('Notification Channel Listing Page — Access Control', () => {
3737
mockAppendFeatureFlags(flags);
3838
cy.visitWithLogin('/linodes');
3939

40-
ui.nav.findItemByTitle('Alerts').as('alertsNav');
41-
cy.get('@alertsNav').scrollIntoView();
42-
cy.get('@alertsNav').should('be.visible').click();
43-
40+
ui.nav.findItemByTitle('Alerts').scrollIntoView();
41+
ui.nav.findItemByTitle('Alerts').should('be.visible').click();
4442
ui.tabList
4543
.findTabByTitle('Notification Channels')
4644
.should('be.visible')
@@ -65,9 +63,8 @@ describe('Notification Channel Listing Page — Access Control', () => {
6563
mockAppendFeatureFlags(flags);
6664
cy.visitWithLogin('/linodes');
6765

68-
ui.nav.findItemByTitle('Alerts').as('alertsNav');
69-
cy.get('@alertsNav').scrollIntoView();
70-
cy.get('@alertsNav').should('be.visible').click();
66+
ui.nav.findItemByTitle('Alerts').scrollIntoView();
67+
ui.nav.findItemByTitle('Alerts').should('be.visible').click();
7168

7269
// Tab should not render at all
7370
ui.tabList.findTabByTitle('Notification Channels').should('not.exist');

packages/manager/cypress/e2e/core/linodes/smoke-linode-landing-table.spec.ts

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,29 @@ describe('linode landing checks', () => {
9393

9494
it('checks the landing page side menu items', () => {
9595
cy.findByTitle('Akamai - Cloud Manager').should('be.visible');
96-
cy.findByTestId('menu-item-Linodes').should('be.visible');
97-
cy.findByTestId('menu-item-Volumes').should('be.visible');
98-
cy.findByTestId('menu-item-NodeBalancers').should('be.visible');
99-
cy.findByTestId('menu-item-Firewalls').should('be.visible');
100-
cy.findByTestId('menu-item-StackScripts').should('be.visible');
101-
cy.findByTestId('menu-item-Images').should('be.visible');
102-
cy.findByTestId('menu-item-Domains').should('be.visible');
103-
cy.findByTestId('menu-item-Kubernetes').should('be.visible');
104-
cy.findByTestId('menu-item-Object Storage').should('be.visible');
105-
cy.findByTestId('menu-item-Longview').should('be.visible');
106-
cy.findByTestId('menu-item-Marketplace').should('be.visible');
107-
cy.findByTestId('menu-item-Billing').scrollIntoView();
108-
cy.findByTestId('menu-item-Billing').should('be.visible');
109-
cy.findByTestId('menu-item-Account Settings').should('be.visible');
110-
cy.findByTestId('menu-item-Help & Support').should('be.visible');
96+
97+
const expectedNavItems = [
98+
'Linodes',
99+
'Volumes',
100+
'NodeBalancers',
101+
'Firewalls',
102+
'StackScripts',
103+
'Images',
104+
'Domains',
105+
'Kubernetes',
106+
'Object Storage',
107+
'Longview',
108+
'Quick Deploy Apps',
109+
'Partner Referrals',
110+
'Billing',
111+
'Account Settings',
112+
'Help & Support',
113+
];
114+
115+
expectedNavItems.forEach((navItem) => {
116+
ui.nav.findItemByTitle(navItem).scrollIntoView();
117+
ui.nav.findItemByTitle(navItem).should('be.visible');
118+
});
111119
});
112120

113121
it('checks the landing top menu items', () => {
@@ -271,7 +279,7 @@ describe('linode landing checks', () => {
271279
cy.get(commonLocators.topMenuCreateItemsLocator.marketplaceOneClickLink)
272280
.should('be.visible')
273281
.within(() => {
274-
cy.findByText('Marketplace').should('be.visible');
282+
cy.findByText('Quick Deploy Apps').should('be.visible');
275283
cy.findByText('Deploy applications with ease').should('be.visible');
276284
});
277285
});

packages/manager/cypress/e2e/core/objectStorage/enable-object-storage.spec.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ import { mockGetRegions } from 'support/intercepts/regions';
2525
import { ui } from 'support/ui';
2626
import { randomLabel } from 'support/util/random';
2727

28-
import type {
29-
AccountSettings,
30-
PriceType,
31-
Region,
32-
} from '@linode/api-v4';
28+
import type { AccountSettings, PriceType, Region } from '@linode/api-v4';
3329

3430
// Various messages, notes, and warnings that may be shown when enabling Object Storage
3531
// under different circumstances.
@@ -187,11 +183,7 @@ describe('Object Storage enrollment', () => {
187183
mockGetAccessKeys([]);
188184

189185
cy.visitWithLogin('/object-storage/buckets');
190-
cy.wait([
191-
'@getAccountSettings',
192-
'@getBuckets',
193-
'@getRegions',
194-
]);
186+
cy.wait(['@getAccountSettings', '@getBuckets', '@getRegions']);
195187

196188
// Confirm that empty-state message is shown before proceeding.
197189
cy.findByText('S3-compatible storage solution').should('be.visible');

0 commit comments

Comments
 (0)