Skip to content

Commit 36cc9de

Browse files
juanmaguitarclaude
andcommitted
Wait for the revert to finish before reading the file in the restart journey
The Revert button leaves the moment the revert starts, not when it finishes, so the read right after it raced the checkout and failed on the Windows runner. patch-apply.spec.js already waits for the next-step line to move on; this journey now does the same. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J6koA9mvjSExVaKJp4nvSx
1 parent 38a8e97 commit 36cc9de

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tests/e2e/journeys/store-persistence.spec.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ test( 'an applied patch is still applied after a restart, and still revertable',
9393
await expect( reopened.getByRole( 'button', { name: 'Revert this patch', exact: true } ) ).toHaveCount( 0, {
9494
timeout: 60_000,
9595
} );
96+
// The button leaves the moment the revert starts, so it is not the signal
97+
// that the revert finished. The next-step line is: it names the operation
98+
// while it runs and moves on once the status has been reloaded, which
99+
// happens after the checkout and the record are both written.
100+
await expect( reopened.getByText( 'A patch is being applied or reverted.' ) ).toHaveCount( 0, { timeout: 60_000 } );
96101
expect( read( site.dir, LOGIN ) ).toBe( `${ TRUNK_LOGIN }\n` );
97102
} );
98103

0 commit comments

Comments
 (0)