fix: cypress tests
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2023-01-17 23:34:49 +01:00
parent 59448c1037
commit 0e6c219800
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
6 changed files with 13 additions and 13 deletions

View File

@ -5,7 +5,7 @@ import {prepareProjects} from './prepareProjects'
describe('Project History', () => {
createFakeUserAndLogin()
prepareLists()
prepareProjects()
it('should show a project history on the home page', () => {
cy.intercept(Cypress.env('API_URL') + '/namespaces*').as('loadNamespaces')
@ -46,7 +46,7 @@ describe('Project History', () => {
cy.get('body')
.should('contain', 'Last viewed')
cy.get('[data-cy="listCardGrid"]')
cy.get('[data-cy="projectCardGrid"]')
.should('not.contain', projects[0].title)
.should('contain', projects[1].title)
.should('contain', projects[2].title)

View File

@ -13,7 +13,7 @@ describe('Project View Project', () => {
it('Should be an empty project', () => {
cy.visit('/projects/1')
cy.url()
.should('contain', '/projects/1/project')
.should('contain', '/projects/1/list')
cy.get('.project-title h1')
.should('contain', 'First Project')
cy.get('.project-title .dropdown')
@ -38,7 +38,7 @@ describe('Project View Project', () => {
id: '{increment}',
project_id: 1,
})
cy.visit('/projects/1/project')
cy.visit('/projects/1/list')
cy.get('.tasks .task .tasktext')
.contains(tasks[0].title)
@ -89,7 +89,7 @@ describe('Project View Project', () => {
title: i => `task${i}`,
project_id: 1,
})
cy.visit('/projects/1/project')
cy.visit('/projects/1/list')
cy.get('.tasks')
.should('contain', tasks[1].title)

View File

@ -73,7 +73,7 @@ describe('Home Page Task Overview', () => {
due_date: new Date().toISOString(),
}, false)
cy.visit(`/projects/${tasks[0].project_id}/project`)
cy.visit(`/projects/${tasks[0].project_id}/list`)
cy.get('.tasks .task')
.first()
.should('contain.text', newTaskTitle)
@ -90,7 +90,7 @@ describe('Home Page Task Overview', () => {
cy.visit('/')
cy.visit(`/projects/${tasks[0].project_id}/project`)
cy.visit(`/projects/${tasks[0].project_id}/list`)
cy.get('.task-add textarea')
.type(newTaskTitle+'{enter}')
cy.visit('/')

View File

@ -63,7 +63,7 @@ describe('Task', () => {
})
it('Should be created new', () => {
cy.visit('/projects/1/project')
cy.visit('/projects/1/list')
cy.get('.input[placeholder="Add a new task…"')
.type('New Task')
cy.get('.button')
@ -77,7 +77,7 @@ describe('Task', () => {
it('Inserts new tasks at the top of the project', () => {
TaskFactory.create(1)
cy.visit('/projects/1/project')
cy.visit('/projects/1/list')
cy.get('.project-is-empty-notice')
.should('not.exist')
cy.get('.input[placeholder="Add a new task…"')
@ -95,7 +95,7 @@ describe('Task', () => {
it('Marks a task as done', () => {
TaskFactory.create(1)
cy.visit('/projects/1/project')
cy.visit('/projects/1/list')
cy.get('.tasks .task .fancycheckbox label.check')
.first()
.click()
@ -106,7 +106,7 @@ describe('Task', () => {
it('Can add a task to favorites', () => {
TaskFactory.create(1)
cy.visit('/projects/1/project')
cy.visit('/projects/1/list')
cy.get('.tasks .task .favorite')
.first()
.click()

View File

@ -1,5 +1,5 @@
import {createFakeUserAndLogin} from '../../support/authenticateUser'
import {createLists} from '../list/prepareLists'
import {createProjects} from '../project/prepareProjects'
function logout() {
cy.get('.navbar .user .username')

View File

@ -7,7 +7,7 @@
/>
<ColorBubble
v-if="showProjectColor && projectColor !== ''"
v-if="showProjectColor && projectColor !== '' && currentProject.id !== task.projectId"
:color="projectColor"
class="mr-1"
/>