Improve toolbox checklists, image browsing, and guide integration
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
This commit is contained in:
parent
00e73f0062
commit
386212041f
47 changed files with 744 additions and 112 deletions
|
|
@ -63,3 +63,17 @@ test("cross-column drops and empty column boundaries preserve every module and t
|
|||
await page.getByRole("button", { name: "Afficher en lignes", exact: true }).click();
|
||||
await expect(page.locator(".module-title")).toHaveText(["A", "B", "C", "D"]);
|
||||
});
|
||||
|
||||
test("adding an off-screen tool scrolls it into view", async ({ page }) => {
|
||||
await page.setViewportSize({ width: 900, height: 420 });
|
||||
await setup(page, 1);
|
||||
await page.getByRole("button", { name: "Afficher l'ajout rapide", exact: true }).click();
|
||||
await page.getByRole("button", { name: "Ajouter Compteurs", exact: true }).click();
|
||||
const added = page.locator('article[data-module-type="counters"]').last();
|
||||
await expect(page.locator("article.module")).toHaveCount(5);
|
||||
await expect.poll(async () => added.evaluate((element) => {
|
||||
const rect = element.getBoundingClientRect();
|
||||
return rect.top >= 0 && rect.top < globalThis.window.innerHeight && rect.bottom > 0;
|
||||
})).toBe(true);
|
||||
expect(await page.evaluate(() => globalThis.window.scrollY)).toBeGreaterThan(0);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue