diff --git a/PlotLine.Tests/Browser/context-spatial-layout-development.cjs b/PlotLine.Tests/Browser/context-spatial-layout-development.cjs index 6414b913..c370dde1 100644 --- a/PlotLine.Tests/Browser/context-spatial-layout-development.cjs +++ b/PlotLine.Tests/Browser/context-spatial-layout-development.cjs @@ -12,7 +12,7 @@ let session,stage='login'; const pane=p.locator('[data-context-pane="0"]'),tab=pane.locator('[data-context-tab]'),handle=pane.getByRole('separator'),layout=pane.locator('[data-spatial-layout]'),orientation=pane.locator('[data-spatial-orientation]'); const initial=await p.evaluate(()=>({...document.querySelector('[data-context-workspace]').contextController.position})); for(const kind of ['locations','maps','floorplans']){ - stage=kind+' resize';await tab.selectOption(kind);await handle.waitFor();assert.equal(await handle.getAttribute('aria-valuenow'),'30'); + stage=kind+' resize';await tab.selectOption(kind);await pane.locator(`[data-spatial-context="${kind}"]`).waitFor();await handle.waitFor();assert.equal(await handle.getAttribute('aria-valuenow'),'30'); if(kind==='locations'){await pane.getByRole('heading',{name:'Layout harbour',exact:true}).waitFor();const scroll=await pane.locator('[data-spatial-details]').evaluate(n=>{n.scrollTop=100;return {top:n.scrollTop,scroll:n.scrollHeight,height:n.clientHeight};});assert(scroll.top>0&&scroll.scroll>scroll.height);assert.equal(await pane.locator('[data-spatial-scenes]').evaluate(n=>n.scrollTop),0);} await handle.focus();await handle.press('ArrowRight');assert.equal(await handle.getAttribute('aria-valuenow'),'32'); await orientation.selectOption('vertical');assert.equal(await handle.getAttribute('aria-valuenow'),'30');await handle.focus();await handle.press('ArrowDown');assert.equal(await handle.getAttribute('aria-valuenow'),'32');