add tests for admin text page, move some tests over from original admin test file
This commit is contained in:
parent
f5a8b8447f
commit
2121a0ba9d
2 changed files with 86 additions and 17 deletions
|
|
@ -26,23 +26,6 @@ describe('The admin page', () => {
|
|||
cy.contains('Test Text')
|
||||
})
|
||||
|
||||
it('shows one root node and child node on the seeded text page', () => {
|
||||
cy.visit('/admin/texts/0')
|
||||
cy.intercept('GET', '/api/nodes/0').as('getNodes')
|
||||
cy.wait('@getNodes')
|
||||
cy.get('#text-detail > ul > li > ul > li').should('have.length', 1)
|
||||
})
|
||||
|
||||
it('shows one root node on the text page', () => {
|
||||
cy.visit('/admin/texts')
|
||||
cy.get('#newTextName').type('My Node Text')
|
||||
cy.get('#submit').click()
|
||||
cy.intercept('GET', '/api/nodes/1').as('getNodes')
|
||||
cy.get('a').contains('My Node Text').click()
|
||||
cy.wait('@getNodes')
|
||||
cy.get('#text-detail > ul').should('have.length', 1)
|
||||
})
|
||||
|
||||
it('navigates to a specific texts page', () => {
|
||||
cy.visit('/admin/texts')
|
||||
cy.get('#newTextName').type('My New Text')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue