diff --git a/cypress/e2e/userText.cy.js b/cypress/e2e/userText.cy.js index a633e5a..f26cc61 100644 --- a/cypress/e2e/userText.cy.js +++ b/cypress/e2e/userText.cy.js @@ -30,11 +30,12 @@ describe('The user text detail page', () => { cy.visit('/texts/0') cy.wait('@getNodes') - cy.get('#text-detail li').first().within(() => { - cy.get('button.add-child').click() - cy.get('input.child-title').type('My new child') - cy.get('button.save-child').click() - }) + cy.get('#text-detail > ul > li').first() + .children('button.add-child').click() + cy.get('#text-detail > ul > li').first() + .children('input.child-title').type('My new child') + cy.get('#text-detail > ul > li').first() + .children('button.save-child').click() cy.contains('My new child') })