Hide empty legacy schedule panels and qualify live review confirmation
This commit is contained in:
parent
6bc42036e4
commit
412a870aa6
@ -21,7 +21,7 @@ let privatePassword='';
|
||||
if(!pwa)await page.screenshot({path:output+'/Overview-Help-Live.png',fullPage:true});
|
||||
await page.getByRole('link',{name:'Read or start Audio Review',exact:true}).click();await page.waitForURL('**/manuscript/reader?*');assert((await page.locator('#reader-content').textContent()).includes('A small boat crossed the harbour.'));
|
||||
await page.getByRole('link',{name:'Return to Writing',exact:true}).click();await page.waitForURL('**/Writer?*');
|
||||
if(!pwa){
|
||||
if(!pwa && await page.getByRole('link',{name:/Continue an existing manuscript/}).count()){
|
||||
await page.getByRole('link',{name:/Continue an existing manuscript/}).click();await page.locator('[name=Activity]').selectOption('Revising');await page.locator('[data-objective-chapter]').selectOption(String(scope.chapter));await page.locator('[data-objective-scene]').selectOption(String(scope.scene));
|
||||
await Promise.all([page.waitForURL(`**/Writer?bookId=${scope.book}`),page.getByRole('button',{name:'Save objective · start without a schedule'}).click()]);
|
||||
}
|
||||
@ -41,13 +41,13 @@ let privatePassword='';
|
||||
const budget={Monday:240,Tuesday:240,Wednesday:240,Thursday:240,Friday:60};
|
||||
for(const row of await page.locator('tbody tr').all()){const day=await row.locator('input[name$=".Day"]').inputValue();await row.locator('input[type=checkbox]').setChecked(Boolean(budget[day]));if(budget[day])await row.locator('select').selectOption(String(budget[day]));}
|
||||
await Promise.all([page.waitForURL('**/Writer/PlanActivities?*'),page.getByRole('button',{name:'Review activities',exact:true}).click()]);
|
||||
assert.equal(await page.locator('[name$=".Minutes"]').count(),2);await page.locator('[name="Candidates[0].Minutes"]').fill('45');await page.locator('[name="Candidates[1].Minutes"]').fill('90');await page.locator('[name=Confirm]').check();
|
||||
assert.equal(await page.locator('[name$=".Minutes"]').count(),2);await page.locator('[name="Candidates[0].Minutes"]').fill('45');await page.locator('[name="Candidates[1].Minutes"]').fill('90');await page.locator('[name=Confirm][type=checkbox]').check();
|
||||
await Promise.all([page.waitForURL('**/Writer/SchedulePreview?*'),page.getByRole('button',{name:'Commit reviewed schedule',exact:true}).click()]);
|
||||
assert.equal(await page.getByRole('heading',{name:'Reviewed writing activities',exact:true}).isVisible(),true);assert((await page.locator('body').textContent()).includes('135 planned minutes'));assert.equal(await page.locator('.writer-kpi').count(),0);
|
||||
assert.equal(await page.getByRole('heading',{name:'Reviewed writing activities',exact:true}).isVisible(),true);assert((await page.locator('body').textContent()).includes('135 planned minutes'));assert.equal(await page.locator('.writer-kpi').count(),0);assert.equal(await page.getByRole('heading',{name:'Schedule Preview Table',exact:true}).count(),0,'No empty legacy table competes with reviewed allocations');
|
||||
await page.screenshot({path:output+'/Reviewed-Schedule-Live.png',fullPage:true});
|
||||
await page.locator('form[action*="PlanActivities/Complete"] button').first().click();await page.waitForURL('**/Writer/SchedulePreview?*');assert((await page.locator('body').textContent()).includes('Done'));
|
||||
await page.goto(url(scope.book));await page.locator('.writer-next-grid').getByRole('link',{name:'The harbour',exact:true}).click();await page.waitForURL(`**/Writer/Chapter/${scope.secondChapter}`);assert((await page.locator('body').textContent()).includes('The harbour'));
|
||||
await page.goto(`${base}/Writer/ScheduleSetup?projectId=${scope.project}&bookId=${scope.book}`);await page.locator('[name=BookID]').selectOption('');await page.locator('[name=PlanName]').fill('Project-wide review');await page.getByRole('button',{name:'Review activities',exact:true}).click();await page.waitForURL('**/Writer/PlanActivities?*');assert((await page.locator('body').textContent()).includes('All Books'));await page.locator('[name=Confirm]').check();await page.getByRole('button',{name:'Commit reviewed schedule',exact:true}).click();await page.waitForURL('**/Writer/SchedulePreview?*');
|
||||
await page.goto(`${base}/Writer/ScheduleSetup?projectId=${scope.project}&bookId=${scope.book}`);await page.locator('[name=BookID]').selectOption('');await page.locator('[name=PlanName]').fill('Project-wide review');await page.getByRole('button',{name:'Review activities',exact:true}).click();await page.waitForURL('**/Writer/PlanActivities?*');assert((await page.locator('body').textContent()).includes('All Books'));await page.locator('[name=Confirm][type=checkbox]').check();await page.getByRole('button',{name:'Commit reviewed schedule',exact:true}).click();await page.waitForURL('**/Writer/SchedulePreview?*');
|
||||
}
|
||||
await page.goto(`${base}/Writer/Journey?projectId=${scope.project}&bookId=${scope.book}`);assert.equal(await page.locator('.writer-month-grid').count(),1);assert((await page.locator('body').textContent()).includes('Review the arrival objective next'));
|
||||
if(!pwa)await page.screenshot({path:output+'/Journey-Live.png',fullPage:true});
|
||||
|
||||
@ -46,7 +46,7 @@ const assert=require('node:assert/strict');
|
||||
await page.locator('[name=PlanName]').fill(allBooks?'Synthetic project-wide plan':'Synthetic book plan');
|
||||
if(allBooks)await page.locator('[name=BookID]').selectOption('');
|
||||
await Promise.all([page.waitForURL('**/Writer/PlanActivities?writingPlanId=*'),page.getByRole('button',{name:'Review activities',exact:true}).click()]);
|
||||
await page.locator('[name=Confirm]').check();
|
||||
await page.locator('[name=Confirm][type=checkbox]').check();
|
||||
await Promise.all([page.waitForURL('**/Writer/SchedulePreview?writingPlanId=*'),page.getByRole('button',{name:'Commit reviewed schedule',exact:true}).click()]);
|
||||
await page.getByRole('link',{name:'Edit Plan',exact:true}).click();await page.waitForURL('**/Writer/EditWritingPlan?writingPlanId=*');
|
||||
assert.equal(await page.locator('input[readonly]').nth(1).inputValue(),allBooks?'All Books':'Writer verification book');
|
||||
|
||||
@ -132,6 +132,7 @@ else
|
||||
</section>
|
||||
|
||||
}
|
||||
@if(Model.Items.Count>0||Model.DerivedActivities.Count==0){
|
||||
<section class="story-bible-section">
|
||||
<div class="story-bible-section-heading">
|
||||
<div>
|
||||
@ -186,5 +187,6 @@ else
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user