-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accessibility test for Painless lab (#75688)
* accessibility test for painless lab * skipped a test due to aria-violation * skipped tests due to aria-violation and added datatestsubj * removed the unwanted import * incorporate review comments * feedback incorporated * review comments incorporated * removed unwanted expect
- Loading branch information
1 parent
bfa87d2
commit 7e66fa8
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export default function ({ getService, getPageObjects }: FtrProviderContext) { | ||
const PageObjects = getPageObjects(['common', 'security']); | ||
const testSubjects = getService('testSubjects'); | ||
const find = getService('find'); | ||
const a11y = getService('a11y'); | ||
|
||
describe('Accessibility Painless Lab Editor', () => { | ||
before(async () => { | ||
await PageObjects.common.navigateToApp('painlessLab'); | ||
}); | ||
|
||
it('renders the page without a11y errors', async () => { | ||
await PageObjects.common.navigateToApp('painlessLab'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('click on the output button', async () => { | ||
const painlessTabsOutput = await find.byCssSelector( | ||
'[data-test-subj="painlessTabs"] #output' | ||
); | ||
await painlessTabsOutput.click(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('click on the parameters button', async () => { | ||
const painlessTabsParameters = await find.byCssSelector( | ||
'[data-test-subj="painlessTabs"] #parameters' | ||
); | ||
await painlessTabsParameters.click(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
// github.com/elastic/kibana/issues/75876 | ||
it.skip('click on the context button', async () => { | ||
const painlessTabsContext = await find.byCssSelector( | ||
'[data-test-subj="painlessTabs"] #context' | ||
); | ||
await painlessTabsContext.click(); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it.skip('click on the Basic button', async () => { | ||
await testSubjects.click('basicButtonDropdown'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it.skip('click on the Filter button', async () => { | ||
await testSubjects.click('filterButtonDropdown'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it.skip('click on the Score button', async () => { | ||
await testSubjects.click('scoreButtonDropdown'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters