Skip to content

Commit

Permalink
ally geo smoke test (#127982)
Browse files Browse the repository at this point in the history
* ally geo

* remove unwanted data

* addressed review comments

* added maps listing page tests

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
rashmivkulkarni and kibanamachine authored Mar 22, 2022
1 parent 7d29236 commit 72399c4
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 0 deletions.
127 changes: 127 additions & 0 deletions x-pack/test/accessibility/apps/maps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/*
* 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.
*/

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

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const a11y = getService('a11y');
const testSubjects = getService('testSubjects');
const retry = getService('retry');
const PageObjects = getPageObjects(['common', 'settings', 'header', 'home', 'maps']);

describe('Maps app meets ally validations', () => {
before(async () => {
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
useActualUrl: true,
});
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.home.addSampleDataSet('flights');
await PageObjects.common.navigateToApp('maps');
});

after(async () => {
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
useActualUrl: true,
});
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.home.removeSampleDataSet('flights');
});

it('loads maps workpads', async function () {
await PageObjects.maps.loadSavedMap('[Flights] Origin Time Delayed');
await a11y.testAppSnapshot();
});

it('click map settings', async function () {
await testSubjects.click('openSettingsButton');
await a11y.testAppSnapshot();
});

it('map save button', async function () {
await testSubjects.click('mapSaveButton');
await a11y.testAppSnapshot();
});

it('map cancel button', async function () {
await testSubjects.click('saveCancelButton');
await a11y.testAppSnapshot();
});

it('map inspect button', async function () {
await testSubjects.click('openInspectorButton');
await a11y.testAppSnapshot();
});

it('map inspect view chooser ', async function () {
await testSubjects.click('inspectorViewChooser');
await a11y.testAppSnapshot();
});

it('map inspector view chooser requests', async function () {
await testSubjects.click('inspectorViewChooserRequests');
await a11y.testAppSnapshot();
});

it('map inspector view chooser requests', async function () {
await PageObjects.maps.openInspectorMapView();
await a11y.testAppSnapshot();
});

it('map inspector close', async function () {
await testSubjects.click('euiFlyoutCloseButton');
await a11y.testAppSnapshot();
});

it('full screen button should exist', async () => {
await testSubjects.click('mapsFullScreenMode');
await a11y.testAppSnapshot();
});

it('displays exit full screen logo button', async () => {
await testSubjects.click('exitFullScreenModeLogo');
await a11y.testAppSnapshot();
});

it(`allows a map to be created`, async () => {
await PageObjects.maps.openNewMap();
await a11y.testAppSnapshot();
await PageObjects.maps.expectExistAddLayerButton();
await a11y.testAppSnapshot();
await PageObjects.maps.saveMap('my test map');
await a11y.testAppSnapshot();
});

it('maps listing page', async function () {
await PageObjects.common.navigateToApp('maps');
await retry.waitFor(
'maps workpads visible',
async () => await testSubjects.exists('itemsInMemTable')
);
await a11y.testAppSnapshot();
});

it('provides bulk selection', async function () {
await testSubjects.click('checkboxSelectAll');
await a11y.testAppSnapshot();
});

it('provides bulk delete', async function () {
await testSubjects.click('deleteSelectedItems');
await a11y.testAppSnapshot();
});

it('single delete modal', async function () {
await testSubjects.click('confirmModalConfirmButton');
await a11y.testAppSnapshot();
});

it('single cancel modal', async function () {
await testSubjects.click('confirmModalCancelButton');
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 @@ -35,6 +35,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
require.resolve('./apps/lens'),
require.resolve('./apps/upgrade_assistant'),
require.resolve('./apps/canvas'),
require.resolve('./apps/maps'),
require.resolve('./apps/security_solution'),
require.resolve('./apps/ml_embeddables_in_dashboard'),
require.resolve('./apps/remote_clusters'),
Expand Down

0 comments on commit 72399c4

Please sign in to comment.