Add cypress test for project entry deletion
This commit is contained in:
parent
735d2d9afa
commit
7bc8c3c3aa
|
|
@ -40,5 +40,18 @@ describe('Project Entry', () => {
|
|||
cy.get('[data-cy=modal-save-button]').click();
|
||||
cy.waitFor('UpdateProjectEntry');
|
||||
cy.get('.project-entry__paragraph:first-of-type').contains('Defeat Thanos');
|
||||
})
|
||||
});
|
||||
|
||||
it('should delete the last entry', () => {
|
||||
cy.visit('/portfolio/groot');
|
||||
|
||||
cy.get('.project-entry').should('have.length', 2);
|
||||
|
||||
cy.get('.project-entry:last-of-type').within(() => {
|
||||
cy.get('[data-cy=project-entry-more]').click();
|
||||
cy.get('[data-cy=delete-project-entry]').click();
|
||||
});
|
||||
|
||||
cy.get('.project-entry').should('have.length', 1);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue