Skip to content

Commit

Permalink
a11y tests on adding columns to discover table (#59375) (#60017)
Browse files Browse the repository at this point in the history
* a11y tests on adding columns
  • Loading branch information
bhavyarm committed Mar 12, 2020
1 parent e39fa3f commit 30013a7
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions test/accessibility/apps/discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const inspector = getService('inspector');
const docTable = getService('docTable');
const filterBar = getService('filterBar');
const TEST_COLUMN_NAMES = ['@message'];
const TEST_FILTER_COLUMN_NAMES = [
['extension', 'jpg'],
['geo.src', 'IN'],
];

describe('Discover', () => {
before(async () => {
Expand Down Expand Up @@ -57,7 +63,6 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});

// skipping the test for new because we can't fix it right now
it.skip('Click on new to clear the search', async () => {
await PageObjects.discover.clickNewSearchButton();
await a11y.testAppSnapshot();
Expand Down Expand Up @@ -94,7 +99,6 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});

// unable to validate on EUI pop-over
it('click share button', async () => {
await PageObjects.share.clickShareTopNavButton();
await a11y.testAppSnapshot();
Expand All @@ -109,5 +113,29 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.discover.closeSidebarFieldFilter();
await a11y.testAppSnapshot();
});

it('Add a field from sidebar', async () => {
for (const columnName of TEST_COLUMN_NAMES) {
await PageObjects.discover.clickFieldListItemAdd(columnName);
}
await a11y.testAppSnapshot();
});

it.skip('Add more fields from sidebar', async () => {
for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) {
await PageObjects.discover.clickFieldListItem(columnName);
await PageObjects.discover.clickFieldListPlusFilter(columnName, value);
}
await a11y.testAppSnapshot();
});

// Context view test
it('should open context view on a doc', async () => {
await docTable.clickRowToggle();
await (await docTable.getRowActions())[0].click();
await a11y.testAppSnapshot();
});

// Adding rest of the tests after https://github.com/elastic/kibana/issues/53888 is resolved
});
}

0 comments on commit 30013a7

Please sign in to comment.