diff --git a/public/app/features/profile/UserOrganizations.tsx b/public/app/features/profile/UserOrganizations.tsx index 25f86b87325..11e4967d4f8 100644 --- a/public/app/features/profile/UserOrganizations.tsx +++ b/public/app/features/profile/UserOrganizations.tsx @@ -51,6 +51,7 @@ export class UserOrganizations extends PureComponent { onClick={() => { this.props.setUserOrg(org); }} + aria-label={`Switch to the organization named ${org.name}`} > Select diff --git a/public/app/features/profile/UserProfileEditPage.test.tsx b/public/app/features/profile/UserProfileEditPage.test.tsx index 085a2a67301..7612ded5f4d 100644 --- a/public/app/features/profile/UserProfileEditPage.test.tsx +++ b/public/app/features/profile/UserProfileEditPage.test.tsx @@ -251,7 +251,9 @@ describe('UserProfileEditPage', () => { it('should call changeUserOrg', async () => { const { props } = await getTestContext(); const orgsAdminSelectButton = () => - within(getSelectors().orgsAdminRow()).getByRole('button', { name: /select/i }); + within(getSelectors().orgsAdminRow()).getByRole('button', { + name: /switch to the organization named Third/i, + }); userEvent.click(orgsAdminSelectButton()); @@ -267,7 +269,10 @@ describe('UserProfileEditPage', () => { describe('and session is revoked', () => { it('should call revokeUserSession', async () => { const { props } = await getTestContext(); - const sessionsRevokeButton = () => within(getSelectors().sessionsRow()).getByRole('button'); + const sessionsRevokeButton = () => + within(getSelectors().sessionsRow()).getByRole('button', { + name: /revoke user session/i, + }); userEvent.click(sessionsRevokeButton()); diff --git a/public/app/features/profile/UserSessions.tsx b/public/app/features/profile/UserSessions.tsx index ac5f55a6135..7548d89877a 100644 --- a/public/app/features/profile/UserSessions.tsx +++ b/public/app/features/profile/UserSessions.tsx @@ -42,7 +42,12 @@ export class UserSessions extends PureComponent { {session.browser} on {session.os} {session.osVersion} - diff --git a/public/app/features/profile/UserTeams.tsx b/public/app/features/profile/UserTeams.tsx index 61c701ae259..fc5c4bf3a94 100644 --- a/public/app/features/profile/UserTeams.tsx +++ b/public/app/features/profile/UserTeams.tsx @@ -37,7 +37,7 @@ export class UserTeams extends PureComponent { return ( - + {team.name} {team.email}