first commit
This commit is contained in:
33
e2e/cypress/e2e/full-screenshot.cy.ts
Normal file
33
e2e/cypress/e2e/full-screenshot.cy.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
describe("full page screenshot", () => {
|
||||
const takeFullPageScreenshots = () => {
|
||||
cy.visit("/");
|
||||
cy.wait(500);
|
||||
cy.window().toMatchImageSnapshot("first", {
|
||||
threshold: 0.8
|
||||
});
|
||||
cy.wait(400);
|
||||
cy.window().toMatchImageSnapshot("second", {
|
||||
threshold: 0.8
|
||||
});
|
||||
};
|
||||
|
||||
it("Normal screen", () => {
|
||||
cy.viewport(1280, 720);
|
||||
takeFullPageScreenshots();
|
||||
});
|
||||
|
||||
it("Old puter screen", () => {
|
||||
cy.viewport(800, 600);
|
||||
takeFullPageScreenshots();
|
||||
});
|
||||
|
||||
it("iPhone8", () => {
|
||||
cy.viewport("iphone-8");
|
||||
takeFullPageScreenshots();
|
||||
});
|
||||
|
||||
it("iPad2", () => {
|
||||
cy.viewport("ipad-2");
|
||||
takeFullPageScreenshots();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user