fix: cypress tests
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
59448c1037
commit
0e6c219800
|
@ -5,7 +5,7 @@ import {prepareProjects} from './prepareProjects'
|
||||||
|
|
||||||
describe('Project History', () => {
|
describe('Project History', () => {
|
||||||
createFakeUserAndLogin()
|
createFakeUserAndLogin()
|
||||||
prepareLists()
|
prepareProjects()
|
||||||
|
|
||||||
it('should show a project history on the home page', () => {
|
it('should show a project history on the home page', () => {
|
||||||
cy.intercept(Cypress.env('API_URL') + '/namespaces*').as('loadNamespaces')
|
cy.intercept(Cypress.env('API_URL') + '/namespaces*').as('loadNamespaces')
|
||||||
|
@ -46,7 +46,7 @@ describe('Project History', () => {
|
||||||
|
|
||||||
cy.get('body')
|
cy.get('body')
|
||||||
.should('contain', 'Last viewed')
|
.should('contain', 'Last viewed')
|
||||||
cy.get('[data-cy="listCardGrid"]')
|
cy.get('[data-cy="projectCardGrid"]')
|
||||||
.should('not.contain', projects[0].title)
|
.should('not.contain', projects[0].title)
|
||||||
.should('contain', projects[1].title)
|
.should('contain', projects[1].title)
|
||||||
.should('contain', projects[2].title)
|
.should('contain', projects[2].title)
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('Project View Project', () => {
|
||||||
it('Should be an empty project', () => {
|
it('Should be an empty project', () => {
|
||||||
cy.visit('/projects/1')
|
cy.visit('/projects/1')
|
||||||
cy.url()
|
cy.url()
|
||||||
.should('contain', '/projects/1/project')
|
.should('contain', '/projects/1/list')
|
||||||
cy.get('.project-title h1')
|
cy.get('.project-title h1')
|
||||||
.should('contain', 'First Project')
|
.should('contain', 'First Project')
|
||||||
cy.get('.project-title .dropdown')
|
cy.get('.project-title .dropdown')
|
||||||
|
@ -38,7 +38,7 @@ describe('Project View Project', () => {
|
||||||
id: '{increment}',
|
id: '{increment}',
|
||||||
project_id: 1,
|
project_id: 1,
|
||||||
})
|
})
|
||||||
cy.visit('/projects/1/project')
|
cy.visit('/projects/1/list')
|
||||||
|
|
||||||
cy.get('.tasks .task .tasktext')
|
cy.get('.tasks .task .tasktext')
|
||||||
.contains(tasks[0].title)
|
.contains(tasks[0].title)
|
||||||
|
@ -89,7 +89,7 @@ describe('Project View Project', () => {
|
||||||
title: i => `task${i}`,
|
title: i => `task${i}`,
|
||||||
project_id: 1,
|
project_id: 1,
|
||||||
})
|
})
|
||||||
cy.visit('/projects/1/project')
|
cy.visit('/projects/1/list')
|
||||||
|
|
||||||
cy.get('.tasks')
|
cy.get('.tasks')
|
||||||
.should('contain', tasks[1].title)
|
.should('contain', tasks[1].title)
|
||||||
|
|
|
@ -73,7 +73,7 @@ describe('Home Page Task Overview', () => {
|
||||||
due_date: new Date().toISOString(),
|
due_date: new Date().toISOString(),
|
||||||
}, false)
|
}, false)
|
||||||
|
|
||||||
cy.visit(`/projects/${tasks[0].project_id}/project`)
|
cy.visit(`/projects/${tasks[0].project_id}/list`)
|
||||||
cy.get('.tasks .task')
|
cy.get('.tasks .task')
|
||||||
.first()
|
.first()
|
||||||
.should('contain.text', newTaskTitle)
|
.should('contain.text', newTaskTitle)
|
||||||
|
@ -90,7 +90,7 @@ describe('Home Page Task Overview', () => {
|
||||||
|
|
||||||
cy.visit('/')
|
cy.visit('/')
|
||||||
|
|
||||||
cy.visit(`/projects/${tasks[0].project_id}/project`)
|
cy.visit(`/projects/${tasks[0].project_id}/list`)
|
||||||
cy.get('.task-add textarea')
|
cy.get('.task-add textarea')
|
||||||
.type(newTaskTitle+'{enter}')
|
.type(newTaskTitle+'{enter}')
|
||||||
cy.visit('/')
|
cy.visit('/')
|
||||||
|
|
|
@ -63,7 +63,7 @@ describe('Task', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should be created new', () => {
|
it('Should be created new', () => {
|
||||||
cy.visit('/projects/1/project')
|
cy.visit('/projects/1/list')
|
||||||
cy.get('.input[placeholder="Add a new task…"')
|
cy.get('.input[placeholder="Add a new task…"')
|
||||||
.type('New Task')
|
.type('New Task')
|
||||||
cy.get('.button')
|
cy.get('.button')
|
||||||
|
@ -77,7 +77,7 @@ describe('Task', () => {
|
||||||
it('Inserts new tasks at the top of the project', () => {
|
it('Inserts new tasks at the top of the project', () => {
|
||||||
TaskFactory.create(1)
|
TaskFactory.create(1)
|
||||||
|
|
||||||
cy.visit('/projects/1/project')
|
cy.visit('/projects/1/list')
|
||||||
cy.get('.project-is-empty-notice')
|
cy.get('.project-is-empty-notice')
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
cy.get('.input[placeholder="Add a new task…"')
|
cy.get('.input[placeholder="Add a new task…"')
|
||||||
|
@ -95,7 +95,7 @@ describe('Task', () => {
|
||||||
it('Marks a task as done', () => {
|
it('Marks a task as done', () => {
|
||||||
TaskFactory.create(1)
|
TaskFactory.create(1)
|
||||||
|
|
||||||
cy.visit('/projects/1/project')
|
cy.visit('/projects/1/list')
|
||||||
cy.get('.tasks .task .fancycheckbox label.check')
|
cy.get('.tasks .task .fancycheckbox label.check')
|
||||||
.first()
|
.first()
|
||||||
.click()
|
.click()
|
||||||
|
@ -106,7 +106,7 @@ describe('Task', () => {
|
||||||
it('Can add a task to favorites', () => {
|
it('Can add a task to favorites', () => {
|
||||||
TaskFactory.create(1)
|
TaskFactory.create(1)
|
||||||
|
|
||||||
cy.visit('/projects/1/project')
|
cy.visit('/projects/1/list')
|
||||||
cy.get('.tasks .task .favorite')
|
cy.get('.tasks .task .favorite')
|
||||||
.first()
|
.first()
|
||||||
.click()
|
.click()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
||||||
import {createLists} from '../list/prepareLists'
|
import {createProjects} from '../project/prepareProjects'
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
cy.get('.navbar .user .username')
|
cy.get('.navbar .user .username')
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ColorBubble
|
<ColorBubble
|
||||||
v-if="showProjectColor && projectColor !== ''"
|
v-if="showProjectColor && projectColor !== '' && currentProject.id !== task.projectId"
|
||||||
:color="projectColor"
|
:color="projectColor"
|
||||||
class="mr-1"
|
class="mr-1"
|
||||||
/>
|
/>
|
||||||
|
|
Reference in New Issue