Skip to content

Commit

Permalink
[8.11] Add a slight delay before selecting a visualization type (elas…
Browse files Browse the repository at this point in the history
…tic#169851) (elastic#169917)

# Backport

This will backport the following commits from `main` to `8.11`:
- [Add a slight delay before selecting a visualization type
(elastic#169851)](elastic#169851)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2023-10-26T09:50:04Z","message":"Add
a slight delay before selecting a visualization type (elastic#169851)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/89958\r\n\r\nAs per my
[latest\r\ncomment](https://github.com/elastic/kibana/issues/89958#issuecomment-1779553320)\r\non
the issue, I believe that the test logic sometimes fails to
select\r\nthe appropriate visualisation type, in this case `Text` (aka
markdown).\r\n\r\nThe failure manifests [a couple of
steps\r\nlater](https://github.com/elastic/kibana/blob/main/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts#L155),\r\nas
this operation does not meet the expected \"before state\".\r\n\r\nThe
strategy of this fix consists in introducing an extra step,\r\nsearching
for the visualisation type, which should give the UI enough\r\ntime to
attach an event handler to the
control.","sha":"3d19006052a33b224b03c7fbda2ed408d9a43462","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","test-failure-flaky","Team:SharedUX","backport:prev-minor","v8.12.0"],"number":169851,"url":"https://github.com/elastic/kibana/pull/169851","mergeCommit":{"message":"Add
a slight delay before selecting a visualization type (elastic#169851)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/89958\r\n\r\nAs per my
[latest\r\ncomment](https://github.com/elastic/kibana/issues/89958#issuecomment-1779553320)\r\non
the issue, I believe that the test logic sometimes fails to
select\r\nthe appropriate visualisation type, in this case `Text` (aka
markdown).\r\n\r\nThe failure manifests [a couple of
steps\r\nlater](https://github.com/elastic/kibana/blob/main/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts#L155),\r\nas
this operation does not meet the expected \"before state\".\r\n\r\nThe
strategy of this fix consists in introducing an extra step,\r\nsearching
for the visualisation type, which should give the UI enough\r\ntime to
attach an event handler to the
control.","sha":"3d19006052a33b224b03c7fbda2ed408d9a43462"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169851","number":169851,"mergeCommit":{"message":"Add
a slight delay before selecting a visualization type (elastic#169851)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/89958\r\n\r\nAs per my
[latest\r\ncomment](https://github.com/elastic/kibana/issues/89958#issuecomment-1779553320)\r\non
the issue, I believe that the test logic sometimes fails to
select\r\nthe appropriate visualisation type, in this case `Text` (aka
markdown).\r\n\r\nThe failure manifests [a couple of
steps\r\nlater](https://github.com/elastic/kibana/blob/main/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts#L155),\r\nas
this operation does not meet the expected \"before state\".\r\n\r\nThe
strategy of this fix consists in introducing an extra step,\r\nsearching
for the visualisation type, which should give the UI enough\r\ntime to
attach an event handler to the
control.","sha":"3d19006052a33b224b03c7fbda2ed408d9a43462"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
  • Loading branch information
kibanamachine and gsoldevila authored Oct 26, 2023
1 parent 8eebfbc commit bfa39c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions test/functional/page_objects/visualize_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ export class VisualizePageObject extends FtrService {
}

public async clickVisType(type: string) {
// checking for the existence of the control gives the UI more time to bind a click handler
// see https://github.com/elastic/kibana/issues/89958
if (!(await this.hasVisType(type))) {
throw new Error(`The '${type}' visualization type does not exist (visType-${type})`);
}
await this.testSubjects.click(`visType-${type}`);
await this.header.waitUntilLoadingHasFinished();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/89958
describe.skip('creating', () => {
describe('creating', () => {
before(async () => {
await PageObjects.visualize.gotoVisualizationLandingPage();
// delete all visualizations to create new ones explicitly
Expand Down

0 comments on commit bfa39c7

Please sign in to comment.