This commit is contained in:
Michael Telatynski
2026-03-31 13:17:57 +01:00
parent f2608caf34
commit e772a104c2
2 changed files with 3 additions and 2 deletions
@@ -166,8 +166,8 @@ test.describe("Banner", () => {
// Verify that the #matrixchat root got shrunk to fit rather than exploding the viewport
const bodyBoundingBox = await page.locator("body").boundingBox();
const rootBoundingBox = await page.locator("#matrixchat").boundingBox();
const headerElement = await page.locator("#matrixchat").evaluate((e) => e.previousElementSibling);
const headerBoundingBox = headerElement?.getBoundingClientRect();
const headerBoundingBox = await page.getByTestId("banner").boundingBox();
expect(rootBoundingBox!.height).toBeLessThan(bodyBoundingBox!.height);
expect(rootBoundingBox!.height + headerBoundingBox!.height).toEqual(bodyBoundingBox!.height);
});
+1
View File
@@ -36,6 +36,7 @@ class BannerModule implements Module {
}
const div = document.createElement("div");
div.dataset.testid = "banner";
this.api.rootNode.before(div);
const root = this.api.createRoot(div);