Add cypress-image-diff for visual testing

This commit is contained in:
Martin H. Normark
2022-12-31 00:11:32 +01:00
parent 82d2b0924b
commit 89c2be5760
8 changed files with 171 additions and 3 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { Button } from "./Button";
describe("<Button />", () => {
it("renders", () => {
// see: https://on.cypress.io/mounting-react
cy.mount(<Button className="border-gray-300">Test button</Button>);
cy.mount(<Button className="border-gray-800 m-5">Test button</Button>);
cy.get("button").compareSnapshot("button-element");
});
});