Skip to content
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

[Serverless] Add navigation functional tests #161856

Merged
merged 14 commits into from
Jul 18, 2023

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Jul 13, 2023

Summary

close #160011

This PR adds helpers for testing serverless specific navigation. There are helpers for sidenav, breadcrumbs, global search, recent items, logo, checking that no page reload happened during nav.

This PR also adds some serverless specific navigation tests. The should serve as a navigation smoke check and testing helpers example. Solution teams can improve them as they see fit.

@Dosant Dosant changed the title add chrome e2e tests (search) Add Serverless Nav functional tests Jul 14, 2023
@Dosant Dosant changed the title Add Serverless Nav functional tests [Serverless] Add navigation functional tests Jul 14, 2023
@Dosant Dosant added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Project:Serverless Work as part of the Serverless project for its initial release Feature:Chrome Core's Chrome UI (sidenav, header, breadcrumbs) labels Jul 14, 2023
@Dosant Dosant marked this pull request as ready for review July 17, 2023 09:24
@Dosant Dosant requested review from a team as code owners July 17, 2023 09:24
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@Dosant Dosant requested review from a team and semd July 17, 2023 09:24
@Dosant Dosant added the release_note:skip Skip the PR/issue when compiling release notes label Jul 17, 2023
@Dosant Dosant requested a review from a team July 17, 2023 09:29

it('breadcrumbs reflect navigation state', async () => {
await svlCommonNavigation.breadcrumbs.expectExists();
// TODO: use `deepLinkId` instead of `text`, once security deep links are available in @kbn/core-chrome-browser
Copy link
Contributor

Choose a reason for hiding this comment

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

We are already setting the navigationTree, should we do something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't required, but nice to have. For example, observability and search have their deep link ids types in a separate package so that we can use it for type safety and auto complete in different places.

export type AppDeepLinkId =
| AnalyticsDeepLink
| DevToolsLink
| MlLink
| ManagementLink
| SearchLink
| ObservabilityLink;

@Dosant Dosant self-assigned this Jul 17, 2023
Copy link
Member

@sphilipse sphilipse left a comment

Choose a reason for hiding this comment

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

search changes LGTM, thanks for adding these tests!

Copy link
Contributor

@achyutjhunjhunwala achyutjhunjhunwala left a comment

Choose a reason for hiding this comment

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

Observability changes are good to go, LGTM 👍🏼

Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

Awesome work @Dosant ! I really like the helpers 👍
Left small comments, no blockers.

},

// helper to assert that the page did not reload
async createNoPageReloadCheck() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice helper! 🎉

Dosant added 2 commits July 18, 2023 16:06
…rome-e2e

# Conflicts:
#	x-pack/plugins/serverless_observability/public/components/side_navigation/index.tsx
@kibana-ci
Copy link
Collaborator

💚 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 360.8KB 360.9KB +146.0B
serverlessObservability 26.0KB 26.2KB +228.0B
serverlessSearch 29.4KB 29.6KB +228.0B
total +602.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Dosant

@Dosant Dosant merged commit f6e6b77 into elastic:main Jul 18, 2023
@kibanamachine kibanamachine added v8.10.0 backport:skip This commit does not require backporting labels Jul 18, 2023
ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Aug 1, 2023
## Summary

close elastic#160011

This PR adds helpers for testing serverless specific navigation. There
are helpers for sidenav, breadcrumbs, global search, recent items, logo,
checking that no page reload happened during nav.

This PR also adds some serverless specific navigation tests. The should
serve as a navigation smoke check and testing helpers example. Solution
teams can improve them as they see fit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Chrome Core's Chrome UI (sidenav, header, breadcrumbs) Project:Serverless Work as part of the Serverless project for its initial release release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Serverless] Chrome e2e tests
8 participants