Skip to content

Commit

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

This will backport the following commits from `main` to `8.15`:
- [[Lens] unskip flaky test
(#190419)](#190419)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marta
Bondyra","email":"4283304+mbondyra@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-08-14T13:39:30Z","message":"[Lens]
unskip flaky test (#190419)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/164623","sha":"f74d479014bd851b1f88f25d3b9886a71b8781d2","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","v8.16.0"],"title":"[Lens]
unskip flaky
test","number":190419,"url":"https://github.com/elastic/kibana/pull/190419","mergeCommit":{"message":"[Lens]
unskip flaky test (#190419)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/164623","sha":"f74d479014bd851b1f88f25d3b9886a71b8781d2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190419","number":190419,"mergeCommit":{"message":"[Lens]
unskip flaky test (#190419)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/164623","sha":"f74d479014bd851b1f88f25d3b9886a71b8781d2"}}]}]
BACKPORT-->

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
  • Loading branch information
kibanamachine and mbondyra authored Aug 14, 2024
1 parent 715dcdc commit ab29fb9
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 ab29fb9

Please sign in to comment.