nextcloud / nextcloud/text

Migrate cypress e2e and component tests to playwright

Open
#5,946 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop tests
Dominant language
JavaScript
Stars
659
Forks
133
Avg merge
1d 20h
Merged PRs (30d)
110

Description

We should migrate our cypress tests to playwright step by step.

For many frontend-only tests like formatting functionality we might actually migrate them to component tests that mount an editor using the createEditor() API to get rid of the overhead to use markdown file that needs to be created in the Nextcloud files app each time.

Original issue description:

When talking with Ferdinand during the performance hackweek he mentioned that playwright is very nice and they actually support multiple tabs which is something we lack in cypress.

We could take this as an opportunity to look into it to have some basic tests and get a feeling about how it behaves writing tests compared to cypress.

There is no migration path for tests, but from what I've heard it is way less prone to flaky tests with a more natural execution flow and await support.

https://playwright.dev/docs/pages

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or individual tests. Start by inventorying the existing Cypress suite and reading the linked Playwright documentation, then assess the createEditor() API for frontend-only component tests. Done means the relevant tests have been migrated step by step with the proposed component-test approach applied where appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, javascript, playwright
Domain
frontend, testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.