Skip to content

Commit

Permalink
graph a11y tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavyarm committed Jun 17, 2022
1 parent 72bf51c commit f8d70bf
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export function UrlTemplateForm(props: UrlTemplateFormProps) {
<div role="listbox">
{urlTemplateIconChoices.map((icon) => (
<LegacyIcon
aria-label={icon.label}
key={icon.class}
selected={icon === currentTemplate.icon}
icon={icon}
Expand Down
75 changes: 33 additions & 42 deletions x-pack/test/accessibility/apps/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
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');
// });
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();
Expand Down Expand Up @@ -71,43 +70,35 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
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 - advanced settings tab', async function () {
await testSubjects.click('graphSettingsButton');
await a11y.testAppSnapshot();
});



// it('Create new Graph page', async function () {
// await PageObjects.graph.newGraph();
// await a11y.testAppSnapshot();
// });
//
// it('Select a data source panel', async function () {
// await testSubjects.click('graphDatasourceButton');
// await a11y.testAppSnapshot();
// await testSubjects.click('savedObjectTitlekibana_sample_data_flights');
// });
//
// 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 testSubjects.setValue('graph-field-search', 'Carrier');
// });







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();
});
});
}
56 changes: 28 additions & 28 deletions x-pack/test/accessibility/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig.getAll(),

testFiles: [
// require.resolve('./apps/login_page'),
// require.resolve('./apps/kibana_overview'),
// require.resolve('./apps/home'),
// require.resolve('./apps/grok_debugger'),
// require.resolve('./apps/search_profiler'),
// require.resolve('./apps/painless_lab'),
// require.resolve('./apps/uptime'),
// require.resolve('./apps/spaces'),
// require.resolve('./apps/advanced_settings'),
// require.resolve('./apps/dashboard_edit_panel'),
// require.resolve('./apps/users'),
// require.resolve('./apps/roles'),
// require.resolve('./apps/ingest_node_pipelines'),
// require.resolve('./apps/index_lifecycle_management'),
// require.resolve('./apps/ml'),
// require.resolve('./apps/transform'),
// require.resolve('./apps/lens'),
// require.resolve('./apps/upgrade_assistant'),
// require.resolve('./apps/canvas'),
// require.resolve('./apps/maps'),
require.resolve('./apps/login_page'),
require.resolve('./apps/kibana_overview'),
require.resolve('./apps/home'),
require.resolve('./apps/grok_debugger'),
require.resolve('./apps/search_profiler'),
require.resolve('./apps/painless_lab'),
require.resolve('./apps/uptime'),
require.resolve('./apps/spaces'),
require.resolve('./apps/advanced_settings'),
require.resolve('./apps/dashboard_edit_panel'),
require.resolve('./apps/users'),
require.resolve('./apps/roles'),
require.resolve('./apps/ingest_node_pipelines'),
require.resolve('./apps/index_lifecycle_management'),
require.resolve('./apps/ml'),
require.resolve('./apps/transform'),
require.resolve('./apps/lens'),
require.resolve('./apps/upgrade_assistant'),
require.resolve('./apps/canvas'),
require.resolve('./apps/maps'),
require.resolve('./apps/graph'),
// require.resolve('./apps/security_solution'),
// require.resolve('./apps/ml_embeddables_in_dashboard'),
// require.resolve('./apps/remote_clusters'),
// require.resolve('./apps/reporting'),
// require.resolve('./apps/enterprise_search'),
// require.resolve('./apps/license_management'),
// require.resolve('./apps/tags'),
// require.resolve('./apps/search_sessions'),
require.resolve('./apps/security_solution'),
require.resolve('./apps/ml_embeddables_in_dashboard'),
require.resolve('./apps/remote_clusters'),
require.resolve('./apps/reporting'),
require.resolve('./apps/enterprise_search'),
require.resolve('./apps/license_management'),
require.resolve('./apps/tags'),
require.resolve('./apps/search_sessions'),
],

pageObjects,
Expand Down

0 comments on commit f8d70bf

Please sign in to comment.