Skip to content

Commit fa8c899

Browse files
authored
[Discover] Fix test failures due to navigation tour (#241395)
## 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 #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 - [ ] 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.
1 parent 4dc3e16 commit fa8c899

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/core/packages/chrome/navigation-tour/src/tour.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ function ActiveTour({ state, tourManager }: { state: TourState; tourManager: Tou
9292
</EuiButton>
9393
) : (
9494
[
95-
<EuiButtonEmpty size="s" color="text" onClick={handleSkip}>
95+
<EuiButtonEmpty
96+
size="s"
97+
color="text"
98+
onClick={handleSkip}
99+
data-test-subj="nav-tour-skip-button"
100+
>
96101
<FormattedMessage
97102
id="core.chrome.navigationTour.skipTourButton"
98103
defaultMessage="Skip tour"

src/platform/test/functional/services/data_views.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ export class DataViewsService extends FtrService {
117117
* Switch Data View from top search bar
118118
*/
119119
public async switchTo(name: string) {
120+
// TODO: remove in https://github.com/elastic/kibana/issues/239313
121+
if (await this.testSubjects.exists('nav-tour-skip-button')) {
122+
await this.testSubjects.click('nav-tour-skip-button');
123+
await this.testSubjects.waitForDeleted('nav-tour-skip-button');
124+
}
120125
const selectedDataView = await this.getSelectedName();
121126
if (name === selectedDataView) {
122127
return;

0 commit comments

Comments
 (0)