Skip to content

Commit 1059742

Browse files
test: [M3-8919] - Fix Linode migration test failure caused by region label conflict (linode#11274)
* Fix failure caused by Frankfurt/Frankfurt 2 label conflict, remove deprecated helpers * Added changeset: Fix Linode migration test failure caused by region label conflicts
1 parent 65a19f9 commit 1059742

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
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 Linode migration test failure caused by region label conflicts ([#11274](https://github.com/linode/manager/pull/11274))

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

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { ui } from 'support/ui';
88
import { apiMatcher } from 'support/util/intercepts';
99
import { linodeFactory } from '@src/factories';
1010
import { mockGetLinodeDetails } from 'support/intercepts/linodes';
11-
import { getClick, fbtClick } from 'support/helpers';
1211
import { getRegionById } from 'support/util/regions';
1312
import {
1413
dcPricingMockLinodeTypes,
@@ -44,7 +43,7 @@ describe('Migrate linodes', () => {
4443

4544
ui.button.findByTitle('Enter Migration Queue').should('be.disabled');
4645
cy.findByText(`${initialRegion.label}`).should('be.visible');
47-
getClick('[data-qa-checked="false"]');
46+
cy.get('[data-qa-checked="false"]').click();
4847
cy.findByText(`North America: ${initialRegion.label}`).should('be.visible');
4948

5049
ui.regionSelect.find().click();
@@ -59,7 +58,12 @@ describe('Migrate linodes', () => {
5958
}
6059
).as('migrateReq');
6160

62-
fbtClick('Enter Migration Queue');
61+
ui.button
62+
.findByTitle('Enter Migration Queue')
63+
.should('be.visible')
64+
.should('be.enabled')
65+
.click();
66+
6367
cy.wait('@migrateReq').its('response.statusCode').should('eq', 200);
6468
});
6569

@@ -93,7 +97,7 @@ describe('Migrate linodes', () => {
9397

9498
ui.button.findByTitle('Enter Migration Queue').should('be.disabled');
9599
cy.findByText(`${initialRegion.label}`).should('be.visible');
96-
getClick('[data-qa-checked="false"]');
100+
cy.get('[data-qa-checked="false"]').click();
97101
cy.findByText(`North America: ${initialRegion.label}`).should('be.visible');
98102

99103
ui.regionSelect.find().click();
@@ -130,7 +134,11 @@ describe('Migrate linodes', () => {
130134
// intercept migration request and stub it, respond with 200
131135
mockMigrateLinode(mockLinode.id).as('migrateReq');
132136

133-
fbtClick('Enter Migration Queue');
137+
ui.button
138+
.findByTitle('Enter Migration Queue')
139+
.should('be.visible')
140+
.should('be.enabled')
141+
.click();
134142
cy.wait('@migrateReq').its('response.statusCode').should('eq', 200);
135143
});
136144

@@ -164,11 +172,17 @@ describe('Migrate linodes', () => {
164172

165173
ui.button.findByTitle('Enter Migration Queue').should('be.disabled');
166174
cy.findByText(`${initialRegion.label}`).should('be.visible');
167-
getClick('[data-qa-checked="false"]');
175+
cy.get('[data-qa-checked="false"]').click();
168176

169177
// Confirm that user cannot select the Linode's current DC when migrating.
170-
cy.findByText('New Region').click().type(`${initialRegion.label}{enter}`);
171-
cy.findByText('No results').should('be.visible');
178+
// TODO Consider refactoring this flow into its own test.
179+
ui.autocomplete.findByLabel('New Region').click().type(initialRegion.id);
180+
181+
ui.autocompletePopper.find().within(() => {
182+
cy.contains(initialRegion.id).should('not.exist');
183+
cy.findByText('No results').should('be.visible');
184+
});
185+
172186
// Confirm that DC pricing information does not show up
173187
cy.findByText(dcPricingCurrentPriceLabel).should('not.exist');
174188
cy.get('[data-testid="current-price-panel"]').should('not.exist');

0 commit comments

Comments
 (0)