Check saved scene purpose through the rendered workspace
This commit is contained in:
parent
7dacca5c19
commit
ae321684ca
@ -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') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user