1
0

Improve tests

This commit is contained in:
kolaente
2021-05-31 21:37:21 +02:00
parent 9c2d076f58
commit 80471f95e2
3 changed files with 44 additions and 18 deletions

View File

@ -262,11 +262,15 @@ describe('Lists', () => {
it('Shows tasks from the current and next month', () => {
const now = new Date()
const nextMonth = now
nextMonth.setDate(1)
nextMonth.setMonth(now.getMonth() + 1)
cy.visit('/lists/1/gantt')
cy.get('.gantt-chart-container .gantt-chart .months')
.should('contain', format(now, 'MMMM'))
.should('contain', format(now.setMonth(now.getMonth() + 1), 'MMMM'))
.should('contain', format(nextMonth, 'MMMM'))
})
it('Shows tasks with dates', () => {
@ -461,7 +465,7 @@ describe('Lists', () => {
})
cy.visit('/lists/1/kanban')
cy.getAttached('.kanban .bucket .tasks .task')
cy.getSettled('.kanban .bucket .tasks .task')
.contains(tasks[0].title)
.should('be.visible')
.click()
@ -483,7 +487,7 @@ describe('Lists', () => {
const task = tasks[0]
cy.visit('/lists/1/kanban')
cy.getAttached('.kanban .bucket .tasks .task')
cy.getSettled('.kanban .bucket .tasks .task')
.contains(task.title)
.should('be.visible')
.click()

View File

@ -113,9 +113,10 @@ describe('Task', () => {
cy.visit(`/tasks/${tasks[0].id}`)
cy.get('.task-view .heading .is-done')
.should('exist')
.should('be.visible')
.should('contain', 'Done')
cy.get('.task-view .action-buttons p.created')
.should('be.visible')
.should('contain', 'Done')
})
@ -183,9 +184,11 @@ describe('Task', () => {
cy.visit(`/tasks/${tasks[0].id}`)
cy.get('.task-view .comments .media.comment .editor .vue-easymde .EasyMDEContainer .CodeMirror-scroll')
.should('be.visible')
.type('{selectall}New Comment')
cy.get('.task-view .comments .media.comment .button:not([disabled])')
.contains('Comment')
.should('be.visible')
.click()
cy.get('.task-view .comments .media.comment .editor')
@ -232,6 +235,7 @@ describe('Task', () => {
cy.visit(`/tasks/${tasks[0].id}`)
cy.get('.task-view .action-buttons .button')
.should('be.visible')
.contains('Delete task')
.click()
cy.get('.modal-mask .modal-container .modal-content .header')
@ -314,6 +318,7 @@ describe('Task', () => {
cy.get('.task-view .action-buttons .button')
.contains('Add labels')
.should('be.visible')
.click()
cy.get('.task-view .details.labels-list .multiselect input')
.type(newLabelText)
@ -369,6 +374,7 @@ describe('Task', () => {
cy.visit(`/tasks/${tasks[0].id}`)
cy.get('.task-view .details.labels-list .multiselect .input-wrapper')
.should('be.visible')
.should('contain', labels[0].title)
cy.get('.task-view .details.labels-list .multiselect .input-wrapper')
.children()