Skip to content

Commit

Permalink
[Lens] unskip flaky test (elastic#190419)
Browse files Browse the repository at this point in the history
## Summary

Fixes elastic#164623
  • Loading branch information
mbondyra authored Aug 14, 2024
1 parent 95736fb commit f74d479
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(await dataViews.isAdHoc()).to.be(true);
};

const waitForPageReady = async () => {
await PageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('page ready after refresh', async () => {
const queryBarVisible = await testSubjects.exists('globalQueryBar');
return queryBarVisible;
});
};

describe('lens ad hoc data view tests', () => {
it('should allow building a chart based on ad hoc data view', async () => {
await setupAdHocDataView();
Expand Down Expand Up @@ -225,9 +233,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const [lensHandle] = await browser.getAllWindowHandles();
await browser.switchToWindow(lensHandle);
});

// Failing: See https://github.com/elastic/kibana/issues/164623
it.skip('should navigate to discover from embeddable correctly', async () => {
it('should navigate to discover from embeddable correctly', async () => {
const [lensHandle] = await browser.getAllWindowHandles();
await browser.switchToWindow(lensHandle);
await PageObjects.header.waitUntilLoadingHasFinished();
Expand All @@ -247,6 +253,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'new'
);

await PageObjects.header.waitUntilLoadingHasFinished();
await checkDiscoverNavigationResult();

await browser.closeCurrentWindow();
Expand All @@ -256,6 +263,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

// adhoc data view should be persisted after refresh
await browser.refresh();
await waitForPageReady();
await checkDiscoverNavigationResult();

await browser.closeCurrentWindow();
Expand Down

0 comments on commit f74d479

Please sign in to comment.