e2e test that created text has root node

This commit is contained in:
Yisroel Baum 2026-04-17 10:50:14 +03:00
parent f6791b6459
commit 1fb5307062
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -26,6 +26,16 @@ describe('The admin page', () => {
cy.contains('Test Text') 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', () => { it('navigates to a specific texts page', () => {
cy.visit('/admin/texts') cy.visit('/admin/texts')
cy.get('#newTextName').type('My New Text') cy.get('#newTextName').type('My New Text')