Skip to content

Commit 93fd44e

Browse files
authored
test: [M3-10180] - Disable nodebalancerVpc flag in cypress tests (linode#12389)
* test: disabled nodebalancerVpc flag in cypress tests * Added changeset: Disable `nodebalancerVpc` flag in cypress tests
1 parent d20182e commit 93fd44e

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
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+
Disable `nodebalancerVpc` flag in cypress tests ([#12389](https://github.com/linode/manager/pull/12389))

packages/manager/cypress/e2e/core/vpc/vpc-create.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { linodeFactory, regionFactory } from '@linode/utilities';
22
import { grantsFactory, profileFactory } from '@linode/utilities';
33
import { subnetFactory, vpcFactory } from '@src/factories';
44
import { mockGetUser } from 'support/intercepts/account';
5+
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
56
/**
67
* @file Integration tests for VPC create flow.
78
*/
@@ -48,6 +49,13 @@ describe('VPC create flow', () => {
4849
* - Confirms that UI handles API errors gracefully.
4950
* - Confirms that UI redirects to created VPC page after creating a VPC.
5051
*/
52+
beforeEach(() => {
53+
// TODO - Remove mock once `nodebalancerVpc` feature flag is removed.
54+
mockAppendFeatureFlags({
55+
nodebalancerVpc: false,
56+
}).as('getFeatureFlags');
57+
});
58+
5159
it('can create a VPC', () => {
5260
const mockVPCRegion = extendRegion(
5361
regionFactory.build({
@@ -83,7 +91,7 @@ describe('VPC create flow', () => {
8391
mockGetRegions([mockVPCRegion]).as('getRegions');
8492

8593
cy.visitWithLogin('/vpcs/create');
86-
cy.wait('@getRegions');
94+
cy.wait(['@getRegions', '@getFeatureFlags']);
8795

8896
ui.regionSelect.find().click();
8997
cy.focused().type(`${mockVPCRegion.label}{enter}`);
@@ -281,7 +289,7 @@ describe('VPC create flow', () => {
281289
mockGetRegions([mockVPCRegion]).as('getRegions');
282290

283291
cy.visitWithLogin('/vpcs/create');
284-
cy.wait('@getRegions');
292+
cy.wait(['@getRegions', '@getFeatureFlags']);
285293

286294
ui.regionSelect.find().click().type(`${mockVPCRegion.label}{enter}`);
287295

packages/manager/cypress/e2e/core/vpc/vpc-linodes-update.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
mockDeleteLinodeConfigInterface,
1717
mockGetLinodeConfigs,
1818
} from 'support/intercepts/configs';
19+
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
1920
import { mockGetLinodes } from 'support/intercepts/linodes';
2021
import {
2122
mockCreateSubnet,
@@ -47,6 +48,13 @@ describe('VPC assign/unassign flows', () => {
4748
});
4849
});
4950

51+
beforeEach(() => {
52+
// TODO - Remove mock once `nodebalancerVpc` feature flag is removed.
53+
mockAppendFeatureFlags({
54+
nodebalancerVpc: false,
55+
}).as('getFeatureFlags');
56+
});
57+
5058
/*
5159
* - Confirms that can assign a Linode to the VPC when feature is enabled.
5260
*/
@@ -84,7 +92,7 @@ describe('VPC assign/unassign flows', () => {
8492
mockGetLinodes([mockLinode]).as('getLinodes');
8593

8694
cy.visitWithLogin(`/vpcs/${mockVPC.id}`);
87-
cy.wait(['@getVPC', '@getSubnets']);
95+
cy.wait(['@getVPC', '@getSubnets', '@getFeatureFlags']);
8896

8997
// confirm that vpc and subnet details get displayed
9098
cy.findByText(mockVPC.label).should('be.visible');
@@ -230,7 +238,7 @@ describe('VPC assign/unassign flows', () => {
230238
mockGetLinodes([mockLinode, mockSecondLinode]).as('getLinodes');
231239

232240
cy.visitWithLogin(`/vpcs/${mockVPC.id}`);
233-
cy.wait(['@getVPC', '@getSubnets', '@getLinodes']);
241+
cy.wait(['@getVPC', '@getSubnets', '@getLinodes', '@getFeatureFlags']);
234242

235243
// confirm that subnet should get displayed on VPC's detail page
236244
cy.findByText(mockVPC.label).should('be.visible');

0 commit comments

Comments
 (0)