Skip to content

Commit

Permalink
Observability a11y tests (#141266) (#141846)
Browse files Browse the repository at this point in the history
* Updated test to use uiSettings.

* Added initial files for observability a11y tests.

* Observability test for the guided setup.

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fixed dashboard merge conflict.

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Changed the wait condition to reduce flakiness.

* Removed .only().

* Skipped a11y test after finding violation.

Co-authored-by: cuffs <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 16589af)

Co-authored-by: John Dorlus <[email protected]>
  • Loading branch information
kibanamachine and John Dorlus authored Sep 26, 2022
1 parent c5719f7 commit 54c0eab
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ export function OverviewPage() {
>
<EuiFlyoutHeader hasBorder>
<EuiTitle size="m">
<h2 id="statusVisualizationFlyoutTitle">
<h2
id="statusVisualizationFlyoutTitle"
data-test-subj="statusVisualizationFlyoutTitle"
>
<FormattedMessage
id="xpack.observability.overview.statusVisualizationFlyoutTitle"
defaultMessage="Guided setup"
Expand Down
42 changes: 42 additions & 0 deletions x-pack/test/accessibility/apps/observability.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

// a11y tests for spaces, space selection and space creation and feature controls

import { describe } from 'mocha';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'infraHome']);
const observability = getService('observability');
const a11y = getService('a11y');
const retry = getService('retry');
const testSubjects = getService('testSubjects');
const esArchiver = getService('esArchiver');

// https://github.com/elastic/kibana/issues/141724
describe.skip('Observability UI', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs');
await PageObjects.common.navigateToApp('observability');
});

describe('Overview', async () => {
before(async () => {
await observability.overview.common.openAlertsSectionAndWaitToAppear();
await a11y.testAppSnapshot();
});
it('Guided Setup', async () => {
await PageObjects.infraHome.clickGuidedSetupButton();
await retry.waitFor('Guided setup header to be visible', async () => {
return await testSubjects.isDisplayed('statusVisualizationFlyoutTitle');
});
await a11y.testAppSnapshot();
});
});
});
}
1 change: 1 addition & 0 deletions x-pack/test/accessibility/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
require.resolve('./apps/stack_monitoring'),
require.resolve('./apps/watcher'),
require.resolve('./apps/rollup_jobs'),
require.resolve('./apps/observability'),
],

pageObjects,
Expand Down

0 comments on commit 54c0eab

Please sign in to comment.