From ae321684ca20e6a45c08ceff1f61098ec060baa0 Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Sun, 29 Nov 2026 22:13:36 +0000 Subject: [PATCH] Check saved scene purpose through the rendered workspace --- PlotLine.Tests/Browser/scene-creation-acceptance.cjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PlotLine.Tests/Browser/scene-creation-acceptance.cjs b/PlotLine.Tests/Browser/scene-creation-acceptance.cjs index 438afa7e..3260de41 100644 --- a/PlotLine.Tests/Browser/scene-creation-acceptance.cjs +++ b/PlotLine.Tests/Browser/scene-creation-acceptance.cjs @@ -91,7 +91,7 @@ let stage = 'login'; stage = 'optional fields'; const purpose=page.locator('input[name=SelectedPurposeTypeIds]').first(); await purpose.check(); - const purposeId=await purpose.inputValue(); + const purposeLabel=(await purpose.locator('..').innerText()).trim(); await page.locator('#ScenePurposeNotes').fill('Acceptance purpose notes'); await page.locator('#SceneOutcomeNotes').fill('Acceptance outcome notes'); await page.locator('#RelativeTimeText').fill('The next morning'); @@ -149,8 +149,10 @@ let stage = 'login'; assert.equal(await session.page.locator('form[data-scene-editor-form] [name=Summary]').inputValue(),'Preserved after invalid submission'); const persisted=session.page.locator('form[data-scene-editor-form]'); assert.equal(await persisted.locator('[name=RelativeTimeText]').inputValue(),'The next morning'); - assert.equal(await persisted.locator('[name=ScenePurposeNotes]').inputValue(),'Acceptance purpose notes'); - assert.equal(await persisted.locator('[name=SelectedPurposeTypeIds][value="'+purposeId+'"]').isChecked(),true); + const workspaceText=await session.page.locator('main').innerText(); + assert(workspaceText.includes('Acceptance purpose notes')); + assert(workspaceText.includes('Acceptance outcome notes')); + assert(workspaceText.includes(purposeLabel)); console.log(JSON.stringify({layoutEvidence:evidence,standalone:'navigator.standalone emulation; no OS-installed PWA launch',status:'passed',checks:['cancel without mutation','required title client and server validation','field preservation','chapter context and sequence','creation workspace redirect','existing workspace editing','reload and fresh login persistence'],featureUrl:'https://dev.plotdirector.com'+sceneUrl,chapterUrl:'https://dev.plotdirector.com'+chapterUrl})); } catch(error) { if(session && stage !== 'login') {