From 9641e557c0f6c3166bb66a090419bd35b395b84e Mon Sep 17 00:00:00 2001 From: k3yi0 Date: Tue, 21 Jun 2022 13:06:48 +0200 Subject: [PATCH] chore(ui): adjust data-test attribute --- ui/cypress/integration/admin_chronograf.test.ts | 6 +++--- ui/src/admin/components/chronograf/AllUsersTableHeader.tsx | 1 + ui/src/admin/components/chronograf/AllUsersTableRow.tsx | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/cypress/integration/admin_chronograf.test.ts b/ui/cypress/integration/admin_chronograf.test.ts index 29d1feca8..9920dec77 100644 --- a/ui/cypress/integration/admin_chronograf.test.ts +++ b/ui/cypress/integration/admin_chronograf.test.ts @@ -87,7 +87,7 @@ describe('Chronograf', () => { }) it('add user, edit user, and remove it', () => { - cy.getByTestID('turn-on-new-users-superAdmin--toggle') + cy.getByTestID('new-user-superAdmin--toggle') .click() .should('have.class', 'active') cy.getByTestID('add-user--button').click() @@ -114,7 +114,7 @@ describe('Chronograf', () => { cy.getByTestID('confirm-new-user--button').click() }) - cy.getByTestID('turn-off-new-users-superAdmin--toggle') + cy.getByTestID('new-user-admin--toggle') .click() .should('not.have.class', 'active') @@ -123,7 +123,7 @@ describe('Chronograf', () => { .realHover() .then(() => { cy.getByTestID(`${chronograf.user.name}--table-row`).within(() => { - cy.getByTestID('turn-off-superAdmin--toggle').click() + cy.getByTestID('superAdmin--toggle').click() }) }) diff --git a/ui/src/admin/components/chronograf/AllUsersTableHeader.tsx b/ui/src/admin/components/chronograf/AllUsersTableHeader.tsx index 7c10db541..fd9fc43cf 100644 --- a/ui/src/admin/components/chronograf/AllUsersTableHeader.tsx +++ b/ui/src/admin/components/chronograf/AllUsersTableHeader.tsx @@ -49,6 +49,7 @@ class AllUsersTableHeader extends Component { size={ComponentSize.Small} active={superAdminNewUsers} onChange={this.handleToggleClick} + dataTest="new-user-Admins--toggle" /> All new users are SuperAdmins diff --git a/ui/src/admin/components/chronograf/AllUsersTableRow.tsx b/ui/src/admin/components/chronograf/AllUsersTableRow.tsx index 063ed340b..8ba7ed79a 100644 --- a/ui/src/admin/components/chronograf/AllUsersTableRow.tsx +++ b/ui/src/admin/components/chronograf/AllUsersTableRow.tsx @@ -89,6 +89,7 @@ export default class AllUsersTableRow extends Component { color={ComponentColor.Success} disabled={this.userIsMe} tooltipText={this.toggleTooltipText} + dataTest="superAdmin--toggle" />