Skip to content

Commit 1460d81

Browse files
zaerlclaude
andcommitted
Pin the losing answer's detail staying red once it is the chosen one
Second review pass. The rule that keeps it red wins on source order alone, so a journey asserts it: swapping the two rules turns the journey red. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 86555dd commit 1460d81

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/e2e/journeys/trunk-update.spec.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,12 @@ test( 'an update asks before it resets edits in the tree: cancelling keeps them,
223223
await discardChoice.click();
224224
await expect( discardAndUpdate ).toBeVisible();
225225
await expect( saveAndUpdate ).toHaveCount( 0 );
226-
// INVARIANT — and the ring has moved with the choice.
226+
// INVARIANT — and the ring has moved with the choice. What the answer
227+
// that loses work goes on to say stays in the colour of something going
228+
// wrong when it is the chosen one: being chosen must not quieten it.
227229
expect( ( await ui.paintOf( discardChoice ) ).border ).toBe( brand );
228230
expect( ( await ui.paintOf( saveChoice ) ).border ).not.toBe( brand );
231+
expect( ( await ui.paintOf( discardChoice.getByText( /this cannot be undone$/ ) ) ).text ).toBe( wrong );
229232
await dialog.getByRole( 'button', { name: 'Cancel', exact: true } ).click();
230233
await expect( dialog ).toHaveCount( 0 );
231234
expect( await confirmsAnswered() ).toBe( 0 );

0 commit comments

Comments
 (0)