Align workspace regression check with collapsed footer controls

This commit is contained in:
unimatrixgit 2026-11-13 20:59:26 +01:00
commit a7792b219a

View file

@ -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();
});