Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change package to nextcloud test server #601

Open
4 tasks
susnux opened this issue Aug 26, 2024 · 7 comments
Open
4 tasks

Change package to nextcloud test server #601

susnux opened this issue Aug 26, 2024 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@susnux
Copy link
Contributor

susnux commented Aug 26, 2024

Proposal

Turn this package into a generic @nextcloud/test-server possibly with integrations for multiple test frameworks.

There are already apps using other E2E testing frameworks like Playwright.
The docker test server functionality in this repo is useful without Cypress - but this repo is currently tightly bound to cypress (naming, peer dependency, ...)

Steps

  • Create a nextcloud-cypress branch to keep track of the current state and possibly release bugfixes for @nextcloud/cypress
  • Update main branch to reflect the change (package name, dependencies, readme)
  • Rename the repo
  • Release @nextcloud/test-server

Points to discuss

Naming

@nextcloud/test-server is the most shortest most generic yet precise term I could come up with.

@nextcloud/e2e-test-server is more precise. I don't see a use for this outside of e2e testing.

Can be discussed in the PR.

original issue by @susnux I would like to split this package and create a new one like `@nextcloud/docker-testing-server` or similar.

The reason is there are already apps using other E2E testing frameworks like PlayWright.
So currently either you copy paste the docker code from this package, you write it your own, or you install this package.
But installing this packages makes no sense as it will pull in Cypress even if you do not use Cypress.

So to separate into logically connected pieces I would separate into:

  • @nextcloud/cypress -> This packages with Cypress integration for Nextcloud
  • @nextcloud/testing-server (or any other name you like) -> Creating and spinning up a testing server

What is your opinion on this? cc @skjnldsv @max-nextcloud @artonge @ShGKme

@susnux susnux added the question Further information is requested label Aug 26, 2024
@nextcloud-libraries nextcloud-libraries deleted a comment Aug 26, 2024
@skjnldsv
Copy link
Contributor

We could also rename this one and create tooling for both in the same repo? :)

We're already supporting so many libs repos 🙈

@susnux
Copy link
Contributor Author

susnux commented Aug 27, 2024

💨 mono repo

Completely unrelated, so please ignore this part^^
Just think it could make maintenance chores easier, as it could fully automate dependency updates (and node version),
even releases could be automated with semantic release (yes this also works with repos but setup is easier 😅 )


No but could also work, but then we should make dependencies optional, as you do not want to install fully Cypress just for docker or install Playwright when using Cypress 🙈

@max-nextcloud
Copy link
Contributor

Both approaches (two repos or making cypress optional) are fine with me.

@susnux
Copy link
Contributor Author

susnux commented Sep 3, 2024

We could also rename this one and create tooling for both in the same repo? :)

Or we make it tooling agnostic, as the current methods do not really need Cypress or any other tooling.
E.g. createRandomUser could just be a docker command, no need to wrap that with Cypress.
As that is not part of any test but just preparation.

Of course I know that there is more here, but we basically do not have implemented selectors.
So currently this is just providing interfaces for test setup on the docker like creating users etc.

@susnux
Copy link
Contributor Author

susnux commented Sep 3, 2024

So for me every solution would work, but I would like to rather have the setup stuff located in a shared package than maintaining a fork of that functions just within my apps 😅

max-nextcloud added a commit that referenced this issue Jan 6, 2025
See #601.

This package is also used in playwright tests.
Remove the peer dependency to avaoid automatic installation of cypress.

I also considered making it an optional dependency.
But then it would still be installed by default.

Signed-off-by: Max <[email protected]>
max-nextcloud added a commit that referenced this issue Jan 6, 2025
See #601.

This package is also used in playwright tests.
Remove the peer dependency to avaoid automatic installation of cypress.

I also considered making it an optional dependency.
But then it would still be installed by default.

Signed-off-by: Max <[email protected]>
max-nextcloud added a commit that referenced this issue Jan 6, 2025
See #601.

This package is also used in playwright tests.
Remove the peer dependency to avaoid automatic installation of cypress.

I also considered making it an optional dependency.
But then it would still be installed by default.

Signed-off-by: Max <[email protected]>
@max-nextcloud
Copy link
Contributor

max-nextcloud commented Jan 6, 2025

Or we make it tooling agnostic, as the current methods do not really need Cypress or any other tooling.

This seems to be the current consensus - so I started by removing the cypress peer dependency:

@max-nextcloud max-nextcloud changed the title Split package into cypress testing library and docker testing server Change package to nextcloud test server Jan 8, 2025
@max-nextcloud max-nextcloud self-assigned this Jan 8, 2025
@max-nextcloud
Copy link
Contributor

I changed the issue title to reflect the current discussion.
and updated the description to reflect what's needed to change the package in one go as suggested by @skjnldsv in #725 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants
@susnux @skjnldsv @max-nextcloud and others