Load Context Intent before checking its draft guard
This commit is contained in:
parent
53dd80d9da
commit
7f440d09ac
@ -36,6 +36,10 @@ let session, stage = 'login';
|
||||
const items = checklist.locator('[data-checklist-items] > li');
|
||||
const getChecklist = () => session.page.evaluate(async ({bookID,chapterID}) =>
|
||||
(await fetch('/Writing/Context/Intent/Checklist?' + new URLSearchParams({bookID,chapterID}))).json(), base);
|
||||
stage='empty chapter Intent controls';
|
||||
await checklist.getByText('No checklist items',{exact:true}).waitFor({state:'visible'});
|
||||
await checklist.getByRole('button',{name:'Add item',exact:true}).waitFor({state:'visible'});
|
||||
await session.page.locator('[data-intent-palette]').getByText('Story Elements',{exact:true}).waitFor({state:'visible'});
|
||||
await checklist.getByText('Paste a checklist', {exact:true}).click();
|
||||
await checklist.getByLabel('Checklist text').fill('- [ ] Reveal the promise\n- [ ] Establish the setting');
|
||||
await checklist.getByRole('button',{name:'Preview',exact:true}).click();
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
const panes = [...root.querySelectorAll('[data-context-pane]')].map((element,index)=>({ element,index,select:element.querySelector('[data-context-tab]'),host:element.querySelector('[data-context-pane-content]'),status:element.querySelector('[data-context-pane-status]'),records:new Map(),revision:0 }));
|
||||
const current = pane => pane.records.get(state.panes[pane.index].tab);
|
||||
const visible = pane => pane.index===0 || state.layout!=='single';
|
||||
const guarded = record => record && (record.dirty || record.busy || lifecycles[record.tab.lifecycle]?.canRefresh?.(record.node,record)===false);
|
||||
const guarded = record => record?.node && (record.dirty || record.busy || lifecycles[record.tab.lifecycle]?.canRefresh?.(record.node,record)===false);
|
||||
function remember(pane) {
|
||||
const record=pane.host.contextRecord; if(!record)return;
|
||||
record.scroll={top:pane.host.scrollTop,left:pane.host.scrollLeft};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user