forked from unimatrix/web
Align workspace regression check with collapsed footer controls
This commit is contained in:
parent
53916cbcca
commit
a7792b219a
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ test('all native workspaces put reload below content and hide routine status aft
|
|||
const mount=runInNewContext(source+';mountNativeService',{canSubmitDevRequest:()=>false,createCPV2Page:({tabs})=>{const root=new Node('section');root.append(tabs[0].content);return {root};},el,window,location:{origin:'https://cp.dunerealms.com'},URL,AbortController,setTimeout,clearTimeout});
|
||||
const dispose=mount(host,'shared-inbox',{fetcher:async()=>({ok:true,json:async()=>({authenticated:true,user:{permissions:[]}})})});
|
||||
await new Promise(resolve=>setImmediate(resolve));
|
||||
const workspace=host.children[0].children[0];assert.equal(workspace.children.length,3);const [status,frameBox,tools]=workspace.children;assert.equal(frameBox.className,'cp-v2-native-frame');assert.equal(tools.children[0].textContent,'Reload workspace');assert.equal(status.hidden,false);
|
||||
const workspace=host.children[0].children[0];assert.equal(workspace.children.length,3);const [status,frameBox,tools]=workspace.children;assert.equal(frameBox.className,'cp-v2-native-frame');assert.equal(tools.tag,'details');assert.equal(tools.open,undefined);assert.equal(tools.children[0].textContent,'+ Workspace details');assert.equal(tools.children.filter(n=>n.textContent==='Reload workspace').length,1);const reload=tools.children.find(n=>n.textContent==='Reload workspace');assert.equal(status.hidden,false);
|
||||
frameBox.children[0].onload();assert.equal(status.hidden,true);assert.doesNotMatch(status.textContent,/Native workspace loaded|role checks remain authoritative/);
|
||||
tools.children[0].onclick();assert.equal(status.hidden,false);await new Promise(resolve=>setImmediate(resolve));dispose();
|
||||
reload.onclick();assert.equal(status.hidden,false);await new Promise(resolve=>setImmediate(resolve));dispose();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff