|
|
|
@ -21,16 +21,19 @@ describe('Lists', () => {
|
|
|
|
|
|
|
|
|
|
it('Should create a new list', () => {
|
|
|
|
|
cy.visit('/')
|
|
|
|
|
cy.get('a.nsettings[href="/namespaces/1/list"]')
|
|
|
|
|
cy.get('.namespace-title .dropdown-trigger')
|
|
|
|
|
.click()
|
|
|
|
|
cy.get('.namespace-title .dropdown .dropdown-item')
|
|
|
|
|
.contains('New list')
|
|
|
|
|
.click()
|
|
|
|
|
cy.url()
|
|
|
|
|
.should('contain', '/namespaces/1/list')
|
|
|
|
|
cy.get('h3')
|
|
|
|
|
cy.get('.card-header-title')
|
|
|
|
|
.contains('Create a new list')
|
|
|
|
|
cy.get('input.input')
|
|
|
|
|
.type('New List')
|
|
|
|
|
cy.get('button.is-success')
|
|
|
|
|
.contains('Add')
|
|
|
|
|
cy.get('.button')
|
|
|
|
|
.contains('Create')
|
|
|
|
|
.click()
|
|
|
|
|
|
|
|
|
|
cy.wait(1000) // Waiting until the request to create the new list is done
|
|
|
|
@ -58,11 +61,11 @@ describe('Lists', () => {
|
|
|
|
|
.should('contain', '/lists/1/list')
|
|
|
|
|
cy.get('.list-title h1')
|
|
|
|
|
.should('contain', 'First List')
|
|
|
|
|
cy.get('.list-title a.icon')
|
|
|
|
|
.should('have.attr', 'href')
|
|
|
|
|
.and('include', '/lists/1/edit')
|
|
|
|
|
cy.get('.list-is-empty-notice')
|
|
|
|
|
.should('contain', 'This list is currently empty.')
|
|
|
|
|
cy.get('.list-title .dropdown')
|
|
|
|
|
.should('exist')
|
|
|
|
|
cy.get('p')
|
|
|
|
|
.contains('This list is currently empty.')
|
|
|
|
|
.should('exist')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
it('Should navigate to the task when the title is clicked', () => {
|
|
|
|
@ -141,9 +144,8 @@ describe('Lists', () => {
|
|
|
|
|
})
|
|
|
|
|
cy.visit('/lists/1/table')
|
|
|
|
|
|
|
|
|
|
cy.get('.table-view table.table a')
|
|
|
|
|
cy.get('.table-view table.table')
|
|
|
|
|
.contains(tasks[0].title)
|
|
|
|
|
.first()
|
|
|
|
|
.click()
|
|
|
|
|
|
|
|
|
|
cy.url()
|
|
|
|
@ -156,7 +158,7 @@ describe('Lists', () => {
|
|
|
|
|
TaskFactory.create(1)
|
|
|
|
|
cy.visit('/lists/1/gantt')
|
|
|
|
|
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart.box .tasks')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart .tasks')
|
|
|
|
|
.should('be.empty')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -164,7 +166,7 @@ describe('Lists', () => {
|
|
|
|
|
const now = new Date()
|
|
|
|
|
cy.visit('/lists/1/gantt')
|
|
|
|
|
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart.box .months')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart .months')
|
|
|
|
|
.should('contain', format(now, 'MMMM'))
|
|
|
|
|
.should('contain', format(now.setMonth(now.getMonth() + 1), 'MMMM'))
|
|
|
|
|
})
|
|
|
|
@ -177,9 +179,9 @@ describe('Lists', () => {
|
|
|
|
|
})
|
|
|
|
|
cy.visit('/lists/1/gantt')
|
|
|
|
|
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart.box .tasks')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart .tasks')
|
|
|
|
|
.should('not.be.empty')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart.box .tasks')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart .tasks')
|
|
|
|
|
.should('contain', tasks[0].title)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -194,9 +196,9 @@ describe('Lists', () => {
|
|
|
|
|
.contains('Show tasks which don\'t have dates set')
|
|
|
|
|
.click()
|
|
|
|
|
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart.box .tasks')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart .tasks')
|
|
|
|
|
.should('not.be.empty')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart.box .tasks .task.nodate')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart .tasks .task.nodate')
|
|
|
|
|
.should('exist')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -208,7 +210,7 @@ describe('Lists', () => {
|
|
|
|
|
})
|
|
|
|
|
cy.visit('/lists/1/gantt')
|
|
|
|
|
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart.box .tasks .task')
|
|
|
|
|
cy.get('.gantt-chart-container .gantt-chart .tasks .task')
|
|
|
|
|
.first()
|
|
|
|
|
.trigger('mousedown', {which: 1})
|
|
|
|
|
.trigger('mousemove', {clientX: 500, clientY: 0})
|
|
|
|
@ -361,9 +363,9 @@ describe('Lists', () => {
|
|
|
|
|
})
|
|
|
|
|
cy.visit('/lists/1/kanban')
|
|
|
|
|
|
|
|
|
|
cy.get('.kanban .bucket .tasks .task')
|
|
|
|
|
cy.getAttached('.kanban .bucket .tasks .task')
|
|
|
|
|
.contains(tasks[0].title)
|
|
|
|
|
.first()
|
|
|
|
|
.should('be.visible')
|
|
|
|
|
.click()
|
|
|
|
|
|
|
|
|
|
cy.url()
|
|
|
|
|