Skip to content

Check the Design System version menu on demo, not the legacy dropdown's test id - #4806

Merged
Mpdreamz merged 1 commit into
mainfrom
fix/versions-journey-design-system
Nov 10, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
fix/versions-journey-design-system

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

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-dropdown failed on docs-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). With navigation-preview the layout renders VersionMenu: a native details.link-menu inside div.layout__version at the top of #pages-nav. It renders nothing when a page has no other versions, because VersionMenu.FromJson returns null for null or no items. Edge's /docs/reference/elasticsearch carries items='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-preview and feature !navigation-preview blocks. The Design System block checks that the trigger is visible, that the details element is closed, that clicking opens it, and that a version link shows. The legacy block is unchanged. get-started still has versions on all three sites.

Out of scope: reference/elasticsearch has a dropdown on prod and edge but none on demo. That follows from FromJson returning null for a page without versions, so I treated it as intended Design System behaviour and not a bug.

Verify

dotnet run --project src/tooling/docs-journeys -- run --url https://docs-demo.elastic.dev --area versions
dotnet run --project src/tooling/docs-journeys -- run --url https://docs-edge.elastic.dev --area versions
dotnet run --project src/tooling/docs-journeys -- run --url https://www.elastic.co --area versions

All three print 1 passed. Without this change the demo run fails.

Untested: from a GitHub runner.

…'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]>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner November 10, 2026 17:42
@Mpdreamz Mpdreamz added the bug label Nov 10, 2026
@Mpdreamz
Mpdreamz requested a review from reakaleek November 10, 2026 17:42
@github-actions

Copy link
Copy Markdown
Contributor

@Mpdreamz
Mpdreamz merged commit b9a0947 into main Nov 10, 2026
48 checks passed
@Mpdreamz
Mpdreamz deleted the fix/versions-journey-design-system branch November 10, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant