Skip to content

refactor(test): migrate Cypress component test to vitest - #55747

Merged
susnux merged 4 commits into
masterfrom
chore/migrate-cypress-vitest
Oct 15, 2025
Merged

refactor(test): migrate Cypress component test to vitest#55747
susnux merged 4 commits into
masterfrom
chore/migrate-cypress-vitest

Conversation

@susnux

@susnuxsusnux commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

Summary

Reasons for this:

  • Cypress component tests dropped support for Vue 2 long time ago
  • Component tests are basically unit tests so we can reduce the unit test frameworks to one (we dropped Karma already)
  • Much faster execution time then spinning up a browser
  • Most important Cypress does not like component tests with mixed Vue versions, so this is blocking the Vue 3 migration. Because it will try to always use its internal Vue version (Vue 2). So this already breaks updating @nextcloud/dialogs or @nextcloud/password-confirmation which are already using Vue 3.

Other benefits: We can mock whatever we want because its now more like normal unit tests.
So its also a bit easier to test composables etc and only have to think about one way of writing your frontend unit tests located next to your source code.
For real browser tests we have end2end tests which are still Cypress :)

Checklist

@susnuxsusnux added this to the Nextcloud 33 milestone Oct 14, 2025
@susnuxsusnux added 2. developing Work in progress tests Related to tests ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Oct 14, 2025
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnuxforce-pushed the chore/migrate-cypress-vitest branch from 8a4a65b to e7357dfCompareOctober 14, 2025 12:33
@susnux
susnux marked this pull request as ready for review October 14, 2025 14:52
@susnux
susnux requested review from a team and skjnldsv as code ownersOctober 14, 2025 14:52
@susnux
susnux requested review from CarlSchwan, nfebe, provokateurin and szaimen and removed request for a teamOctober 14, 2025 14:52

@szaimenszaimen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@susnux
susnux removed the request for review from a teamOctober 14, 2025 14:55

<!-- Database type select -->
<fieldset class="setup-form__database-type">
<legend class="hidden-visually">

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for your information this is also somewhat of an a11y fix as per WCAG every fieldset (role group) must have a label by using a legend.

@susnux
susnux merged commit 0c1be89 into masterOct 15, 2025
233 of 242 checks passed
@susnux
susnux deleted the chore/migrate-cypress-vitest branch October 15, 2025 08:55
@nextcloud-botnextcloud-bot mentioned this pull request Jan 6, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developingWork in progress♻️ refactorRefactor code (not a bug fix, not a feature just refactoring)testsRelated to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@susnux@artonge@CarlSchwan@szaimen