Skip to content

Commit afaf6f4

Browse files
only21milclaude
andcommitted
test(web): reset the composer draft store's storage record between snap-shot tests
The cross-tab draft change keeps a module-level record of what the store last wrote and skips writing entries that match it. The snap-shot tests cleared localStorage behind the store's back, so a later test that rebuilt the same draft wrote nothing and the delivery check found no saved attachment. Clear through the store's persist API so both reset together. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 06923a7 commit afaf6f4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎apps/web/src/components/desktop/SnapShotCoordinator.browser.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ const projectRef = scopeProjectRef(environmentId, ProjectId.make("snap-shot-proj
5151
function setup(): Disposable {
5252
storage.clear();
5353
vi.stubGlobal("localStorage", storage);
54+
// Resets the store's record of what it last wrote along with the storage it wrote to.
55+
void useComposerDraftStore.persist.clearStorage();
5456
useComposerDraftStore.setState({
5557
draftsByThreadKey: {},
5658
draftThreadsByThreadKey: {},

0 commit comments

Comments
 (0)