e2e test that created text has root node
This commit is contained in:
parent
f6791b6459
commit
1fb5307062
1 changed files with 10 additions and 0 deletions
|
|
@ -26,6 +26,16 @@ describe('The admin page', () => {
|
|||
cy.contains('Test Text')
|
||||
})
|
||||
|
||||
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/texts/1/nodes').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