describe('template spec', () => { beforeEach(() => { cy.visit('./../todolist.html') }) it("Ajoute 4 todos puis supprime la 2ème, il doit en rester 3", () => { const todos = ["Test 1", "Test 2", "Test 3", "Test 4"]; todos.forEach(todo => { cy.get('input[placeholder="What needs to be done?"]').type(todo) cy.get('button[type="submit"]').click() }) cy.contains('Test 2').parent().find('button').click() cy.get('.flex.items-center.justify-between').should('have.length', 3) cy.contains('Nombre de tâche(s) : 3').should('exist') }) })