Apply index panel centring through the application main element

This commit is contained in:
Nick Beckley 2026-11-03 19:58:01 +00:00
parent 246371d453
commit 2696d56f59
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ const base='https://dev.plotdirector.com',root=`${base}/Maps?projectId=${f.Proje
await page.screenshot({path:`/tmp/workspace-${id}-${pwa?'pwa':'web'}-max.png`});
await page.locator('#'+id).click();await page.waitForTimeout(150);const restored=await page.locator(selector).boundingBox();assert(Math.abs(restored.height-box.height)<2,'Restore must recalculate height after viewport resizing');assert.deepEqual(await page.evaluate(snapshot),before);assert.equal(await page.locator('.pd-application-header').evaluate(n=>getComputedStyle(n).visibility),'visible');
}
await page.goto(`${base}/FloorPlans?projectId=${f.ProjectID}`);const index=await page.locator('.floor-plan-index-shell').boundingBox();assert(index.width<=1201);assert(Math.abs(index.x-(1800-index.width)/2)<2);const card=await page.locator('.floor-plan-index-shell > .edit-panel').first().boundingBox();assert(Math.abs(card.x+card.width/2-900)<2,'Create form itself must be centred');
await page.goto(`${base}/FloorPlans?projectId=${f.ProjectID}`);const index=await page.locator('.floor-plan-index-shell').boundingBox();assert(index.width<=1201);assert(Math.abs(index.x-(1800-index.width)/2)<2);const card=await page.locator('.floor-plan-index-shell .edit-panel').first().boundingBox();assert(Math.abs(card.x+card.width/2-900)<2,'Create form itself must be centred');
await page.screenshot({path:`/tmp/workspace-floor-index-${pwa?'pwa':'web'}.png`});
await page.goto(`${base}/FloorPlans/Edit/${f.FloorPlanID}`);await page.waitForFunction(()=>document.querySelector('[data-floor-plan-editor]')?.dataset.floorPlanInitialized==='true');
assert((await page.locator('[data-floor-plan-workspace]').boundingBox()).width>1750);

View File

@ -6,7 +6,7 @@
}
<style>.floor-plan-index-shell { max-width: 1200px; margin-inline: auto; }
.floor-plan-index-shell > .edit-panel, .floor-plan-index-shell > .empty-panel { max-width: none; }</style>
.floor-plan-index-shell .edit-panel, .floor-plan-index-shell .empty-panel { max-width: none; }</style>
<nav data-pwa-identity class="breadcrumb-trail" aria-label="Breadcrumb">
<a asp-controller="Projects" asp-action="Index">Projects</a>