Skip to content

Commit 823b828

Browse files
feat: [UIE-9685] - Proactive IAM e2e gating (#13120)
* prepare e2e for IAM * Added changeset: Proactive IAM e2e gating * revert volume drawer delete * more fixes * Fix failing rebuild tests by ensuring expected content is on-screen --------- Co-authored-by: Joe D'Amore <[email protected]>
1 parent 738f57d commit 823b828

16 files changed

+102
-2
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+
Proactive IAM e2e gating ([#13120](https://github.com/linode/manager/pull/13120))

packages/manager/cypress/e2e/core/account/account-cancellation.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
mockCancelAccountError,
1414
mockGetAccount,
1515
} from 'support/intercepts/account';
16+
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
1617
import { mockWebpageUrl } from 'support/intercepts/general';
1718
import {
1819
mockGetProfile,
@@ -35,6 +36,14 @@ import {
3536
import type { CancelAccount } from '@linode/api-v4';
3637

3738
describe('Account cancellation', () => {
39+
beforeEach(() => {
40+
mockAppendFeatureFlags({
41+
iam: {
42+
enabled: false,
43+
},
44+
});
45+
});
46+
3847
/*
3948
* - Confirms that a user can cancel their account from the Account Settings page.
4049
* - Confirms that user is warned that account cancellation is destructive.
@@ -227,6 +236,13 @@ describe('Account cancellation', () => {
227236
});
228237

229238
describe('Parent/Child account cancellation', () => {
239+
beforeEach(() => {
240+
mockAppendFeatureFlags({
241+
iam: {
242+
enabled: false,
243+
},
244+
});
245+
});
230246
/*
231247
* - Confirms that a child user cannot close the account.
232248
*/

packages/manager/cypress/e2e/core/account/account-linode-managed.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
mockEnableLinodeManagedError,
2121
mockGetAccount,
2222
} from 'support/intercepts/account';
23+
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
2324
import { mockGetLinodes } from 'support/intercepts/linodes';
2425
import {
2526
mockGetProfile,
@@ -33,6 +34,14 @@ import { accountFactory } from 'src/factories/account';
3334
import type { Linode } from '@linode/api-v4';
3435

3536
describe('Account Linode Managed', () => {
37+
beforeEach(() => {
38+
mockAppendFeatureFlags({
39+
iam: {
40+
enabled: false,
41+
},
42+
});
43+
});
44+
3645
/*
3746
* - Confirms that a user can add linode managed from the Account Settings page.
3847
* - Confirms that user is told about the Managed price.

packages/manager/cypress/e2e/core/account/account-login-history.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
loginHelperText,
99
} from 'support/constants/account';
1010
import { mockGetAccountLogins } from 'support/intercepts/account';
11+
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
1112
import {
1213
mockGetProfile,
1314
mockGetProfileGrants,
@@ -18,6 +19,14 @@ import { PARENT_USER } from 'src/features/Account/constants';
1819
import { formatDate } from 'src/utilities/formatDate';
1920

2021
describe('Account login history', () => {
22+
beforeEach(() => {
23+
mockAppendFeatureFlags({
24+
iam: {
25+
enabled: false,
26+
},
27+
});
28+
});
29+
2130
/*
2231
* - Confirms that a user can navigate to and view the login history page.
2332
* - Confirms that login table displays the expected column headers.

packages/manager/cypress/e2e/core/account/display-settings.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { grantsFactory, profileFactory } from '@linode/utilities';
22
import { getProfile } from 'support/api/account';
33
import { mockUpdateUsername } from 'support/intercepts/account';
4+
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
45
import {
56
interceptGetProfile,
67
mockGetProfileGrants,
@@ -50,6 +51,14 @@ const verifyUsernameAndEmail = (
5051
};
5152

5253
describe('Display Settings', () => {
54+
beforeEach(() => {
55+
mockAppendFeatureFlags({
56+
iam: {
57+
enabled: false,
58+
},
59+
});
60+
});
61+
5362
/*
5463
* - Validates username update flow via the profile display page using mocked data.
5564
*/

packages/manager/cypress/e2e/core/account/user-permissions.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ describe('User permission management', () => {
173173
// TODO M3-10003 - Remove mock once `limitsEvolution` feature flag is removed.
174174
mockAppendFeatureFlags({
175175
iamRbacPrimaryNavChanges: true,
176+
iam: {
177+
enabled: false,
178+
},
176179
}).as('getFeatureFlags');
177180
});
178181

packages/manager/cypress/e2e/core/account/user-profile.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
mockGetUsers,
66
mockUpdateUsername,
77
} from 'support/intercepts/account';
8+
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags';
89
import { mockUpdateProfile } from 'support/intercepts/profile';
910
import { ui } from 'support/ui';
1011
import { randomString } from 'support/util/random';
@@ -23,6 +24,12 @@ describe('User Profile', () => {
2324
const newUsername = randomString(12);
2425
const newEmail = `${newUsername}@example.com`;
2526

27+
mockAppendFeatureFlags({
28+
iam: {
29+
enabled: false,
30+
},
31+
});
32+
2633
getProfile().then((profile) => {
2734
const activeUsername = profile.body.username;
2835
const activeEmail = profile.body.email;

packages/manager/cypress/e2e/core/account/users-landing-page.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ describe('Users landing page', () => {
8484
// TODO M3-10003 - Remove mock once `limitsEvolution` feature flag is removed.
8585
mockAppendFeatureFlags({
8686
iamRbacPrimaryNavChanges: true,
87+
iam: {
88+
enabled: false,
89+
},
8790
}).as('getFeatureFlags');
8891
});
8992

packages/manager/cypress/e2e/core/billing/restricted-user-billing.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ describe('restricted user billing flows', () => {
227227
// TODO M3-10491 - Remove `iamRbacPrimaryNavChanges` feature flag mock once flag is deleted.
228228
mockAppendFeatureFlags({
229229
iamRbacPrimaryNavChanges: true,
230+
iam: {
231+
enabled: false,
232+
},
230233
});
231234
});
232235

packages/manager/cypress/e2e/core/billing/smoke-billing-activity.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ describe('Billing Activity Feed', () => {
120120
mockAppendFeatureFlags({
121121
// TODO M3-10491 - Remove `iamRbacPrimaryNavChanges` feature flag mock once flag is deleted.
122122
iamRbacPrimaryNavChanges: true,
123+
iam: {
124+
enabled: false,
125+
},
123126
});
124127
});
125128
/*

0 commit comments

Comments
 (0)