From 13a3fca386245912b4f86f987bfd85294fbfdf40 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Jul 2026 13:41:42 +0000 Subject: [PATCH] test(configurator): fix header.test.js's saved-state test claim to match its assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- configurator/tests-components/header.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configurator/tests-components/header.test.js b/configurator/tests-components/header.test.js index e34bf67f..4207bb0e 100644 --- a/configurator/tests-components/header.test.js +++ b/configurator/tests-components/header.test.js @@ -70,7 +70,7 @@ describe('StudioHeader', () => { expect(btn).toHaveTextContent('Saving…'); }); - test('saved: button reads "Saved" with a distinct title from a fresh, unattempted save', () => { + test('saved: button reads "Saved" (title matches idle\'s "no pending changes" state)', () => { render(StudioHeader, { props: { ...baseProps, hasPendingChanges: false, saveState: 'saved' } }); const btn = screen.getByTitle('No unsaved changes'); expect(btn).toHaveTextContent('Saved');