Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] unskip flaky test #190419

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion 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 @@ -227,7 +235,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

// 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 +255,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'new'
);

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

await browser.closeCurrentWindow();
Expand All @@ -256,6 +265,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