Fix smart & add todolist
This commit is contained in:
parent
47d50a0aa4
commit
1b2366b933
4 changed files with 29 additions and 3 deletions
|
|
@ -11,8 +11,7 @@ describe('template spec', () => {
|
|||
it('Le tag disparaît à la sortie du survol du bouton See more', () => {
|
||||
cy.contains('See more').trigger('mouseover')
|
||||
cy.get('div.absolute').should('not.have.attr', 'style')
|
||||
cy.get('body').trigger('mousemove', 0, 0)
|
||||
cy.wait(300)
|
||||
cy.get('div.absolute').should('not.be.visible')
|
||||
cy.get('body').trigger('mousemove', 0, 0).click(0, 0)
|
||||
cy.get('div.absolute', { timeout: 20000 }).should('not.be.visible')
|
||||
})
|
||||
})
|
||||
16
cypress/e2e/todolist.cy.js
Normal file
16
cypress/e2e/todolist.cy.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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')
|
||||
})
|
||||
})
|
||||
10
package-lock.json
generated
10
package-lock.json
generated
|
|
@ -10,6 +10,7 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cypress": "^14.5.1",
|
||||
"cypress-real-events": "^1.14.0",
|
||||
"mocha": "^11.7.1"
|
||||
}
|
||||
},
|
||||
|
|
@ -788,6 +789,15 @@
|
|||
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/cypress-real-events": {
|
||||
"version": "1.14.0",
|
||||
"resolved": "https://registry.npmjs.org/cypress-real-events/-/cypress-real-events-1.14.0.tgz",
|
||||
"integrity": "sha512-XmI8y3OZLh6cjRroPalzzS++iv+pGCaD9G9kfIbtspgv7GVsDt30dkZvSXfgZb4rAN+3pOkMVB7e0j4oXydW7Q==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"cypress": "^4.x || ^5.x || ^6.x || ^7.x || ^8.x || ^9.x || ^10.x || ^11.x || ^12.x || ^13.x || ^14.x"
|
||||
}
|
||||
},
|
||||
"node_modules/dashdash": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"cypress": "^14.5.1",
|
||||
"cypress-real-events": "^1.14.0",
|
||||
"mocha": "^11.7.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue