test create plan button visibility
This commit is contained in:
parent
6b9ad5ef8e
commit
9ced96fc88
1 changed files with 18 additions and 0 deletions
18
cypress/e2e/homeCreatePlan.cy.js
Normal file
18
cypress/e2e/homeCreatePlan.cy.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
describe('Create plan modal on the home page', () => {
|
||||
beforeEach(() => {
|
||||
cy.exec('npm run db:seed')
|
||||
cy.intercept('GET', '/api/texts').as('getTexts')
|
||||
cy.visit('/home')
|
||||
cy.wait('@getTexts')
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
cy.exec('npm run db:wipe')
|
||||
})
|
||||
|
||||
it('shows a "Create plan" button on each text', () => {
|
||||
cy.get('#texts-list li').each((textItem) => {
|
||||
cy.wrap(textItem).find('button.create-plan').should('exist')
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue