From 75cbdda5ba1c7c9d4ddb12fa173b5b91af7aadf7 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 25 Mar 2024 13:44:40 -0700 Subject: [PATCH 01/12] Add Last Login to users table Signed-off-by: Phillip Rak --- shell/config/product/explorer.js | 3 ++- shell/config/table-headers.js | 8 ++++++++ shell/models/management.cattle.io.user.js | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/shell/config/product/explorer.js b/shell/config/product/explorer.js index eec9cf5b3a8..8c2707b912b 100644 --- a/shell/config/product/explorer.js +++ b/shell/config/product/explorer.js @@ -15,7 +15,7 @@ import { STATE, NAME as NAME_COL, NAMESPACE as NAMESPACE_COL, AGE, KEYS, INGRESS_DEFAULT_BACKEND, INGRESS_TARGET, INGRESS_CLASS, SPEC_TYPE, TARGET_PORT, SELECTOR, NODE as NODE_COL, TYPE, WORKLOAD_IMAGES, POD_IMAGES, - USER_ID, USERNAME, USER_DISPLAY_NAME, USER_PROVIDER, WORKLOAD_ENDPOINTS, STORAGE_CLASS_DEFAULT, + USER_ID, USERNAME, USER_DISPLAY_NAME, USER_PROVIDER, USER_LAST_LOGIN, WORKLOAD_ENDPOINTS, STORAGE_CLASS_DEFAULT, STORAGE_CLASS_PROVISIONER, PERSISTENT_VOLUME_SOURCE, HPA_REFERENCE, MIN_REPLICA, MAX_REPLICA, CURRENT_REPLICA, ACCESS_KEY, DESCRIPTION, EXPIRES, EXPIRY_STATE, SUB_TYPE, AGE_NORMAN, SCOPE_NORMAN, PERSISTENT_VOLUME_CLAIM, RECLAIM_POLICY, PV_REASON, WORKLOAD_HEALTH_SCALE, POD_RESTARTS, @@ -365,6 +365,7 @@ export function init(store) { USER_DISPLAY_NAME, USER_PROVIDER, USERNAME, + USER_LAST_LOGIN, AGE ]); diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index 98df8540b19..4d4e5232667 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -405,6 +405,14 @@ export const USER_PROVIDER = { sort: 'providerDisplay', }; +export const USER_LAST_LOGIN = { + name: 'user-last-login', + label: 'Last Login', + value: 'userLastLogin', + formatter: 'LiveDate', + sort: 'user-last-login', +}; + export const USER_ID = { name: 'user-id', labelKey: 'tableHeaders.userId', diff --git a/shell/models/management.cattle.io.user.js b/shell/models/management.cattle.io.user.js index 10d67ea9e3e..0e18b4bb7be 100644 --- a/shell/models/management.cattle.io.user.js +++ b/shell/models/management.cattle.io.user.js @@ -99,6 +99,14 @@ export default class User extends HybridModel { return this.$rootGetters['i18n/withFallback'](`model.authConfig.provider."${ this.provider }"`, null, this.provider); } + /** + * Gets the last-login label in milliseconds + * @returns {number} + */ + get userLastLogin() { + return this.metadata?.labels?.['cattle.io/last-login'] * 1000; + } + get state() { if ( this.enabled === false ) { return 'inactive'; From 630d96ca5bdb8b37aca10db7211a6566928bb3d9 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 25 Mar 2024 13:44:09 -0700 Subject: [PATCH 02/12] Add User Disabled In & Deleted In columns Signed-off-by: Phillip Rak --- shell/config/product/explorer.js | 4 +++- shell/config/table-headers.js | 16 ++++++++++++++++ shell/models/management.cattle.io.user.js | 16 ++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/shell/config/product/explorer.js b/shell/config/product/explorer.js index 8c2707b912b..19cd2f02bd3 100644 --- a/shell/config/product/explorer.js +++ b/shell/config/product/explorer.js @@ -15,7 +15,7 @@ import { STATE, NAME as NAME_COL, NAMESPACE as NAMESPACE_COL, AGE, KEYS, INGRESS_DEFAULT_BACKEND, INGRESS_TARGET, INGRESS_CLASS, SPEC_TYPE, TARGET_PORT, SELECTOR, NODE as NODE_COL, TYPE, WORKLOAD_IMAGES, POD_IMAGES, - USER_ID, USERNAME, USER_DISPLAY_NAME, USER_PROVIDER, USER_LAST_LOGIN, WORKLOAD_ENDPOINTS, STORAGE_CLASS_DEFAULT, + USER_ID, USERNAME, USER_DISPLAY_NAME, USER_PROVIDER, USER_LAST_LOGIN, USER_DISABLED_IN, USER_DELETED_IN, WORKLOAD_ENDPOINTS, STORAGE_CLASS_DEFAULT, STORAGE_CLASS_PROVISIONER, PERSISTENT_VOLUME_SOURCE, HPA_REFERENCE, MIN_REPLICA, MAX_REPLICA, CURRENT_REPLICA, ACCESS_KEY, DESCRIPTION, EXPIRES, EXPIRY_STATE, SUB_TYPE, AGE_NORMAN, SCOPE_NORMAN, PERSISTENT_VOLUME_CLAIM, RECLAIM_POLICY, PV_REASON, WORKLOAD_HEALTH_SCALE, POD_RESTARTS, @@ -366,6 +366,8 @@ export function init(store) { USER_PROVIDER, USERNAME, USER_LAST_LOGIN, + USER_DISABLED_IN, + USER_DELETED_IN, AGE ]); diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index 4d4e5232667..ba524454692 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -413,6 +413,22 @@ export const USER_LAST_LOGIN = { sort: 'user-last-login', }; +export const USER_DISABLED_IN = { + name: 'user-disabled-in', + label: 'Disabled In', + value: 'userDisabledIn', + formatter: 'LiveDate', + sort: 'user-disabled-in', +}; + +export const USER_DELETED_IN = { + name: 'user-deleted-in', + label: 'Deleted In', + value: 'userDeletedIn', + formatter: 'LiveDate', + sort: 'user-deleted-in', +}; + export const USER_ID = { name: 'user-id', labelKey: 'tableHeaders.userId', diff --git a/shell/models/management.cattle.io.user.js b/shell/models/management.cattle.io.user.js index 0e18b4bb7be..e12c2943924 100644 --- a/shell/models/management.cattle.io.user.js +++ b/shell/models/management.cattle.io.user.js @@ -107,6 +107,22 @@ export default class User extends HybridModel { return this.metadata?.labels?.['cattle.io/last-login'] * 1000; } + /** + * Gets the disabled-after label in milliseconds + * @returns {number} + */ + get userDisabledIn() { + return this.metadata?.labels?.['cattle.io/disable-after'] * 1000; + } + + /** + * Gets the delete-after label in milliseconds + * @returns {number} + */ + get userDeletedIn() { + return this.metadata?.labels?.['cattle.io/delete-after'] * 1000; + } + get state() { if ( this.enabled === false ) { return 'inactive'; From 2554be09a3f5d58d64627dbde2b7ce8459e3acd7 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 25 Mar 2024 13:38:54 -0700 Subject: [PATCH 03/12] Add translation strings for new user fields Signed-off-by: Phillip Rak --- shell/assets/translations/en-us.yaml | 3 +++ shell/config/table-headers.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shell/assets/translations/en-us.yaml b/shell/assets/translations/en-us.yaml index 5f32d67b595..4ca560875e9 100644 --- a/shell/assets/translations/en-us.yaml +++ b/shell/assets/translations/en-us.yaml @@ -5714,6 +5714,9 @@ tableHeaders: users: Users userDisplayName: Display Name userId: ID + userDeletedIn: Deleted In + userDisabledIn: Disabled In + userLastLogin: Last Login userStatus: Status username: Local Username value: Value diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index ba524454692..3e632511971 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -407,7 +407,7 @@ export const USER_PROVIDER = { export const USER_LAST_LOGIN = { name: 'user-last-login', - label: 'Last Login', + labelKey: 'tableHeaders.userLastLogin', value: 'userLastLogin', formatter: 'LiveDate', sort: 'user-last-login', @@ -415,7 +415,7 @@ export const USER_LAST_LOGIN = { export const USER_DISABLED_IN = { name: 'user-disabled-in', - label: 'Disabled In', + labelKey: 'tableHeaders.userDisabledIn', value: 'userDisabledIn', formatter: 'LiveDate', sort: 'user-disabled-in', @@ -423,7 +423,7 @@ export const USER_DISABLED_IN = { export const USER_DELETED_IN = { name: 'user-deleted-in', - label: 'Deleted In', + labelKey: 'tableHeaders.userDeletedIn', value: 'userDeletedIn', formatter: 'LiveDate', sort: 'user-deleted-in', From ab0481e5f62dd69ed78f988a1a189d1531e0876b Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Tue, 16 Apr 2024 14:21:04 -0700 Subject: [PATCH 04/12] Add new fields to user details getter Signed-off-by: Phillip Rak --- shell/models/management.cattle.io.user.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/shell/models/management.cattle.io.user.js b/shell/models/management.cattle.io.user.js index e12c2943924..56979ba2fc5 100644 --- a/shell/models/management.cattle.io.user.js +++ b/shell/models/management.cattle.io.user.js @@ -235,6 +235,21 @@ export default class User extends HybridModel { formatter: 'CopyToClipboard', content: this.username }, + { + label: this.t('tableHeaders.userLastLogin'), + formatter: 'LiveDate', + content: this.userLastLogin, + }, + { + label: this.t('tableHeaders.userDisabledIn'), + formatter: 'LiveDate', + content: this.userDisabledIn, + }, + { + label: this.t('tableHeaders.userDeletedIn'), + formatter: 'LiveDate', + content: this.userDeletedIn, + }, ...this._details ]; } From 5052ce9f4b829db1fe32746f5109fac684268279 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Fri, 19 Apr 2024 13:23:40 -0700 Subject: [PATCH 05/12] Customize suffix for `userLastLogin` Signed-off-by: Phillip Rak --- shell/assets/translations/en-us.yaml | 1 + shell/models/management.cattle.io.user.js | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/shell/assets/translations/en-us.yaml b/shell/assets/translations/en-us.yaml index 4ca560875e9..013cf8355d4 100644 --- a/shell/assets/translations/en-us.yaml +++ b/shell/assets/translations/en-us.yaml @@ -247,6 +247,7 @@ suffix: ib: iB mib: MiB gb: GB + ago: ago revisions: |- {count, plural, =1 { Revision } diff --git a/shell/models/management.cattle.io.user.js b/shell/models/management.cattle.io.user.js index 56979ba2fc5..17859d3e87a 100644 --- a/shell/models/management.cattle.io.user.js +++ b/shell/models/management.cattle.io.user.js @@ -1,5 +1,6 @@ import { NORMAN } from '@shell/config/types'; import HybridModel, { cleanHybridResources } from '@shell/plugins/steve/hybrid-class'; +import day from 'dayjs'; export default class User extends HybridModel { // Preserve description @@ -235,10 +236,12 @@ export default class User extends HybridModel { formatter: 'CopyToClipboard', content: this.username }, + { separator: true }, { - label: this.t('tableHeaders.userLastLogin'), - formatter: 'LiveDate', - content: this.userLastLogin, + label: this.t('tableHeaders.userLastLogin'), + formatter: 'LiveDate', + formatterOpts: { addSuffix: true, suffix: `${ this.t('suffix.ago') } (${ day(this.userLastLogin) })` }, + content: this.userLastLogin, }, { label: this.t('tableHeaders.userDisabledIn'), From e4d6f3e6535ff476c5f976f3b851faa3bd829a7c Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Tue, 16 Apr 2024 08:30:04 -0700 Subject: [PATCH 06/12] Sort by raw value instead of string value Signed-off-by: Phillip Rak --- shell/config/table-headers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index 3e632511971..9989f927a39 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -410,7 +410,7 @@ export const USER_LAST_LOGIN = { labelKey: 'tableHeaders.userLastLogin', value: 'userLastLogin', formatter: 'LiveDate', - sort: 'user-last-login', + sort: 'userLastLogin', }; export const USER_DISABLED_IN = { @@ -418,7 +418,7 @@ export const USER_DISABLED_IN = { labelKey: 'tableHeaders.userDisabledIn', value: 'userDisabledIn', formatter: 'LiveDate', - sort: 'user-disabled-in', + sort: 'userDisabledIn', }; export const USER_DELETED_IN = { @@ -426,7 +426,7 @@ export const USER_DELETED_IN = { labelKey: 'tableHeaders.userDeletedIn', value: 'userDeletedIn', formatter: 'LiveDate', - sort: 'user-deleted-in', + sort: 'userDeletedIn', }; export const USER_ID = { From 9994715d0811b9781c4758ed049381109c6b887d Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Wed, 8 May 2024 15:00:46 -0700 Subject: [PATCH 07/12] Update user Deleted/Disabled labels Signed-off-by: Phillip Rak --- shell/assets/translations/en-us.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/assets/translations/en-us.yaml b/shell/assets/translations/en-us.yaml index 013cf8355d4..4a99595555d 100644 --- a/shell/assets/translations/en-us.yaml +++ b/shell/assets/translations/en-us.yaml @@ -5715,8 +5715,8 @@ tableHeaders: users: Users userDisplayName: Display Name userId: ID - userDeletedIn: Deleted In - userDisabledIn: Disabled In + userDeletedIn: Delete After + userDisabledIn: Disable After userLastLogin: Last Login userStatus: Status username: Local Username From f404873ffe0fafad4d6417561ca79ab5af54d516 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 20 May 2024 13:09:43 -0700 Subject: [PATCH 08/12] Stop displaying relative time when date has lapsed Signed-off-by: Phillip Rak --- shell/components/formatter/LiveDate.vue | 16 ++++++++++++++++ shell/config/table-headers.js | 22 ++++++++++++---------- shell/models/management.cattle.io.user.js | 14 ++++++++------ 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/shell/components/formatter/LiveDate.vue b/shell/components/formatter/LiveDate.vue index 9a5666701f6..a7e28b1cd29 100644 --- a/shell/components/formatter/LiveDate.vue +++ b/shell/components/formatter/LiveDate.vue @@ -34,6 +34,16 @@ export default { showTooltip: { type: Boolean, default: true + }, + + /** + * Determines if the live date should behave like a countdown by comparing + * the provided value and the current date. When the countdown reaches 0, a + * "-" is rendered. + */ + isCountdown: { + type: Boolean, + default: false, } }, @@ -104,6 +114,12 @@ export default { return 300; } + if (this.isCountdown && now.valueOf() > this.dayValue?.valueOf()) { + this.label = '-'; + + return 300; + } + const diff = diffFrom(this.dayValue, now); const prefix = (diff.diff < 0 || !this.addPrefix ? '' : '-'); diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index 9989f927a39..d5addd0a183 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -414,19 +414,21 @@ export const USER_LAST_LOGIN = { }; export const USER_DISABLED_IN = { - name: 'user-disabled-in', - labelKey: 'tableHeaders.userDisabledIn', - value: 'userDisabledIn', - formatter: 'LiveDate', - sort: 'userDisabledIn', + name: 'user-disabled-in', + labelKey: 'tableHeaders.userDisabledIn', + value: 'userDisabledIn', + formatter: 'LiveDate', + formatterOpts: { isCountdown: true }, + sort: 'userDisabledIn', }; export const USER_DELETED_IN = { - name: 'user-deleted-in', - labelKey: 'tableHeaders.userDeletedIn', - value: 'userDeletedIn', - formatter: 'LiveDate', - sort: 'userDeletedIn', + name: 'user-deleted-in', + labelKey: 'tableHeaders.userDeletedIn', + value: 'userDeletedIn', + formatter: 'LiveDate', + formatterOpts: { isCountdown: true }, + sort: 'userDeletedIn', }; export const USER_ID = { diff --git a/shell/models/management.cattle.io.user.js b/shell/models/management.cattle.io.user.js index 17859d3e87a..6c7f00845ac 100644 --- a/shell/models/management.cattle.io.user.js +++ b/shell/models/management.cattle.io.user.js @@ -244,14 +244,16 @@ export default class User extends HybridModel { content: this.userLastLogin, }, { - label: this.t('tableHeaders.userDisabledIn'), - formatter: 'LiveDate', - content: this.userDisabledIn, + label: this.t('tableHeaders.userDisabledIn'), + formatter: 'LiveDate', + formatterOpts: { isCountdown: true }, + content: this.userDisabledIn, }, { - label: this.t('tableHeaders.userDeletedIn'), - formatter: 'LiveDate', - content: this.userDeletedIn, + label: this.t('tableHeaders.userDeletedIn'), + formatter: 'LiveDate', + formatterOpts: { isCountdown: true }, + content: this.userDeletedIn, }, ...this._details ]; From a47c7ea7aa416b16492a2c13e5faed45f26ab89f Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 20 May 2024 13:50:23 -0700 Subject: [PATCH 09/12] Update user state display labels Signed-off-by: Phillip Rak --- shell/assets/translations/en-us.yaml | 4 ++++ shell/models/management.cattle.io.user.js | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/shell/assets/translations/en-us.yaml b/shell/assets/translations/en-us.yaml index 4a99595555d..140cd658f11 100644 --- a/shell/assets/translations/en-us.yaml +++ b/shell/assets/translations/en-us.yaml @@ -5741,6 +5741,10 @@ target: placeholder: Select a version user: + state: + active: 'Enabled' + inactive: 'Disabled' + unknown: 'Unknown' detail: username: Username globalPermissions: diff --git a/shell/models/management.cattle.io.user.js b/shell/models/management.cattle.io.user.js index 6c7f00845ac..f2141196d8a 100644 --- a/shell/models/management.cattle.io.user.js +++ b/shell/models/management.cattle.io.user.js @@ -132,6 +132,19 @@ export default class User extends HybridModel { return this.metadata?.state?.name || 'unknown'; } + get stateDisplay() { + switch (this.state) { + case 'inactive': + return this.t('user.state.inactive'); + case 'active': + return this.t('user.state.active'); + case 'unknown': + return this.t('user.state.unknown'); + default: + return this.state; + } + } + get description() { return this._description; } From c746601593b0f6e048a52257dbb0a6d07bc2401f Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 20 May 2024 14:22:24 -0700 Subject: [PATCH 10/12] Don't display a value for `Disable After` for disabled users Signed-off-by: Phillip Rak --- shell/config/table-headers.js | 2 +- shell/models/management.cattle.io.user.js | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index d5addd0a183..b81b4d90119 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -416,7 +416,7 @@ export const USER_LAST_LOGIN = { export const USER_DISABLED_IN = { name: 'user-disabled-in', labelKey: 'tableHeaders.userDisabledIn', - value: 'userDisabledIn', + value: 'userDisabledInDisplay', formatter: 'LiveDate', formatterOpts: { isCountdown: true }, sort: 'userDisabledIn', diff --git a/shell/models/management.cattle.io.user.js b/shell/models/management.cattle.io.user.js index f2141196d8a..505e4656d90 100644 --- a/shell/models/management.cattle.io.user.js +++ b/shell/models/management.cattle.io.user.js @@ -116,6 +116,14 @@ export default class User extends HybridModel { return this.metadata?.labels?.['cattle.io/disable-after'] * 1000; } + /** + * Provides a display value for the userDisabledIn date based on the user + * state. + */ + get userDisabledInDisplay() { + return this.state === 'inactive' ? null : this.userDisabledIn; + } + /** * Gets the delete-after label in milliseconds * @returns {number} @@ -260,7 +268,7 @@ export default class User extends HybridModel { label: this.t('tableHeaders.userDisabledIn'), formatter: 'LiveDate', formatterOpts: { isCountdown: true }, - content: this.userDisabledIn, + content: this.userDisabledInDisplay, }, { label: this.t('tableHeaders.userDeletedIn'), From dfc555fb5bf4ae9c6b694c9744da17f4ace53ec8 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Tue, 21 May 2024 09:16:57 -0700 Subject: [PATCH 11/12] Add a suffix to Last Login Signed-off-by: Phillip Rak --- shell/config/table-headers.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index b81b4d90119..4c28b0c66c8 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -406,11 +406,12 @@ export const USER_PROVIDER = { }; export const USER_LAST_LOGIN = { - name: 'user-last-login', - labelKey: 'tableHeaders.userLastLogin', - value: 'userLastLogin', - formatter: 'LiveDate', - sort: 'userLastLogin', + name: 'user-last-login', + labelKey: 'tableHeaders.userLastLogin', + value: 'userLastLogin', + formatter: 'LiveDate', + formatterOpts: { addSuffix: true }, + sort: 'userLastLogin', }; export const USER_DISABLED_IN = { From 4c1ca82d51a0fedfe37c77138fc28a6e7c5d2a9a Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Tue, 21 May 2024 15:05:35 -0700 Subject: [PATCH 12/12] Update e2e tests to reflect state label changes Signed-off-by: Phillip Rak --- cypress/e2e/tests/pages/users-and-auth/users.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/tests/pages/users-and-auth/users.spec.ts b/cypress/e2e/tests/pages/users-and-auth/users.spec.ts index ac9f56c9062..16eee2a9839 100644 --- a/cypress/e2e/tests/pages/users-and-auth/users.spec.ts +++ b/cypress/e2e/tests/pages/users-and-auth/users.spec.ts @@ -108,11 +108,11 @@ describe('Users', { tags: ['@usersAndAuths', '@adminUser'] }, () => { // Deactivate user and check state is Inactive usersPo.goTo(); usersPo.list().clickRowActionMenuItem(standardUsername, 'Deactivate'); - usersPo.list().details(standardUsername, 1).should('include.text', 'Inactive'); + usersPo.list().details(standardUsername, 1).should('include.text', 'Disabled'); // Activate user and check state is Active usersPo.list().clickRowActionMenuItem(standardUsername, 'Activate'); - usersPo.list().details(standardUsername, 1).should('include.text', 'Active'); + usersPo.list().details(standardUsername, 1).should('include.text', 'Enabled'); }); it('can Refresh Group Memberships', () => { @@ -191,14 +191,14 @@ describe('Users', { tags: ['@usersAndAuths', '@adminUser'] }, () => { usersPo.list().selectAll().set(); usersPo.list().deactivate().click(); cy.wait('@updateUsers'); - cy.contains('Inactive'); - usersPo.list().details('admin', 1).should('include.text', 'Active'); - usersPo.list().details(userBaseUsername, 1).should('include.text', 'Inactive'); + cy.contains('Disabled'); + usersPo.list().details('admin', 1).should('include.text', 'Enabled'); + usersPo.list().details(userBaseUsername, 1).should('include.text', 'Disabled'); // Activate user and check state is Active usersPo.list().activate().click(); cy.wait('@updateUsers'); - usersPo.list().details(userBaseUsername, 1).should('include.text', 'Active'); + usersPo.list().details(userBaseUsername, 1).should('include.text', 'Enabled'); }); it('can Download YAML', () => {