Skip to content

Commit

Permalink
a11y tests for login and logout (#60799) (#60905)
Browse files Browse the repository at this point in the history
a11y login screen
  • Loading branch information
bhavyarm authored Mar 23, 2020
1 parent afe00a0 commit f85bfd6
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion x-pack/test/accessibility/apps/login_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,33 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.security.forceLogout();
});

it('meets a11y requirements', async () => {
it('login page meets a11y requirements', async () => {
await PageObjects.common.navigateToApp('login');

await retry.waitFor(
'login page visible',
async () => await testSubjects.exists('loginSubmit')
);
await a11y.testAppSnapshot();
});

it('User can login with a11y requirements', async () => {
await PageObjects.security.login();
await a11y.testAppSnapshot();
});

it('Wrong credentials message meets a11y requirements', async () => {
await PageObjects.security.loginPage.login('wrong-user', 'wrong-password', {
expectSuccess: false,
});
await PageObjects.security.loginPage.getErrorMessage();
await a11y.testAppSnapshot();
});

it('Logout message acknowledges a11y requirements', async () => {
await PageObjects.security.login();
await PageObjects.security.logout();
await testSubjects.getVisibleText('loginInfoMessage');
await a11y.testAppSnapshot();
});
});
Expand Down

0 comments on commit f85bfd6

Please sign in to comment.