From 8e5b93fed764acb5e81154d3fe2aa62951704b86 Mon Sep 17 00:00:00 2001 From: Julian Wielga Date: Tue, 3 Sep 2024 23:09:42 +0200 Subject: [PATCH] chore: test tweak --- cypress/e2e/demo.cy.js | 11 ++++------- src/demo/DebugButtons.tsx | 4 ++-- src/demo/overflowDebug.tsx | 6 ++++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/cypress/e2e/demo.cy.js b/cypress/e2e/demo.cy.js index a25fe4db..bd94c03d 100644 --- a/cypress/e2e/demo.cy.js +++ b/cypress/e2e/demo.cy.js @@ -15,7 +15,6 @@ context("WM", () => { it("should maximize/restore window", () => { cy.contains("with title").click(); cy.get("[data-testid='window-frame']").should("be.visible").as("window"); - cy.get("@window").contains("scroll to bottom").should("be.enabled"); cy.document().matchImage({ screenshotConfig }); cy.get("@window").contains("with title").dblclick(); cy.document().matchImage({ screenshotConfig }); @@ -27,36 +26,34 @@ context("WM", () => { it("should prevent window from going offscreen", () => { cy.contains("danger").click(); cy.get("[data-testid='window-frame']").should("be.visible").as("window"); - cy.contains("to bottom").should("be.enabled"); + cy.contains("to bottom").should("be.disabled"); cy.document().matchImage({ screenshotConfig }); cy.viewport(500, 500); cy.wait(defaultWait); cy.get("[data-testid='window-frame']").matchImage({ screenshotConfig }); cy.contains("to bottom").should("be.enabled"); - cy.viewport(1280, 815); + cy.viewport(1280, 720); cy.wait(defaultWait); cy.contains("to bottom").should("be.disabled"); cy.contains("add line").should("be.visible").click().click().click(); cy.contains("to bottom").should("be.enabled"); - cy.get("[role=tree]").scrollIntoView(); cy.document().matchImage({ screenshotConfig }); }); it("should prevent window from going offscreen (minimal size)", () => { cy.contains("minimal size").click(); cy.get("[data-testid='window-frame']").should("be.visible").as("window"); - cy.contains("to bottom").should("be.enabled"); + cy.contains("to bottom").should("be.disabled"); cy.document().matchImage({ screenshotConfig }); cy.viewport(500, 500); cy.wait(defaultWait); cy.get("[data-testid='window-frame']").matchImage({ screenshotConfig }); cy.contains("to bottom").should("be.enabled"); - cy.viewport(1280, 830); + cy.viewport(1280, 720); cy.wait(defaultWait); cy.contains("to bottom").should("be.disabled"); cy.contains("add line").should("be.visible").click().click().click(); cy.contains("to bottom").should("be.enabled"); - cy.get("[role=tree]").scrollIntoView(); cy.document().matchImage({ screenshotConfig }); }); diff --git a/src/demo/DebugButtons.tsx b/src/demo/DebugButtons.tsx index 00acb200..8e71bbd9 100644 --- a/src/demo/DebugButtons.tsx +++ b/src/demo/DebugButtons.tsx @@ -27,11 +27,11 @@ export function DebugButtons({ currentId }: { currentId?: WindowId }): JSX.Eleme return (
{buttons.map((props, index) => ( -
+ -
+ ))} - {data.map((e) => ( -

{e}

+
+ {e} +
))} );