Skip to content

Commit

Permalink
unskip test/functional/apps/maps/group4/discover·js (elastic#149554)
Browse files Browse the repository at this point in the history
Fixes elastic#137408 and
elastic#149358

flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1790

Tests flaky because clicking on `Visualize` button not registered. This
resulted in test failing because the test started looking for elements
in Maps even though the page was still in Discover. PR resolves
flakiness by adding retry around click to ensure `Visualize` button is
clicked as expected.

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
2 people authored and kqualters-elastic committed Feb 6, 2023
1 parent d45cad6 commit d87668d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 7 additions & 1 deletion test/functional/page_objects/discover_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,13 @@ export class DiscoverPageObject extends FtrService {
}

await this.waitUntilFieldPopoverIsOpen();
await this.testSubjects.click(`fieldVisualize-${fieldName}`);
const visualizeButtonTestSubject = `fieldVisualize-${fieldName}`;
// wrap visualize button click in retry to ensure button is clicked and retry if button click is not registered
await this.retry.try(async () => {
await this.testSubjects.click(visualizeButtonTestSubject);
await this.testSubjects.waitForDeleted(visualizeButtonTestSubject);
await this.testSubjects.missingOrFail(visualizeButtonTestSubject);
});
await this.header.waitUntilLoadingHasFinished();
}

Expand Down
4 changes: 1 addition & 3 deletions x-pack/test/functional/apps/maps/group4/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ export default function ({ getService, getPageObjects }) {
const from = 'Sep 22, 2015 @ 00:00:00.000';
const to = 'Sep 22, 2015 @ 04:00:00.000';

// Failing: See https://github.com/elastic/kibana/issues/137408
// Failing: See https://github.com/elastic/kibana/issues/149358
describe.skip('discover visualize button', () => {
describe('discover visualize button', () => {
beforeEach(async () => {
await security.testUser.setRoles([
'test_logstash_reader',
Expand Down

0 comments on commit d87668d

Please sign in to comment.