Fix tasks not disappearing from the kanban board when moving them between lists
This commit is contained in:
parent
08dcc77228
commit
8e2dfcffd5
2 changed files with 35 additions and 0 deletions
|
@ -371,5 +371,39 @@ describe('Lists', () => {
|
||||||
cy.url()
|
cy.url()
|
||||||
.should('contain', `/tasks/${tasks[0].id}`)
|
.should('contain', `/tasks/${tasks[0].id}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('Should remove a task from the kanban board when moving it to another list', () => {
|
||||||
|
const lists = ListFactory.create(2)
|
||||||
|
const tasks = TaskFactory.create(5, {
|
||||||
|
id: '{increment}',
|
||||||
|
list_id: 1,
|
||||||
|
bucket_id: 1,
|
||||||
|
})
|
||||||
|
const task = tasks[0]
|
||||||
|
cy.visit('/lists/1/kanban')
|
||||||
|
|
||||||
|
cy.getAttached('.kanban .bucket .tasks .task')
|
||||||
|
.contains(task.title)
|
||||||
|
.should('be.visible')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
cy.get('.task-view .action-buttons .button')
|
||||||
|
.contains('Move task')
|
||||||
|
.click()
|
||||||
|
cy.get('.task-view .content.details .field .multiselect.control .input-wrapper input')
|
||||||
|
.type(`${lists[1].title}{enter}`)
|
||||||
|
// The requests happen with a 200ms timeout. Because of that, the results are not yet there when cypress
|
||||||
|
// presses enter and we can't simulate pressing on enter to select the item.
|
||||||
|
cy.get('.task-view .content.details .field .multiselect.control .search-results')
|
||||||
|
.children()
|
||||||
|
.first()
|
||||||
|
.click()
|
||||||
|
|
||||||
|
cy.get('.global-notification')
|
||||||
|
.should('contain', 'Success')
|
||||||
|
cy.go('back')
|
||||||
|
cy.get('.kanban .bucket')
|
||||||
|
.should('not.contain', task.title)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -679,6 +679,7 @@ export default {
|
||||||
changeList(list) {
|
changeList(list) {
|
||||||
this.task.listId = list.id
|
this.task.listId = list.id
|
||||||
this.saveTask()
|
this.saveTask()
|
||||||
|
this.$store.commit('kanban/removeTaskInBucket', this.task)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue