-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
0 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,3 @@ | ||
// FUNCIONANDO | ||
// describe("Página de Login", () => { | ||
// it("deve logar com sucesso", () => { | ||
// cy.visit("http://localhost:3000/login"); | ||
// cy.get("input[type=\"email\"]").type("[email protected]"); | ||
// cy.get("input[type=\"password\"]").type("a"); | ||
// cy.get("button").contains("Entrar").click(); | ||
// cy.url().should("include", "/"); | ||
|
||
// // Verificar se o token existe apenas após redirecionar para a página '/' | ||
// cy.window().then((window) => { | ||
// // Aguarde até que o token exista no localStorage | ||
// cy.wrap(null, { timeout: 10000 }).should(() => { | ||
// const token = window.localStorage.getItem('token'); | ||
// expect(token).to.exist; | ||
// // Realize outras verificações conforme necessário, por exemplo, se o token possui um formato específico | ||
// }); | ||
// }); | ||
// }); | ||
// }); | ||
describe("Página de Login", () => { | ||
it("deve logar com sucesso", () => { | ||
cy.visit("http://137.184.81.207:3000/login"); | ||
|
@@ -65,52 +45,3 @@ describe("Página de Login", () => { | |
|
||
}); | ||
}); | ||
|
||
|
||
// describe("Página de Login", () => { | ||
// it("deve logar com sucesso", () => { | ||
// cy.visit("http://localhost:3000/login"); | ||
// cy.get("input[type='email']").type("[email protected]"); | ||
// cy.get("input[type='password']").type("a"); | ||
// cy.get("button").contains("Entrar").click(); | ||
// cy.url().should("include", "/"); | ||
|
||
// // Função para aguardar o token estar disponível | ||
// const waitForToken = () => { | ||
// return new Cypress.Promise((resolve, reject) => { | ||
// let attempts = 0; | ||
// const maxAttempts = 20; // Número máximo de tentativas | ||
|
||
// const checkToken = () => { | ||
// console.log("checkToken"); | ||
// cy.window().then((window) => { | ||
// console.log("cy.window then"); | ||
// const token = window.localStorage.getItem('token'); | ||
// console.log("cy.window then token", token); | ||
// if (token) { | ||
// console.log("cy.window then token if resolve", token); | ||
// resolve(token); | ||
// } else if (attempts < maxAttempts) { | ||
// console.log("cy.window then else if", attempts); | ||
// attempts++; | ||
// setTimeout(checkToken, 1000); // Verifica novamente após 1 segundo | ||
// } else { | ||
// reject(new Error("Token não encontrado após várias tentativas")); | ||
// } | ||
// }); | ||
// }; | ||
// checkToken(); | ||
// }); | ||
// }; | ||
|
||
// // Aguarde o token e então escreva no arquivo | ||
// waitForToken().then((token) => { | ||
// console.log("cy.writeFile", token); | ||
// cy.writeFile('cypress/fixtures/token.json', { token: token }); | ||
// }).catch((error) => { | ||
// // Tratar erro se o token não for encontrado | ||
// console.error(error); | ||
// }); | ||
|
||
// }); | ||
// }); |
Binary file removed
BIN
-676 KB
...nies.cy.js/Página de Empresas -- deve exibir uma lista de empresas (failed).png
Binary file not shown.
Binary file removed
BIN
-676 KB
...- deve mudar da tabela para o formulário ao clicar em Nova Empresa (failed).png
Binary file not shown.