Created
          April 1, 2024 21:26 
        
      - 
      
 - 
        
Save CodeAkinori/13ced2c2f47f75a5f4f37c97c814f9d7 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
CodeAkinori created this gist
Apr 1, 2024 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ /// <reference types="cypress" /> describe("Testes para a agenda", () => { beforeEach(() => { cy.visit("https://agenda-contatos-react.vercel.app/"); }); it("Deve incluir um novo contato", () => { cy.get('input[type="text"]').type("teste"); cy.get('input[type="email"]').type("[email protected]"); cy.get('input[type="tel"]').type("4002 8922"); cy.get('button[type="submit"]').click(); cy.get("ul>li:contains(teste)").should("be.visible"); }); it("Deve editar um contato", () => { cy.get("button.edit").last().click(); cy.get('input[type="text"]').clear().type("NomeAlterado"); cy.get('input[type="email"]').clear().type("[email protected]"); cy.get('input[type="tel"]').clear().type("000 00 0"); cy.get('button[type="submit"]').click(); cy.get("ul>li:contains(NomeAlterado)").should("be.visible"); }); it("Deve remover um contato", () => { cy.get("button.delete").last().click(); cy.contains("NomeAlterado").should("not.exist"); }); });