feature/fix-macos-cypress-and-align-with-create-vite #2898

Merged
konrad merged 3 commits from dpschen/frontend:feature/fix-macos-cypress-and-align-with-create-vite into main 2023-01-04 03:19:38 +00:00
Member
  • use cy.session
  • align repo closer to create-vue template and improve cypress integration
- use cy.session - align repo closer to `create-vue` template and improve cypress integration
dpschen added 1 commit 2022-12-30 16:26:19 +00:00
konrad was assigned by dpschen 2022-12-30 16:26:31 +00:00
dpschen requested review from konrad 2022-12-30 16:26:35 +00:00
dpschen added the
dependencies
changes requested
area/internal-code
labels 2022-12-30 16:26:45 +00:00
Member

Hi dpschen!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2898-feature-fix-macos-cypress-and-al--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi dpschen! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2898-feature-fix-macos-cypress-and-al--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad reviewed 2023-01-03 14:13:30 +00:00
@ -15,1 +14,3 @@
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
baseUrl: 'http://127.0.0.1:4173',
experimentalRunAllSpecs: true,

What does this do?

What does this do?
Author
Member

Cyress removed the "run all" button in the UI in cypress 12 (i think). This readds it

Cyress removed the "run all" button in the UI in cypress 12 (i think). This readds it
dpschen marked this conversation as resolved
@ -11,3 +10,1 @@
function seedTasks(numberOfTasks = 100, startDueDate = new Date()) {
UserFactory.create(1)
function seedTasks(numberOfTasks = 50, startDueDate = new Date()) {

I think the changes to this function have broken the tests: https://cloud.cypress.io/projects/181c7x/runs/3562/overview

I think the changes to this function have broken the tests: https://cloud.cypress.io/projects/181c7x/runs/3562/overview
Author
Member

will check

will check
Author
Member
See https://kolaente.dev/vikunja/frontend/pulls/2898/files#issuecomment-41985
dpschen marked this conversation as resolved
dpschen force-pushed feature/fix-macos-cypress-and-align-with-create-vite from 150e03b65a to a04272846a 2023-01-03 14:56:59 +00:00 Compare
dpschen reviewed 2023-01-03 15:04:59 +00:00
@ -45,3 +45,3 @@
cy.get('[data-cy="showTasks"] .card .task')
.each(([task], index) => {
expect(task.innerText).to.contain(tasks[index].title)
expect(task.innerText).to.contain(tasks[taskCount - 1 - index].title)
Author
Member

Somehow the order of the tasks has turned around. I think the reason is in line 20. But I have no clue why. All of those tasks should have 100% the same due_date. So I'm also do not understand why we expect the order to be like we do in the first place.

Somehow the order of the tasks has turned around. I think the reason is [in line 20](https://kolaente.dev/vikunja/frontend/src/commit/a04272846aaaf47a1248476098c46b0219758eab/cypress/e2e/task/overview.spec.ts#L20). But I have no clue why. All of those tasks should have 100% the same `due_date`. So I'm also do not understand why we expect the order to be like we do in the first place.

The line you picked is correct. Only now this is

-dueDate = (new Date(dueDate.valueOf())).setDate((new Date(dueDate.valueOf())).getDate() + 2)
+dueDate = new Date(new Date(dueDate).setDate(now.getDate() + 2))

Before the last due date was increased by 2, now it's always the value of now. Hence all tasks get the same due date.

The line you picked is correct. Only now this is ```diff -dueDate = (new Date(dueDate.valueOf())).setDate((new Date(dueDate.valueOf())).getDate() + 2) +dueDate = new Date(new Date(dueDate).setDate(now.getDate() + 2)) ``` Before the last due date was increased by 2, now it's always the value of `now`. Hence all tasks get the same due date.
Author
Member

I don't get where in the loop dueDate gets modified.
Regardless I replaced now with dueDate and it works now as intended.

I don't get where in the loop dueDate gets modified. Regardless I replaced `now` with `dueDate` and it works now as intended.

I don't get where in the loop dueDate gets modified.

Inside of setDate. It gets saved back to the variable in the same line.

> I don't get where in the loop dueDate gets modified. Inside of `setDate`. It gets saved back to the variable in the same line.
Author
Member

Okay… took me a bit :) 👍

Okay… took me a bit :) 👍
dpschen marked this conversation as resolved
dpschen force-pushed feature/fix-macos-cypress-and-align-with-create-vite from a04272846a to d850d5b98f 2023-01-03 15:31:35 +00:00 Compare
konrad approved these changes 2023-01-03 17:07:12 +00:00
konrad scheduled this pull request to auto merge when all checks succeed 2023-01-03 17:07:47 +00:00
konrad merged commit bb4ed3d223 into main 2023-01-04 03:19:38 +00:00
dpschen deleted branch feature/fix-macos-cypress-and-align-with-create-vite 2023-01-04 03:28:21 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.