-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Graph a11y tests (cherry picked from commit 7e44314)
- Loading branch information
Showing
5 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
* 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 browser = getService('browser'); | ||
const PageObjects = getPageObjects(['settings', 'common', 'graph', 'header', 'home']); | ||
|
||
describe('Graph app a11y tests', () => { | ||
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('graph'); | ||
}); | ||
|
||
after(async () => { | ||
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', { | ||
useActualUrl: true, | ||
}); | ||
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await PageObjects.home.removeSampleDataSet('flights'); | ||
}); | ||
|
||
it('Graph listing page', async function () { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('Edit Graph page', async function () { | ||
await testSubjects.click('graphListingTitleLink-Kibana-Sample-Data---Flights'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('Syntax options panel', async function () { | ||
await testSubjects.click('switchQueryLanguageButton'); | ||
await a11y.testAppSnapshot(); | ||
await browser.pressKeys(browser.keys.ESCAPE); | ||
}); | ||
|
||
it('Add fields panel', async function () { | ||
await testSubjects.click('graph-add-field-button'); | ||
await retry.waitFor( | ||
'Add fields panel is visible', | ||
async () => await testSubjects.exists('graph-add-field-button') | ||
); | ||
await a11y.testAppSnapshot(); | ||
await browser.pressKeys(browser.keys.ESCAPE); | ||
}); | ||
|
||
it('Graph save panel', async function () { | ||
await testSubjects.click('graphSaveButton'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('saveCancelButton'); | ||
}); | ||
|
||
it('Graph inspect panel', async function () { | ||
await testSubjects.click('graphInspectButton'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('graphInspectButton'); | ||
}); | ||
|
||
it('Graph settings - advanced settings tab', async function () { | ||
await testSubjects.click('graphSettingsButton'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('Graph settings - block list tab', async function () { | ||
await testSubjects.click('blocklist'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('Graph settings - drilldowns tab', async function () { | ||
await testSubjects.click('drillDowns'); | ||
await a11y.testAppSnapshot(); | ||
await browser.pressKeys(browser.keys.ESCAPE); | ||
}); | ||
|
||
// https://github.com/elastic/kibana/issues/134693 | ||
it.skip('Graph settings drilldown tab - add new drilldown', async function () { | ||
await testSubjects.click('graphAddNewTemplate'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('graphRemoveUrlTemplate'); | ||
await testSubjects.click('euiFlyoutCloseButton'); | ||
await browser.pressKeys(browser.keys.ESCAPE); | ||
}); | ||
|
||
it('Create new graph page', async function () { | ||
await testSubjects.click('graphNewButton'); | ||
await testSubjects.click('confirmModalConfirmButton'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters