mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Core UI] A11y tests for Kibana overview page (#80285)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
70ccd58566
commit
240fddc4ff
4 changed files with 99 additions and 0 deletions
55
test/accessibility/apps/kibana_overview.ts
Normal file
55
test/accessibility/apps/kibana_overview.ts
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const PageObjects = getPageObjects(['common', 'home']);
|
||||
const a11y = getService('a11y');
|
||||
|
||||
describe('Kibana overview', () => {
|
||||
const esArchiver = getService('esArchiver');
|
||||
|
||||
before(async () => {
|
||||
await esArchiver.load('empty_kibana');
|
||||
await PageObjects.common.navigateToApp('kibanaOverview');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
|
||||
useActualUrl: true,
|
||||
});
|
||||
await PageObjects.home.removeSampleDataSet('flights');
|
||||
await esArchiver.unload('empty_kibana');
|
||||
});
|
||||
|
||||
it('Getting started view', async () => {
|
||||
await a11y.testAppSnapshot();
|
||||
});
|
||||
|
||||
it('Overview view', async () => {
|
||||
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
|
||||
useActualUrl: true,
|
||||
});
|
||||
await PageObjects.home.addSampleDataSet('flights');
|
||||
await PageObjects.common.navigateToApp('kibanaOverview');
|
||||
await a11y.testAppSnapshot();
|
||||
});
|
||||
});
|
||||
}
|
|
@ -36,6 +36,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
require.resolve('./apps/console'),
|
||||
require.resolve('./apps/home'),
|
||||
require.resolve('./apps/filter_panel'),
|
||||
require.resolve('./apps/kibana_overview'),
|
||||
],
|
||||
pageObjects,
|
||||
services,
|
||||
|
|
42
x-pack/test/accessibility/apps/kibana_overview.ts
Normal file
42
x-pack/test/accessibility/apps/kibana_overview.ts
Normal file
|
@ -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;
|
||||
* 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', 'home']);
|
||||
const a11y = getService('a11y');
|
||||
|
||||
describe('Kibana overview', () => {
|
||||
const esArchiver = getService('esArchiver');
|
||||
|
||||
before(async () => {
|
||||
await esArchiver.load('empty_kibana');
|
||||
await PageObjects.common.navigateToApp('kibanaOverview');
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
|
||||
useActualUrl: true,
|
||||
});
|
||||
await PageObjects.home.removeSampleDataSet('flights');
|
||||
await esArchiver.unload('empty_kibana');
|
||||
});
|
||||
|
||||
it('Getting started view', async () => {
|
||||
await a11y.testAppSnapshot();
|
||||
});
|
||||
|
||||
it('Overview view', async () => {
|
||||
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
|
||||
useActualUrl: true,
|
||||
});
|
||||
await PageObjects.home.addSampleDataSet('flights');
|
||||
await PageObjects.common.navigateToApp('kibanaOverview');
|
||||
await a11y.testAppSnapshot();
|
||||
});
|
||||
});
|
||||
}
|
|
@ -25,6 +25,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
require.resolve('./apps/dashboard_edit_panel'),
|
||||
require.resolve('./apps/users'),
|
||||
require.resolve('./apps/roles'),
|
||||
require.resolve('./apps/kibana_overview'),
|
||||
],
|
||||
|
||||
pageObjects,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue