Add utils

This commit is contained in:
Jeremy Thomas
2021-11-12 22:59:02 +00:00
parent 41e28cff8a
commit 2a4ba6becd
4 changed files with 48 additions and 32 deletions

View File

@@ -1,3 +1,5 @@
import { setMobile, setDesktop } from "../utils";
describe("Components/Navbar", () => {
beforeEach(() => {
cy.visit("http://127.0.0.1:4000/cyp/components/navbar/");
@@ -125,10 +127,7 @@ describe("Components/Navbar", () => {
describe("Components/Navbar Mobile", () => {
beforeEach(() => {
cy.visit("http://127.0.0.1:4000/cyp/components/navbar/");
cy.viewport(
Cypress.env("viewports").mobile[0],
Cypress.env("viewports").mobile[1]
);
setMobile();
});
it("has a Navbar", () => {
@@ -182,10 +181,7 @@ describe("Components/Navbar Mobile", () => {
describe("Components/Navbar Desktop", () => {
beforeEach(() => {
cy.visit("http://127.0.0.1:4000/cyp/components/navbar/");
cy.viewport(
Cypress.env("viewports").desktop[0],
Cypress.env("viewports").desktop[1]
);
setDesktop();
});
it("has a Navbar", () => {

View File

@@ -1,3 +1,5 @@
import { setMobile, setTablet } from "../utils";
describe("Components/Pagination", () => {
beforeEach(() => {
cy.visit("http://127.0.0.1:4000/cyp/components/pagination/");
@@ -79,10 +81,7 @@ describe("Components/Pagination", () => {
describe("Components/Pagination Mobile", () => {
beforeEach(() => {
cy.visit("http://127.0.0.1:4000/cyp/components/pagination/");
cy.viewport(
Cypress.env("viewports").mobile[0],
Cypress.env("viewports").mobile[1]
);
setMobile();
});
it("has a correct Pagination", () => {
@@ -113,10 +112,7 @@ describe("Components/Pagination Mobile", () => {
describe("Components/Navbar Tablet", () => {
beforeEach(() => {
cy.visit("http://127.0.0.1:4000/cyp/components/pagination/");
cy.viewport(
Cypress.env("viewports").tablet[0],
Cypress.env("viewports").tablet[1]
);
setTablet();
});
it("has a correct Pagination", () => {