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.
This commit is contained in:
parent
c065e065e9
commit
3a1e91cc4f
1 changed files with 6 additions and 5 deletions
|
|
@ -30,11 +30,12 @@ describe('The user text detail page', () => {
|
||||||
cy.visit('/texts/0')
|
cy.visit('/texts/0')
|
||||||
cy.wait('@getNodes')
|
cy.wait('@getNodes')
|
||||||
|
|
||||||
cy.get('#text-detail li').first().within(() => {
|
cy.get('#text-detail > ul > li').first()
|
||||||
cy.get('button.add-child').click()
|
.children('button.add-child').click()
|
||||||
cy.get('input.child-title').type('My new child')
|
cy.get('#text-detail > ul > li').first()
|
||||||
cy.get('button.save-child').click()
|
.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')
|
cy.contains('My new child')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue