-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Discover] Fix test failures due to navigation tour #241395
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
[Discover] Fix test failures due to navigation tour #241395
Conversation
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#9689[✅] x-pack/solutions/observability/test/serverless/functional/configs/config.ml_and_discover.ts: 50/50 tests passed. |
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
| public async switchTo(name: string) { | ||
| // TODO: remove in https://github.com/elastic/kibana/issues/239313 | ||
| if (await this.testSubjects.exists('nav-tour-skip-button')) { | ||
| await this.testSubjects.click('nav-tour-skip-button'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add await this.testSubjects.waitForDeleted('nav-tour-skip-button');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing, updated here: 84867c2.
jughosta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Dosant
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Sorry you have to do this hack.
Maybe there is localstorage clean up happening somewhere in-between your tests 🤷
💚 Build Succeeded
Metrics [docs]Page load bundle
History
cc @davismcphee |
## Summary This PR fixes the flaky Discover tests caused by the new navigation tour blocking the data view picker: <img src="https://github.com/user-attachments/assets/48173cbb-c2dc-46be-b959-784bf7dd5681" /> Looks like the tour still shows sometimes even though `browser.setLocalStorageItem('solutionNavigationTour:completed', 'true')` should run when `loginWithRole` is called, and I wasn't able to reproduce it locally. I'm open to suggestions for alternatives, but for now I'm just manually skipping the tour if it's visible before switching data views. Seems like the tour (and this workaround) will be removed in elastic#239313 anyway. Resolves elastic#241044. Resolves elastic#241042. Resolves elastic#240915. Resolves elastic#240912. Resolves elastic#240855. Resolves elastic#240798. Resolves elastic#240504. Resolves elastic#240369. Resolves elastic#240288. Resolves elastic#240242. Resolves elastic#240167. ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
## Summary This PR fixes the flaky Discover tests caused by the new navigation tour blocking the data view picker: <img src="https://github.com/user-attachments/assets/48173cbb-c2dc-46be-b959-784bf7dd5681" /> Looks like the tour still shows sometimes even though `browser.setLocalStorageItem('solutionNavigationTour:completed', 'true')` should run when `loginWithRole` is called, and I wasn't able to reproduce it locally. I'm open to suggestions for alternatives, but for now I'm just manually skipping the tour if it's visible before switching data views. Seems like the tour (and this workaround) will be removed in elastic#239313 anyway. Resolves elastic#241044. Resolves elastic#241042. Resolves elastic#240915. Resolves elastic#240912. Resolves elastic#240855. Resolves elastic#240798. Resolves elastic#240504. Resolves elastic#240369. Resolves elastic#240288. Resolves elastic#240242. Resolves elastic#240167. ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
Summary
This PR fixes the flaky Discover tests caused by the new navigation tour blocking the data view picker:

Looks like the tour still shows sometimes even though
browser.setLocalStorageItem('solutionNavigationTour:completed', 'true')should run whenloginWithRoleis called, and I wasn't able to reproduce it locally. I'm open to suggestions for alternatives, but for now I'm just manually skipping the tour if it's visible before switching data views. Seems like the tour (and this workaround) will be removed in #239313 anyway.Resolves #241044.
Resolves #241042.
Resolves #240915.
Resolves #240912.
Resolves #240855.
Resolves #240798.
Resolves #240504.
Resolves #240369.
Resolves #240288.
Resolves #240242.
Resolves #240167.
Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.