Skip to content

test(nav): Add visual snapshots for the secondary navigation - #130892

Merged
priscilawebdev merged 1 commit into
masterfrom
priscila/test/secondary-nav-snapshots
Nov 12, 2026
Merged

priscilawebdev merged 1 commit into
masterfrom
priscila/test/secondary-nav-snapshots

Conversation

@priscilawebdev

@priscilawebdev priscilawebdev commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Adds visual snapshots for the secondary navigation so layout regressions like the one fixed in #130889 (collapsible section title and chevron stacking onto two rows in the settings nav) get caught in CI.

Cover the secondary sidebar header, titled (collapsible) and untitled
sections, separators, active links, leading icons and ellipsized labels,
in both the legacy and settings-v3 layouts.

The settings snapshots catch the regression fixed in #130889, where the
collapsible section title and its chevron stacked onto two rows.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 12, 2026
@priscilawebdev
priscilawebdev marked this pull request as ready for review November 12, 2026 10:42
@priscilawebdev
priscilawebdev requested a review from a team as a code owner November 12, 2026 10:42
@priscilawebdev
priscilawebdev enabled auto-merge (squash) November 12, 2026 10:45

@sentry-junior sentry-junior Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. The settings-legacy snapshot goes through the legacy canCollapse branch of SectionTitle, which is the path #130889 fixed: the default primary-nav context is sidebar and the sections have titles, so that's covered. The v3 variants also cover the other SectionTitle and Separator branches. Using MemoryRouter with the real useLocation is simpler than the jest.mock setup other snapshot files use, and it keeps useSettingsNavigation and the active-link state working. The file passes in the snapshot job, and the new images are registered.

@Angelodaniel Angelodaniel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@priscilawebdev
priscilawebdev merged commit 9b1e57b into master Nov 12, 2026
87 checks passed
@priscilawebdev
priscilawebdev deleted the priscila/test/secondary-nav-snapshots branch November 12, 2026 10:51

This branch was successfully deployed

1 active deployment
Preview — 0e2bb78b Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants