feat(tests): add tests for gantt chart task detail open

This commit is contained in:
kolaente 2022-11-09 20:16:30 +01:00
parent 2952a0155f
commit bd0c4d0355
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 22 additions and 7 deletions

View File

@ -107,4 +107,19 @@ describe('List View Gantt', () => {
cy.get('.list-gantt .gantt-options .field .control input.input.form-control')
.should('have.value', '25 Sep 2022 to 5 Nov 2022')
})
it('Should open a task when double clicked on it', () => {
const now = new Date()
const tasks = TaskFactory.create(1, {
start_date: formatISO(now),
end_date: formatISO(now.setDate(now.getDate() + 4)),
})
cy.visit('/lists/1/gantt')
cy.get('.gantt-container .g-gantt-chart .g-gantt-row-bars-container .g-gantt-bar')
.dblclick()
cy.url()
.should('contain', `/tasks/${tasks[0].id}`)
})
})