From a920f67008db37b55a6590c17c7b1b90aafb0e7f Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Sat, 19 Sep 2026 15:29:34 +0200 Subject: [PATCH] test(characters): mock persistence in the forms spec so it cannot write to the real library Co-Authored-By: Claude Sonnet 5 --- tests/characters.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/characters.spec.js b/tests/characters.spec.js index 3df2e30..1750ace 100644 --- a/tests/characters.spec.js +++ b/tests/characters.spec.js @@ -124,6 +124,8 @@ test('current-version image pairs marked inconsistent show a review warning', as }); test('character appearance forms stay in one record and switch the detail view', async ({ page }) => { + // Switching the form saves the record, so stand in for the API instead of writing to the real library. + await mockRecord(page, { id: 'c-forms', book: 'Smoke Book', name: 'Zerwas', tags: '', sheet: {} }); await page.route('**/api/book-profile*', route => route.fulfill({ json: { profile: {} } })); await page.goto('/', { waitUntil: 'domcontentloaded' }); await page.waitForSelector('#lib-chars-list', { state: 'attached', timeout: 15_000 });