Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] a11y tests on adding columns to discover table (#59375) #60017

Merged
merged 1 commit into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
});
}