unskipping a11y painless lab test (#127082)

* unskipping a11y painless lab test

* focusable element

* adding an extra step to get the element in focus

* changes to make it work

* introduce an retry loop

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Rashmi Kulkarni 2022-03-10 07:28:11 -08:00 committed by GitHub
parent 74587a9ade
commit 14933483bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 8 deletions

View file

@ -69,6 +69,7 @@ export const ContextTab: FunctionComponent = () => {
itemLayoutAlign="top"
hasDividers
fullWidth
data-test-subj="painlessContextDropDown"
/>
</EuiFormRow>

View file

@ -12,6 +12,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const find = getService('find');
const a11y = getService('a11y');
const retry = getService('retry');
describe('Accessibility Painless Lab Editor', () => {
before(async () => {
@ -39,8 +40,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});
// github.com/elastic/kibana/issues/75876
it.skip('click on the context button', async () => {
it('click on the context button', async () => {
const painlessTabsContext = await find.byCssSelector(
'[data-test-subj="painlessTabs"] #context'
);
@ -48,19 +48,37 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});
it.skip('click on the Basic button', async () => {
it('click on the Basic button', async () => {
await testSubjects.click('painlessContextDropDown');
await retry.try(async () => {
await a11y.testAppSnapshot();
});
await testSubjects.click('basicButtonDropdown');
await a11y.testAppSnapshot();
await retry.try(async () => {
await a11y.testAppSnapshot();
});
});
it.skip('click on the Filter button', async () => {
it('click on the Filter button', async () => {
await testSubjects.click('painlessContextDropDown');
await retry.try(async () => {
await a11y.testAppSnapshot();
});
await testSubjects.click('filterButtonDropdown');
await a11y.testAppSnapshot();
await retry.try(async () => {
await a11y.testAppSnapshot();
});
});
it.skip('click on the Score button', async () => {
it('click on the Score button', async () => {
await testSubjects.click('painlessContextDropDown');
await retry.try(async () => {
await a11y.testAppSnapshot();
});
await testSubjects.click('scoreButtonDropdown');
await a11y.testAppSnapshot();
await retry.try(async () => {
await a11y.testAppSnapshot();
});
});
});
}