mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
A11y: Fix for Fastpass issues on the Profile page (#40212)
* A11y: Fix for Fastpass issues on Profile page * Chore: small fix * Chore: fixes the tests
This commit is contained in:
parent
7756181ff9
commit
7706483654
@ -51,6 +51,7 @@ export class UserOrganizations extends PureComponent<Props> {
|
||||
onClick={() => {
|
||||
this.props.setUserOrg(org);
|
||||
}}
|
||||
aria-label={`Switch to the organization named ${org.name}`}
|
||||
>
|
||||
Select
|
||||
</Button>
|
||||
|
@ -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());
|
||||
|
||||
|
@ -42,7 +42,12 @@ export class UserSessions extends PureComponent<Props> {
|
||||
{session.browser} on {session.os} {session.osVersion}
|
||||
</td>
|
||||
<td>
|
||||
<Button size="sm" variant="destructive" onClick={() => revokeUserSession(session.id)}>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="destructive"
|
||||
onClick={() => revokeUserSession(session.id)}
|
||||
aria-label="Revoke user session"
|
||||
>
|
||||
<Icon name="power" />
|
||||
</Button>
|
||||
</td>
|
||||
|
@ -37,7 +37,7 @@ export class UserTeams extends PureComponent<Props> {
|
||||
return (
|
||||
<tr key={index}>
|
||||
<td className="width-4 text-center">
|
||||
<img className="filter-table__avatar" src={team.avatarUrl} />
|
||||
<img className="filter-table__avatar" src={team.avatarUrl} alt="" />
|
||||
</td>
|
||||
<td>{team.name}</td>
|
||||
<td>{team.email}</td>
|
||||
|
Loading…
Reference in New Issue
Block a user