From c2806ecf9b1fa83c5f0c845c77ca28696b8368b9 Mon Sep 17 00:00:00 2001 From: "Martin H. Normark" Date: Fri, 30 Dec 2022 23:57:03 +0100 Subject: [PATCH] Add component test for Container component --- website/src/components/Container.cy.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 website/src/components/Container.cy.tsx diff --git a/website/src/components/Container.cy.tsx b/website/src/components/Container.cy.tsx new file mode 100644 index 00000000..5ffa204f --- /dev/null +++ b/website/src/components/Container.cy.tsx @@ -0,0 +1,12 @@ +import React from "react"; +import { Container } from "./Container"; + +describe("", () => { + it("renders", () => { + // see: https://on.cypress.io/mounting-react + const className = "my-class"; + const text = "test_container"; + cy.mount({text}); + cy.get(`div.${className}`).should("have.class", className).should("be.visible").should("contain", text); + }); +});