a11y tests on adding columns to discover table (#59375) (#60017)

* a11y tests on adding columns
This commit is contained in:
Bhavya RM 2020-03-12 12:46:16 -04:00 committed by GitHub
parent e39fa3f4ac
commit 30013a79db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 () => {
@ -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();
@ -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();
@ -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
});
}