Fix frontend tasks display

This commit is contained in:
Michael Shamoon
2022-11-30 13:55:51 -08:00
parent a3bc3b78d5
commit 9b602a4bf0
4 changed files with 88 additions and 203 deletions

View File

@@ -44,6 +44,39 @@ describe('tasks', () => {
})
})
it('should correctly switch between task tabs', () => {
cy.get('tbody').find('tr:visible').its('length').should('eq', 10) // double because collapsible result tr
cy.wait(500) // stabilizes the test, for some reason...
cy.get('app-tasks')
.find('a:visible')
.contains('Queued')
.first()
.click()
.wait(2000)
.then(() => {
cy.get('tbody').find('tr:visible').should('not.exist')
})
cy.get('app-tasks')
.find('a:visible')
.contains('Started')
.first()
.click()
.wait(2000)
.then(() => {
cy.get('tbody').find('tr:visible').its('length').should('eq', 2) // double because collapsible result tr
})
cy.get('app-tasks')
.find('a:visible')
.contains('Complete')
.first()
.click()
.wait('@tasks')
.wait(2000)
.then(() => {
cy.get('tbody').find('tr:visible').its('length').should('eq', 12) // double because collapsible result tr
})
})
it('should allow toggling all tasks in list and warn on dismiss', () => {
cy.get('thead').find('input[type="checkbox"]').first().click()
cy.get('body').find('button').contains('Dismiss selected').first().click()