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 (#152964)

Fixes #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)
  • Loading branch information
nreese authored Mar 8, 2023
1 parent 9409550 commit edf3a83
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 common = this.ctx.getPageObject('common');
private readonly header = this.ctx.getPageObject('header');
private readonly savedObjectsFinder = this.ctx.getService('savedObjectsFinder');
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 edf3a83

Please sign in to comment.