fix(frontend): prevent catalog header overlap

This commit is contained in:
User
2026-09-08 14:35:36 +02:00
parent 818563c408
commit e68e80a33d
2 changed files with 13 additions and 11 deletions
@@ -603,18 +603,28 @@ test("context panels stay inside the manager and the Tables grid sits in a sideb
const rect = node.getBoundingClientRect();
return rect.top + rect.height / 2;
};
const verticalBounds = (node: Element) => {
const rect = node.getBoundingClientRect();
return { top: rect.top, bottom: rect.bottom };
};
return {
backgroundImage: getComputedStyle(element).backgroundImage,
height: element.getBoundingClientRect().height,
centers: [centerY(title), centerY(status), centerY(actions)],
primaryCenters: [centerY(title), centerY(actions)],
heading: verticalBounds(title),
status: verticalBounds(status),
actions: verticalBounds(actions),
};
});
expect(applicationBarLayout.backgroundImage).toBe("none");
expect(applicationBarLayout.height).toBeLessThanOrEqual(72);
expect(applicationBarLayout.height).toBeLessThanOrEqual(104);
expect(
Math.max(...applicationBarLayout.centers) - Math.min(...applicationBarLayout.centers),
Math.max(...applicationBarLayout.primaryCenters) - Math.min(...applicationBarLayout.primaryCenters),
).toBeLessThanOrEqual(1);
expect(applicationBarLayout.status.top).toBeGreaterThanOrEqual(
Math.max(applicationBarLayout.heading.bottom, applicationBarLayout.actions.bottom) + 8,
);
await expect(page.getByRole("row", { name: /patients/ })).toBeVisible();