diff --git a/cypress/e2e/main.spec.cy.js b/cypress/e2e/main.spec.cy.js new file mode 100644 index 0000000..e1681fc --- /dev/null +++ b/cypress/e2e/main.spec.cy.js @@ -0,0 +1,14 @@ +describe('template spec', () => { + it('passes', () => { + cy.visit('localhost:5173/') + cy.get('[data-qa="profile-box"]') + cy.get('[data-qa="comment-input"]').first().type('Test 000') + cy.get('[data-qa="publish-button"]').first().click() + cy.get('[data-qa="comment-text"]').contains('Test 000') + cy.get('[data-qa="comment-text"]').each(($element) => { + if ($element.text() === 'Test 000') { + cy.get($element).siblings('header').children('[data-qa="delete-button"]').click() + } + }) + }) +}) \ No newline at end of file