Frontend testing for new comment UI features

This commit is contained in:
shamoon
2023-03-16 23:41:34 -07:00
parent 8bcb365e53
commit 9d17727cb6
2 changed files with 23 additions and 4 deletions

View File

@@ -104,4 +104,19 @@ describe('document-detail', () => {
cy.get('app-document-comments').find('form button').click().wait(1500)
cy.get('app-document-comments').find('.card').its('length').should('eq', 4)
})
it('should support navigation to comments tab by url', () => {
cy.visit('/documents/1/comments')
cy.get('app-document-comments').should('exist')
})
it('should dynamically update comment counts', () => {
cy.visit('/documents/1/comments')
cy.get('app-document-comments').within(() => cy.contains('Delete').click())
cy.get('ul.nav')
.find('li')
.contains('Comments')
.find('.badge')
.contains('2')
})
})