feat: rename lists to projects #2697

Closed
konrad wants to merge 53 commits from feature/rename-lists-to-projects into main
6 changed files with 13 additions and 13 deletions
Showing only changes of commit 0e6c219800 - Show all commits

View File

@ -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)

View File

@ -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)

View File

@ -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('/')

View File

@ -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()

View File

@ -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')

View File

@ -7,7 +7,7 @@
/> />
<ColorBubble <ColorBubble
v-if="showProjectColor && projectColor !== ''" v-if="showProjectColor && projectColor !== '' && currentProject.id !== task.projectId"
konrad marked this conversation as resolved
Review

This addition shouldn't be part of this PR. This PR is so huge that we really should not do more than the renaming.

This addition shouldn't be part of this PR. This PR is so huge that we really should not do more than the renaming.
Review

What's interesting about this is I noticed this only because the test broke checking this. Not sure why.

I could either

  • add the change before the PR
  • add the change after this PR

Before might be better.

Of course, the best solution would be to fix whatever caused the test to fail but I fear that would be a change like this.

What's interesting about this is I noticed this only because the test broke checking this. Not sure why. I could either * add the change before the PR * add the change after this PR Before might be better. Of course, the best solution would be to fix whatever caused the test to fail but I fear that would be a change like this.
Review

Do it before

Do it before
Review

PR: #2975

PR: https://kolaente.dev/vikunja/frontend/pulls/2975
:color="projectColor" :color="projectColor"
class="mr-1" class="mr-1"
/> />