Skip to content

Commit

Permalink
arrumei os testes que eram possivel arrumar, e ajeitei os que NÃO dev…
Browse files Browse the repository at this point in the history
…em ser rodados localmente
  • Loading branch information
PaG0Dezaum2005 committed Sep 2, 2024
1 parent 309975e commit f0f6718
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 40 deletions.
9 changes: 4 additions & 5 deletions src/cypress/e2e/agentesPage/edit.cy.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
const { loginWith } = require("../../commands/login");

//Todos os comenártios devem ser descomentados e remover a linha de comando abaixo dele para o teste rodar no mapas.tec.br ao invés do localhost

let nome = gerarNomeAleatorio();
let genero = "";
let arrobaDoInstagram = "";

describe("Agents Page Edit", () => {
let expectedCount;

//loga e vai para o site de eagentes de edição do perfil do admin local
beforeEach(() => {
cy.viewport(1920, 1080);
//cy.visit("/edicao-de-agente/1/");
cy.visit("http://localhost/edicao-de-agente/1/");
// loginWith("Admin@local", "mapas123");
cy.visit("http://localhost/");
cy.contains("Entrar").click();
cy.contains("Fazer login com este usuário").click();
cy.visit("/edicao-de-agente/1/");
});

it("Garante que a página de edição de agentes funciona", () => {
Expand Down
4 changes: 2 additions & 2 deletions src/cypress/e2e/loginPage/index.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ const { loginWith } = require("../../commands/login");

describe("Loginpage", () => {
beforeEach(() => {
cy.visit("/autenticacao/");
cy.visit("mapas.tec.br/autenticacao/");
});

it("Verifica se é possivel logar com email ou cpf e senha", () => {
loginWith("Admin@local", "mapas123");
cy.get(".exit > a").click();
cy.visit("/autenticacao/");
cy.visit("mapas.tec.br/autenticacao/");
loginWith("555.132.590-36", "Mapas12345!");
cy.contains("Minha conta");
});
Expand Down
2 changes: 1 addition & 1 deletion src/cypress/e2e/projectsPage/full.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("Pagina de Projetos", () => {
it("Garante que os filtros de tipos de projetos funcionem", () => {
cy.contains("Tipos de projetos");
cy.get('.mc-multiselect--input').click();
cy.wait(1000);
cy.wait(500);
cy.get(':nth-child(18) > .mc-multiselect__option').click();
cy.wait(1000);
checkFilterCount();
Expand Down
2 changes: 1 addition & 1 deletion src/cypress/e2e/recoverPass/index.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("LoginPage", () => {

describe("RecoverPassword", () => {
beforeEach(() => {
cy.visit("/autenticacao/");
cy.visit("mapas.tec.br/autenticacao/");
});

it("clicks the link \"Esqueci minha senha\", preenche o input email e click no botão \"Alterar senha\"", () => {
Expand Down
10 changes: 5 additions & 5 deletions src/cypress/e2e/registerPage/index.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { generateString} = require("../../commands/genString")

describe("LoginPage", () => {
beforeEach(() => {
cy.visit("/");
cy.visit("mapas.tec.br");
});

it("click no botão \"Entrar\"", () => {
Expand All @@ -16,13 +16,13 @@ describe("LoginPage", () => {

describe("RegisterPage", () => {
it("click no botão \"Fazer cadastro\"", () => {
cy.visit("/autenticacao/");
cy.visit("mapas.tec.br/autenticacao/");
cy.contains("Fazer cadastro").click();
cy.url().should("include", "/autenticacao/register/");
});

it("Garante que não haja contas com o mesmo cpf ou email", () => {
cy.visit("/autenticacao/register/");
cy.visit("mapas.tec.br/autenticacao/register/");
cy.get("#email").type("[email protected]");
cy.get("#email").should("have.value", "[email protected]");
cy.get("#cpf").type("68861193544");
Expand All @@ -43,7 +43,7 @@ describe("RegisterPage", () => {
});

it("Garante que cpf seja valido", () => {
cy.visit("/autenticacao/register/");
cy.visit("mapas.tec.br/autenticacao/register/");
cy.get("#email").type("[email protected]");
cy.get("#email").should("have.value", "[email protected]");
cy.get("#cpf").type("68861193541");
Expand All @@ -64,7 +64,7 @@ describe("RegisterPage", () => {


it("Continuar cadastro", () => {
cy.visit("/autenticacao/register/");
cy.visit("mapas.tec.br/autenticacao/register/");

let email = generateString(5) + "@email.com";
cy.get("#email").type(email);
Expand Down
31 changes: 5 additions & 26 deletions src/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f0f6718

Please sign in to comment.