From 65a55caffb1fd2daad04890e4099076d377a6126 Mon Sep 17 00:00:00 2001 From: Jean Carlo Nascimento Date: Tue, 16 Jan 2024 21:09:34 -0300 Subject: [PATCH] Cypress tests --- cypress/e2e/integrations/plans.cy.js | 38 ---------------------------- 1 file changed, 38 deletions(-) delete mode 100644 cypress/e2e/integrations/plans.cy.js diff --git a/cypress/e2e/integrations/plans.cy.js b/cypress/e2e/integrations/plans.cy.js deleted file mode 100644 index f527f77..0000000 --- a/cypress/e2e/integrations/plans.cy.js +++ /dev/null @@ -1,38 +0,0 @@ -describe("Página de Planos", () => { - beforeEach(() => { - - cy.fixture("token").then((token) => { - console.log(token); - cy.intercept("POST", "http://137.184.81.207:9000/login", { - statusCode: 200, - body: { - token: token.token - } - }); - - // cy.intercept("GET", "http://137.184.81.207:9000/plans", { - // statusCode: 200, - // body: [ - // { _id: "1", name: "Plan 1", users: 1, connections: 1, queues: 1, value: 1}, - // ] - // }).as("getPlans"); - - localStorage.setItem("token", token.token); - cy.visit("http://137.184.81.207:3000/plans"); - - // cy.wait("@getPlans", { timeout: 20000 }); - }); - }); - - it("deve exibir uma lista de plans", () => { - cy.get("table").should("exist"); - cy.get("table tbody tr").should("have.length.at.least", 1); - }); - - it("deve mudar da tabela para o formulário ao clicar em Novo Plano", () => { - cy.get("button").contains("Novo Plano").click(); - cy.get("form").should("exist"); - cy.get("table").should("not.exist"); - }); - -});