Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dashboard] Fix flaky pluggable actions test (elastic#167926)
Closes elastic#136460 ## Summary Similar to elastic#167836, navigation through `header.clickDashboard()` was flaky in the attached test because the same `data-test-subj` was re-used for both the application-specific top navigation **and** the reusable application listing page component: https://github.com/elastic/kibana/blob/8b6ba3d15ff18de07d32ab2302bf9e18844ce25c/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx#L120-L124 https://github.com/elastic/kibana/blob/8b6ba3d15ff18de07d32ab2302bf9e18844ce25c/packages/content-management/table_list_view/src/table_list_view.tsx#L91-L96 This meant that, when the referenced flaky test tried to navigation from the Visualization listing page to the dashboard app in `clearSavedObjectsFromAppLinks` via the header page object's `clickDashboard` method, it wasn't actually waiting to navigate to the dashboard app because it detected the `top-nav` data test subject from the **visualization** listing page **and not** from the dashboard app. Therefore, instead of navigating through the `header` method, I switched to the new `navigateToAppFromAppsMenu`, which relies on the URL to update to ensure navigation has occured rather than the `top-nav` data test subject. I also added logic to close the flyout as part of the test cleanup, since it was remaining open even after navigating to the Visualizations listing page, which was getting in the way of the failure screenshot. ### Flaky Test Runner - Without closing of flyout: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3323 ![image](https://github.com/elastic/kibana/assets/8698078/628f0da9-1e2a-45a9-b58b-dab92e345118) - With closing of flyout: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3336 ![image](https://github.com/elastic/kibana/assets/8698078/3456db1a-9cee-4db9-a28d-4c0d1520a5ec) ### Checklist - [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 ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- Loading branch information