test(configurator): fix header.test.js saved-state test claim (CodeRabbit finding on #474) - #483
Conversation
…tch its assertion CodeRabbit review on PR #474 flagged that the 'saved' state test's name claimed to verify "a distinct title from a fresh, unattempted save," but it queries the exact same title text ('No unsaved changes') as the idle test — the test only ever distinguished the two states by button label text ('Saved' vs 'Save'), never by title. Renamed to describe what the test actually asserts instead of changing the assertion, since the title overlap itself is correct existing StudioHeader behavior (saveState 'saved' with no pending changes legitimately shares idle's title).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoFix misleading saved-state test name in StudioHeader header.test.js
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
8b70bae
into
claude/pr-469-audit-rebase-ggp0e4
Summary
Small follow-up fixing a CodeRabbit finding surfaced on #474 (the aggregate PR) against a test added in already-merged PR7 (#481).
The
'saved'state test intests-components/header.test.jsclaimed to verify "a distinct title from a fresh, unattempted save," but queries the exact same title text ('No unsaved changes') as the idle test — the two states are only ever distinguished by button label text ('Saved'vs'Save'), never by title. Renamed the test to describe what it actually asserts, since the title overlap is correct existingStudioHeaderbehavior (asaveState: 'saved'with no pending changes legitimately shares idle's title) — not a bug to fix in the component.Test plan
npx vitest run tests-components/header.test.js— 11/11 passedGenerated by Claude Code