test(assistant): a changed journal entry can be undone

update_journey_entry answers the fields it replaced, so its card is
undoable now, as JRN-015 already checks for the undo itself.
This commit is contained in:
Maurice
2026-10-24 22:36:28 +02:00
parent 67d8f22622
commit 53bd21a7d7
@@ -307,7 +307,8 @@ describe('the change cards', () => {
const loaded: JournalLoaded = { entry: entry(), journeyId: 3, title: 'B', tripJournal: false };
const updated = describeToolCall('update_journey_entry', 'c3', { entryId: 12, entry_time: '18:00' }, ctx, loaded);
expect(updated).toMatchObject({ verbKey: 'updateJournalEntry', subject: 'Sunset at the Spree', undoable: false });
// A changed entry has its way back: the tool answers what the change replaced.
expect(updated).toMatchObject({ verbKey: 'updateJournalEntry', subject: 'Sunset at the Spree', undoable: true });
expect(updated.rows).toEqual([{ op: 'change', labelKey: 'time', before: '14:30', after: '18:00' }]);
expect(describeToolCall('update_journey_entry', 'c4', {}, ctx).rows).toEqual([]);