Skip to content

Migrate to playwright to update cypress#8223

Merged
max-nextcloud merged 45 commits intostable32from
chore/stable32/migrate-to-playwright
Jan 31, 2026
Merged

Migrate to playwright to update cypress#8223
max-nextcloud merged 45 commits intostable32from
chore/stable32/migrate-to-playwright

Conversation

@max-nextcloud
Copy link
Collaborator

Cypress 13 uses a browser so outdated it's not supported by Nextcloud anymore.

Many cypress tests fail with cypress 15 with browser crashes.
Backport the commits that migrate these tests to playwright.
Upgrade cypress to version 15.

  • chore(test): Migrate cypress offline tests to playwright
  • chore(test): split setOnline and setOffline
  • chore(test): add offline fixture to playwright
  • chore(test): get request token from /csrftoken
  • chore(test): split request token fixture from random user
  • chore(test): cleanup unused type and context
  • chore(test): mimetype change in playwright
  • chore(test): basic editor page object model
  • chore(test): file class for handling uploaded file
  • chore(test): file.open()
  • chore(test): with file.move() and file.close()
  • chore(test): with editor.typeHeading()
  • chore(test): change mimetype both ways
  • chore(test): move File class to separate file
  • chore(test): use EditorSection in offline test
  • chore(test) .withOpenMenu() to access submenus
  • chore(test): write offline and come back online
  • chore(test): reduce nesting in offline test
  • chore(test): wait for close request when closing
  • chore(test): migrate mobile spec from cy to playwright
  • chore(test): convert smart picker test to playwright
  • chore(test): convert print spec to playwright
  • chore(test): new File() with params object
  • chore(test): handle request token as part of login
  • chore(test): User class to wrap Account and Page
  • chore(test): print with shared file
  • chore(test): no need to merge randomUserTest
  • chore(test): rename editor.locator to editor.el
  • chore(test): make File attributes read only
  • chore(test): use parameter properties
  • chore(test): separate screenshots based on host
  • chore(test): add versions spec
  • chore(test): versions with ViewerSection
  • chore(test): move close() into ViewerSection
  • chore(test): convert version spec from cy to playwright
  • chore(test): folder description with playwright
  • chore(playwright): Fix prettier warnings
  • test(playwright): Add regression test for CJK IME input as first character
  • chore(test): format text with playwright
  • fix(css): full width table in print view
  • chore(deps): update dependency cypress to v15

@max-nextcloud max-nextcloud requested a review from mejo- as a code owner January 31, 2026 10:32
@max-nextcloud max-nextcloud force-pushed the chore/stable32/migrate-to-playwright branch from 118efab to 2aafbf3 Compare January 31, 2026 10:40
mejo- and others added 28 commits January 31, 2026 12:29
I was sick of debugging flaky Cypress tests, so I gave Playwright a try.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Preparing for multi context scenarios such as shared files.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
It is included in uploadFileTest and sharedFileTest

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
max-nextcloud and others added 14 commits January 31, 2026 12:29
Include a host identifier in the test name
so the screenshot name also includes it.

This way screenshots will only be compared
to the ones created on the same machine.

Only track the CI ones in git. Ignore the others.

> Having different screenshots between local and docker environments is expected.
> You can only compare screenshots that are taken in the same exact environment, OS, fonts, etc.
See microsoft/playwright#20366 (comment)

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Jonas <jonas@freesources.org>
…acter

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Max <max@nextcloud.com>
There are no buttons that we would need to leave room for.
This way the print view looks the same between editable and readonly shares.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud max-nextcloud force-pushed the chore/stable32/migrate-to-playwright branch from ca42de3 to 2df1049 Compare January 31, 2026 11:35
@max-nextcloud max-nextcloud requested a review from a team January 31, 2026 11:36
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this! Nice side-effect is that we can mark playwright as required in the branch protection rules once we dropped 31 support (next month 31 becomes EOL).

Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud max-nextcloud merged commit 59afde4 into stable32 Jan 31, 2026
70 of 71 checks passed
@max-nextcloud max-nextcloud deleted the chore/stable32/migrate-to-playwright branch January 31, 2026 13:45
@max-nextcloud
Copy link
Collaborator Author

/backport to stable31 please

@max-nextcloud
Copy link
Collaborator Author

Thanks for tackling this! Nice side-effect is that we can mark playwright as required in the branch protection rules once we dropped 31 support (next month 31 becomes EOL).

How about we backport this to stable31 as well? It's 99% changes to tests and might be helpful to keep tests running on stable31 in case we need to backport fixes to it later on.

max-nextcloud added a commit that referenced this pull request Feb 1, 2026
Our config still is in vite.config

This was a leftover from the backport in #8223.

Signed-off-by: Max <max@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments