[8.6] [Discover] Unskip flaky a11y tests (#149827) (#149837)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Discover] Unskip flaky a11y tests
(#149827)](https://github.com/elastic/kibana/pull/149827)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2023-01-30T14:18:24Z","message":"[Discover]
Unskip flaky a11y tests (#149827)\n\nCloses
https://github.com/elastic/kibana/issues/147186\r\n\r\n100x\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1811","sha":"86b38a824d3962e1f2d8ee9552bd860e46eb9e00","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","backport:prev-minor","v8.7.0"],"number":149827,"url":"https://github.com/elastic/kibana/pull/149827","mergeCommit":{"message":"[Discover]
Unskip flaky a11y tests (#149827)\n\nCloses
https://github.com/elastic/kibana/issues/147186\r\n\r\n100x\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1811","sha":"86b38a824d3962e1f2d8ee9552bd860e46eb9e00"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/149827","number":149827,"mergeCommit":{"message":"[Discover]
Unskip flaky a11y tests (#149827)\n\nCloses
https://github.com/elastic/kibana/issues/147186\r\n\r\n100x\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1811","sha":"86b38a824d3962e1f2d8ee9552bd860e46eb9e00"}}]}]
BACKPORT-->
This commit is contained in:
Julia Rechkunova 2023-01-30 16:34:39 +01:00 committed by GitHub
parent 810aa0c930
commit d162b07f4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,15 +11,16 @@ import { FtrProviderContext } from '../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'discover', 'header', 'share', 'timePicker']);
const a11y = getService('a11y');
const dataGrid = getService('dataGrid');
const savedQueryManagementComponent = getService('savedQueryManagementComponent');
const inspector = getService('inspector');
const testSubjects = getService('testSubjects');
const TEST_COLUMN_NAMES = ['dayOfWeek', 'DestWeather'];
const toasts = getService('toasts');
const browser = getService('browser');
const retry = getService('retry');
// Failing: See https://github.com/elastic/kibana/issues/147186
describe.skip('Discover a11y tests', () => {
describe('Discover a11y tests', () => {
before(async () => {
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setCommonlyUsedTime('Last_7 days');
@ -127,15 +128,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
it('a11y test for data-grid table with columns', async () => {
await testSubjects.click('toggleColumnButton-Cancelled');
if (await testSubjects.exists('openFieldActionsButton-Carrier')) {
await testSubjects.click('openFieldActionsButton-Carrier');
} else {
await testSubjects.existOrFail('fieldActionsGroup-Carrier');
}
await testSubjects.click('toggleColumnButton-Carrier');
await testSubjects.click('euiFlyoutCloseButton');
await toasts.dismissAllToasts();
await retry.try(async () => {
await dataGrid.clickFieldActionInFlyout('Cancelled', 'toggleColumnButton');
});
await retry.try(async () => {
await dataGrid.clickFieldActionInFlyout('Carrier', 'toggleColumnButton');
});
await retry.try(async () => {
await testSubjects.click('euiFlyoutCloseButton');
});
await retry.try(async () => {
await toasts.dismissAllToasts();
});
await a11y.testAppSnapshot();
});