diff --git a/cypress/e2e/adminText.cy.js b/cypress/e2e/adminText.cy.js index 9dae1bf..18daef3 100644 --- a/cypress/e2e/adminText.cy.js +++ b/cypress/e2e/adminText.cy.js @@ -31,18 +31,18 @@ describe('The admin text detail page', () => { }) it('clicking "Add child" reveals an inline form', () => { - cy.get('#text-detail li').first().find('button.add-child').click() - cy.get('#text-detail li').first().find('input.child-title').should('be.visible') - cy.get('#text-detail li').first().find('button.save-child').should('be.visible') + cy.get('#text-detail li').first().children('button.add-child').click() + cy.get('#text-detail li').first().children('input.child-title').should('be.visible') + cy.get('#text-detail li').first().children('button.save-child').should('be.visible') }) it('can add a child to the root node', () => { cy.intercept('POST', '/api/nodes').as('createNode') cy.intercept('GET', '/api/nodes/0').as('getNodesRefresh') - cy.get('#text-detail > ul > li').first().find('button.add-child').click() - cy.get('#text-detail > ul > li').first().find('input.child-title').type('New Child Node') - cy.get('#text-detail > ul > li').first().find('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('New Child Node') + cy.get('#text-detail > ul > li').first().children('button.save-child').click() cy.wait('@createNode').its('response.statusCode').should('eq', 201) cy.wait('@getNodesRefresh') @@ -54,9 +54,9 @@ describe('The admin text detail page', () => { cy.intercept('POST', '/api/nodes').as('createNode') cy.intercept('GET', '/api/nodes/0').as('getNodesRefresh') - cy.get('#text-detail > ul > li > ul > li').first().find('button.add-child').click() - cy.get('#text-detail > ul > li > ul > li').first().find('input.child-title').type('Nested Child Node') - cy.get('#text-detail > ul > li > ul > li').first().find('button.save-child').click() + cy.get('#text-detail > ul > li > ul > li').first().children('button.add-child').click() + cy.get('#text-detail > ul > li > ul > li').first().children('input.child-title').type('Nested Child Node') + cy.get('#text-detail > ul > li > ul > li').first().children('button.save-child').click() cy.wait('@createNode').its('response.statusCode').should('eq', 201) cy.wait('@getNodesRefresh') @@ -68,9 +68,9 @@ describe('The admin text detail page', () => { cy.intercept('POST', '/api/nodes').as('createNode') cy.intercept('GET', '/api/nodes/0').as('getNodesRefresh') - cy.get('#text-detail > ul > li').first().find('button.add-child').click() - cy.get('#text-detail > ul > li').first().find('input.child-title').type('Persistent Child') - cy.get('#text-detail > ul > li').first().find('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('Persistent Child') + cy.get('#text-detail > ul > li').first().children('button.save-child').click() cy.wait('@createNode') cy.wait('@getNodesRefresh')