Skip to content

fix: Scope Wizard test utility findMenuNavigationLinks to sidebar navigation#4286

Merged
Who-is-PS merged 4 commits intomainfrom
dev-v3-philosr-wizard-test-fix
Feb 24, 2026
Merged

fix: Scope Wizard test utility findMenuNavigationLinks to sidebar navigation#4286
Who-is-PS merged 4 commits intomainfrom
dev-v3-philosr-wizard-test-fix

Conversation

@Who-is-PS
Copy link
Member

@Who-is-PS Who-is-PS commented Feb 24, 2026

Description

After the introduction of the expandable step navigation (#4200), findMenuNavigationLinks() returns double the expected number of links. Both the desktop sidebar and the mobile expandable navigation render navigation links with the same CSS class in the DOM. Since findAllByClassName searches the entire component tree, it picks up links from both navigations.

This scopes findMenuNavigationLinks() and findMenuNavigationLink() to only search within the sidebar <nav> element (.navigation class), restoring backward-compatible behavior.

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Who-is-PS Who-is-PS changed the title fix: Wizard step navigation test fix: Scope Wizard test utility findMenuNavigationLinks to sidebar navigation Feb 24, 2026
pan-kot
pan-kot previously approved these changes Feb 24, 2026
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.42%. Comparing base (5cfcc6d) to head (a63e247).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4286   +/-   ##
=======================================
  Coverage   97.42%   97.42%           
=======================================
  Files         891      891           
  Lines       26098    26098           
  Branches     9435     9435           
=======================================
  Hits        25426    25426           
  Misses        629      629           
  Partials       43       43           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Who-is-PS Who-is-PS removed the request for review from SpyZzey February 24, 2026 08:09

findMenuNavigationLinks(): Array<ElementWrapper> {
return this.findAllByClassName(styles['navigation-link']);
return this.findByClassName(styles.navigation)!.findAllByClassName(styles['navigation-link']);
Copy link
Member

Choose a reason for hiding this comment

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

The navigation is always present, right - including mobile viewport?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the sidebar <nav> with .navigation class is always in the DOM. It's never conditionally rendered. On small containers it's CSS-hidden (display: none) but still present, so findByClassName will always find it.

@Who-is-PS Who-is-PS added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit 8212f28 Feb 24, 2026
85 of 86 checks passed
@Who-is-PS Who-is-PS deleted the dev-v3-philosr-wizard-test-fix branch February 24, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants