a11y tests for login and logout (#60799)

a11y login screen
This commit is contained in:
Bhavya RM 2020-03-23 09:45:19 -04:00 committed by GitHub
parent 7dc45f5441
commit e235321903
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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