Skip to content

Conversation

@davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Oct 31, 2025

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 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, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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.
  • Flaky Test Runner 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
  • Review the backport guidelines and apply applicable backport:* labels.

@davismcphee davismcphee self-assigned this Oct 31, 2025
@davismcphee davismcphee added the Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// label Oct 31, 2025
@kibanamachine
Copy link
Contributor

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.
[✅] x-pack/platform/test/serverless/functional/configs/search/config.context_awareness.ts: 50/50 tests passed.
[✅] x-pack/platform/test/serverless/functional/configs/observability/config.context_awareness.ts: 50/50 tests passed.
[✅] x-pack/platform/test/serverless/functional/configs/security/config.examples.context_awareness.ts: 50/50 tests passed.

see run history

@davismcphee davismcphee marked this pull request as ready for review October 31, 2025 03:38
@davismcphee davismcphee requested review from a team as code owners October 31, 2025 03:38
@elasticmachine
Copy link
Contributor

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');
Copy link
Contributor

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');

Copy link
Contributor Author

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.

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@Dosant Dosant left a 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 🤷

@davismcphee davismcphee added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Oct 31, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 510.8KB 510.8KB +40.0B

History

cc @davismcphee

@davismcphee davismcphee merged commit fa8c899 into elastic:main Oct 31, 2025
16 checks passed
@davismcphee davismcphee deleted the fix-discover-tour-test-failures branch October 31, 2025 15:48
ana-davydova pushed a commit to ana-davydova/kibana that referenced this pull request Nov 3, 2025
## 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.
albertoblaz pushed a commit to albertoblaz/kibana that referenced this pull request Nov 4, 2025
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing test: Serverless Search Discover Context Awareness Functional Tests.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_default_app_state·ts - discover/context_awareness extension getDefaultAppState data view mode should render default state Failing test: Serverless Observability ML and Discover Functional Tests.x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_cell_renderers·ts - serverless observability UI - ML and Discover discover/observabilitySolution/context_awareness extension getCellRenderers data view mode Log Level Badge Cell should render log.level badge cell Failing test: Serverless Observability Discover Context Awareness Functional Tests.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_recommended_fields·ts - discover/context_awareness extension getRecommendedFields data view mode should show recommended fields section for matching profile Failing test: Serverless Search Discover Context Awareness Functional Tests.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_cell_renderers·ts - discover/context_awareness extension getCellRenderers data view mode data source profile should not render custom @timestamp or log.level Failing test: Serverless Observability Discover Context Awareness Functional Tests.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_additional_cell_actions·ts - discover/context_awareness extension getAdditionalCellActions data view mode should render additional cell actions for logs data source
Failing test: Serverless Search Discover Context Awareness Functional Tests.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_recommended_fields·ts - discover/context_awareness extension getRecommendedFields data view mode should show recommended fields section for matching profile Failing test: Serverless Security Discover Context Awareness Functional Tests - Example Profiles.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_default_app_state·ts - discover/context_awareness extension getDefaultAppState data view mode should render default state Failing test: Serverless Observability Discover Context Awareness Functional Tests.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_default_app_state·ts - discover/context_awareness extension getDefaultAppState data view mode should render default state Failing test: Serverless Search Discover Context Awareness Functional Tests.x-pack/platform/test/serverless/functional/test_suites/discover/context_awareness/extensions/_get_additional_cell_actions·ts - discover/context_awareness extension getAdditionalCellActions data view mode should render additional cell actions for logs data source Failing test: Serverless Observability ML and Discover Functional Tests.x-pack/solutions/observability/test/serverless/functional/test_suites/discover/context_awareness/_get_recommended_fields·ts - serverless observability UI - ML and Discover discover/observabilitySolution/context_awareness extension getRecommendedFields data view mode should show recommended fields section for matching profile

5 participants