diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c7d2c..618694e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- remove cypress declarations + ## [5.2.0] - 2025-06-23 ### Added diff --git a/cypress/cypress/component/Paging/Paging.cy.tsx b/cypress/cypress/component/Paging/Paging.cy.tsx index 928fdcb..9404959 100644 --- a/cypress/cypress/component/Paging/Paging.cy.tsx +++ b/cypress/cypress/component/Paging/Paging.cy.tsx @@ -1,5 +1,6 @@ import { Paging } from "react-pattern-ui"; import { faker } from "@faker-js/faker"; +import { mount } from "cypress/react18"; describe("Paging.cy.tsx", () => { it("basic paging works", () => { @@ -8,7 +9,7 @@ describe("Paging.cy.tsx", () => { const currentPage = faker.datatype.number({ min: 2, max: pages - 1 }); const translations = { showedItemsText: "Item {from} to {to} from {total}", itemsPerPageDropdown: "Items per page" }; - cy.mount( + mount( { const currentPage = faker.datatype.number({ min: 2, max: pages - 1 }); const translations = { showedItemsText: "Item {from} to {to} from {total}", itemsPerPageDropdown: "Items per page" }; - cy.mount( + mount( ; @@ -136,7 +137,7 @@ const PanelSideBarNoTiles = (props: PanelSideBarProps) => { describe("PanelSidebar.cy.tsx", () => { it("icon and titles rendered correctly", () => { - cy.mount(); + mount(); // Check if icon are rendered cy.get('[data-icon="bars"]').should("be.visible"); @@ -149,7 +150,7 @@ describe("PanelSidebar.cy.tsx", () => { }); it("flat menu entry", () => { - cy.mount(); + mount(); // Check page content changes cy.get("#home").click(); @@ -160,7 +161,7 @@ describe("PanelSidebar.cy.tsx", () => { }); it("nested menu entries", () => { - cy.mount(); + mount(); // Check page content changes cy.get("button[title=Settings]").click(); @@ -173,7 +174,7 @@ describe("PanelSidebar.cy.tsx", () => { }); it("disabled entries", () => { - cy.mount(); + mount(); // Check are disabled and page content not doesn't change cy.get("button[title=Home]").should("have.attr", "disabled"); @@ -185,7 +186,7 @@ describe("PanelSidebar.cy.tsx", () => { }); it("toggle sidebar", () => { - cy.mount(); + mount(); // Check toggle sidebar cy.get('[data-icon="angle-left"]').should("be.visible"); @@ -196,26 +197,26 @@ describe("PanelSidebar.cy.tsx", () => { }); it("selected flat entry", () => { - cy.mount(); + mount(); // Check active entries cy.get("#home").parent("div").parent("li").should("have.class", "active"); }); it("render correctly menu without tiles", () => { - cy.mount(); + mount(); cy.get("#main-section").should("have.class", "section-no-tiles"); cy.get(".side.nav__tiles").should("not.exist"); }); it("render correctly toggle button", () => { - cy.mount(); + mount(); cy.get("#sidebar-toggle").click(); cy.get("#side-nav").should("have.css", "width", "0px"); }); it("check dropdown correctly pre-expanded", () => { - cy.mount(); + mount(); cy.get("button[title=Settings]").click(); cy.get("#dropdown-test1").should("be.visible"); cy.get("#dropdown-test2").should("be.visible"); @@ -231,7 +232,7 @@ describe("PanelSidebar.cy.tsx", () => { ); }; - cy.mount( + mount(