Skip to content

Commit

Permalink
[dashboard] fix Failing test: Chrome X-Pack UI Functional Tests.x-pac…
Browse files Browse the repository at this point in the history
…k/test/functional/apps/dashboard/group2/sync_colors·ts (elastic#152964)

Fixes elastic#148557

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

Image from failed test shows query autosuggest menu is blocking "create
visualize" button. PR fixes issue be pressing escape to close
autosuggest menu if its open.

![image](https://user-images.githubusercontent.com/373691/223846637-3e595803-e39d-4392-a84c-69a455f70a42.png)

(cherry picked from commit edf3a83)

# Conflicts:
#	test/functional/services/dashboard/add_panel.ts
  • Loading branch information
nreese committed Mar 31, 2023
1 parent daccb4c commit ed870fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/services/dashboard/add_panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class DashboardAddPanelService extends FtrService {
private readonly flyout = this.ctx.getService('flyout');
private readonly common = this.ctx.getPageObject('common');
private readonly header = this.ctx.getPageObject('header');
private readonly browser = this.ctx.getService('browser');

async clickOpenAddPanel() {
this.log.debug('DashboardAddPanel.clickOpenAddPanel');
Expand All @@ -26,6 +27,8 @@ export class DashboardAddPanelService extends FtrService {
async clickCreateNewLink() {
this.log.debug('DashboardAddPanel.clickAddNewPanelButton');
await this.retry.try(async () => {
// prevent query bar auto suggest from blocking button
await this.browser.pressKeys(this.browser.keys.ESCAPE);
await this.testSubjects.click('dashboardAddNewPanelButton');
await this.testSubjects.waitForDeleted('dashboardAddNewPanelButton');
await this.header.waitUntilLoadingHasFinished();
Expand Down

0 comments on commit ed870fb

Please sign in to comment.