From 3a1e91cc4fb8fcd41233a914ee765f5769f5fd41 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sat, 2 May 2026 21:58:34 +0300 Subject: [PATCH] scope user text child-add cypress selectors the seeded text already has nested nodes, so 'li.first()' matched multiple buttons. scope the selectors to top-level li children to match the working pattern in adminText.cy.js. --- cypress/e2e/userText.cy.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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') })