Skip to content

Commit fa95fca

Browse files
committed
test(app-shell): controls assert the outcome only
Claude-Session: https://claude.ai/code/session_01L6bhgWAbKPqt7vTgX5qgUn Co-authored-by: Claude <noreply@anthropic.com>
1 parent b0d30b4 commit fa95fca

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎ui/packages/app-shell/src/views/metadata-admin/detailSaveAtOnce-37440.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ describe("the item page's Save publishes only the draft it wrote (objectstack#37
4141
expect(door.liveOf(TARGET.type, TARGET.name, PKG)).toBeUndefined();
4242
expect(door.draftOf(TARGET.type, TARGET.name, PKG)).toEqual({ label: 'theirs' });
4343
expect(door.calls.some(([c]) => c === 'reset')).toBe(false);
44+
expect(door.calls.find(([c]) => c === 'publish')?.[3]).toEqual({ packageId: PKG, draftVersion });
4445
});
4546

4647
it("PIN (guarded): the same, with nothing asked — the refusal is the draft's, not a live change", async () => {
@@ -63,7 +64,6 @@ describe("the item page's Save publishes only the draft it wrote (objectstack#37
6364
const pinned = guarded ? guardOver(door).guard.publish : undefined;
6465
expect(await publishDetailSave(door.client, { ...TARGET, draftVersion }, false, pinned)).toEqual({ kind: 'published' });
6566
expect(door.liveOf(TARGET.type, TARGET.name, PKG)).toEqual({ label: 'mine' });
66-
expect(door.calls.find(([c]) => c === 'publish')?.[3]).toEqual({ packageId: PKG, draftVersion });
6767
}
6868
});
6969
});

‎ui/packages/app-shell/src/views/studio-design/studioSaveBar.draftPin-37440.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ describe('publishSavedItem, unpinned door: the publish names the draft the Save
3535
expect(door.liveOf(ITEM.type, ITEM.name, PKG)).toBeUndefined();
3636
expect(door.draftOf(ITEM.type, ITEM.name, PKG)).toEqual({ label: 'theirs' });
3737
expect(door.calls.some(([c]) => c === 'reset')).toBe(false);
38+
expect(door.calls.find(([c]) => c === 'publish')?.[3]).toEqual({ packageId: PKG, draftVersion });
3839
});
3940

4041
it('a refusal for another reason takes back only the draft this Save wrote, pinned to its receipt', async () => {
@@ -52,7 +53,6 @@ describe('publishSavedItem, unpinned door: the publish names the draft the Save
5253
const draftVersion = await savedDraft(door, { label: 'mine' });
5354
expect(await publishSavedItem(door.client, { ...ITEM, draftVersion }, false)).toEqual({ ok: true });
5455
expect(door.liveOf(ITEM.type, ITEM.name, PKG)).toEqual({ label: 'mine' });
55-
expect(door.calls.find(([c]) => c === 'publish')?.[3]).toEqual({ packageId: PKG, draftVersion });
5656
});
5757
});
5858

0 commit comments

Comments
 (0)