chore(ui): adjust data-test attribute

pull/5948/head
k3yi0 2022-06-21 13:06:48 +02:00
parent 0cca96c051
commit 9641e557c0
3 changed files with 5 additions and 3 deletions

View File

@ -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()
})
})

View File

@ -49,6 +49,7 @@ class AllUsersTableHeader extends Component<Props> {
size={ComponentSize.Small}
active={superAdminNewUsers}
onChange={this.handleToggleClick}
dataTest="new-user-Admins--toggle"
/>
<span>All new users are SuperAdmins</span>
</div>

View File

@ -89,6 +89,7 @@ export default class AllUsersTableRow extends Component<Props> {
color={ComponentColor.Success}
disabled={this.userIsMe}
tooltipText={this.toggleTooltipText}
dataTest="superAdmin--toggle"
/>
</td>
<td style={{textAlign: 'right', width: colActions}}>