Repository navigation
Check the Design System version menu on demo, not the legacy dropdown's test id - #4806
Merged
Merged
Conversation
…'s test id The version journey failed on demo because it looked for data-testid="docs-version-dropdown", which only the legacy layout has. With navigation-preview the layout renders a native details.link-menu at the top of the pages navigation, and renders nothing when a page has no other versions: edge's reference/elasticsearch has items='null'. The journey now has a block for each layout and still opens get-started, which has versions on prod, edge and demo. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4806/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The version journey failed on demo because it looked for the legacy dropdown's test id; it now checks the Design System menu there and keeps the legacy steps for the other sites.
Affects: Site UI
Prompt summary: Land the journeys, and find out whether the demo version dropdown failure is a product bug or a journey that is wrong.
Why
versions/version-dropdownfailed ondocs-demo.elastic.dev("no element matches[data-testid='docs-version-dropdown']"). An earlier reading was that demo has no dropdown. It does.data-testid="docs-version-dropdown"is only in the legacy templates (_PagesNav,_SecondaryNav,_TableOfContents). Withnavigation-previewthe layout rendersVersionMenu: a nativedetails.link-menuinsidediv.layout__versionat the top of#pages-nav. It renders nothing when a page has no other versions, becauseVersionMenu.FromJsonreturns null fornullor no items. Edge's/docs/reference/elasticsearchcarriesitems='null'in the legacy element for the same reason.What
One journey, a block per layout
The desktop and phone steps are in
feature navigation-previewandfeature !navigation-previewblocks. The Design System block checks that the trigger is visible, that thedetailselement is closed, that clicking opens it, and that a version link shows. The legacy block is unchanged.get-startedstill has versions on all three sites.Out of scope:
reference/elasticsearchhas a dropdown on prod and edge but none on demo. That follows fromFromJsonreturning null for a page without versions, so I treated it as intended Design System behaviour and not a bug.Verify
All three print
1 passed. Without this change the demo run fails.Untested: from a GitHub runner.