Skip to content

Commit

Permalink
[ML] Functional tests - stabilize Discover custom URL test (#119578)
Browse files Browse the repository at this point in the history
This PR stabilizes the Discover custom URL test by making sure all popover are closed before clicking the Discover hide side bar button.
  • Loading branch information
pheyos authored Nov 24, 2021
1 parent e91c11c commit cdaa030
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x-pack/test/functional/services/ml/custom_urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function MachineLearningCustomUrlsProvider({
getService,
getPageObjects,
}: FtrProviderContext) {
const browser = getService('browser');
const testSubjects = getService('testSubjects');
const retry = getService('retry');
const comboBox = getService('comboBox');
Expand Down Expand Up @@ -169,6 +170,9 @@ export function MachineLearningCustomUrlsProvider({

async assertDiscoverCustomUrlAction(expectedHitCountFormatted: string) {
await PageObjects.discover.waitForDiscoverAppOnScreen();
// Make sure all existing popovers are closed
await browser.pressKeys(browser.keys.ESCAPE);

// During cloud tests, the small browser width might cause hit count to be invisible
// so temporarily collapsing the sidebar ensures the count shows
await PageObjects.discover.closeSidebar();
Expand Down

0 comments on commit cdaa030

Please sign in to comment.