Commit Graph

20 Commits

Author SHA1 Message Date
Pablo Zmdl 22a5b65291 Refactor playwright login helper
It now works for all test specs and does not require a password from the
environment.

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
2026-07-07 10:13:49 +02:00
Pablo Zmdl 4e897aca90 Make playwright use 'dot' reporter and always exit at the end
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
2026-07-07 10:13:49 +02:00
Pablo Zmdl 39b5b14ead Enable running playwright tests locally
They now are running via a docker compose setup, which can be executed via
./php/tests/run.sh locally, and also gets called from the github workflow.

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
2026-07-07 10:13:49 +02:00
Pablo Zmdl 84341f4c71 Use test path that exists on macos, too
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
2026-06-25 17:22:06 +02:00
Simon L. ebad4fd06f fix spelling
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-06-22 16:04:35 +02:00
Simon L. 9cfd5b41f6 fix(desec): reuse an existing slug the user already owns
Logging in with an existing deSEC account and entering a slug you already
own failed with "Domain limit exceeded": registerDomain() always tried to
POST /domains/, which deSEC rejects (403 when the account is at its quota,
400/409 when the name is taken) even though the domain belongs to you.

Now, for a user-specified slug, a 400/403/409 triggers an ownership check
(GET /domains/{name}/); if the account already owns the domain it is reused
and registration completes. Otherwise a clear message is shown (over-limit
vs. taken by someone else). Random-slug registration is unchanged.

Update the deSEC mock to mirror the real status codes (per-account ownership,
domain limit -> 403, taken name -> 400, GET /domains/{name}/) and add a spec
that exercises the over-limit ownership-recovery path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-06-22 16:04:35 +02:00
Simon L. ee1bf5f88a ci(desec): drop obsolete SKIP_DOMAIN_VALIDATION from the deSEC test step
The deSEC registration entry point now renders regardless of
SKIP_DOMAIN_VALIDATION (it was moved out of the skip-validation guard), and
the deSEC flow already sets the domain with validation skipped internally.
Remove the now-unnecessary SKIP_DOMAIN_VALIDATION=false override from the
deSEC Playwright steps in both workflows and update the stale spec comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-06-22 16:04:34 +02:00
Simon L. 454905c852 feat(desec): run registration flow in a modal iframe
Move the deSEC "register a free domain" flow out of the inline containers
page form and into a modal backed by a dedicated /desec view loaded in an
iframe. The multi-step register -> verify -> domain process now re-renders
inside the modal, so the user can adjust the details and complete email
verification without reloading the whole page each step. Only once the
domain is fully registered does the view reload the parent containers page.

- add /desec route + desec.twig standalone view
- add desec-modal.js (open/close, backdrop + Escape) and desec-done.js
  (parent reload on completion)
- redirect register POST to the /desec view so steps stay in the modal
- drop the redundant <details> wrapper in desec-register.twig, add heading
- style the modal and let <button class="button"> pick up button styles
- drive the modal iframe in the Playwright specs and update the QA checklist

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-06-22 13:24:50 +02:00
Simon L. 4c8012adcd test(desec): end-to-end Playwright coverage against a local mock
- desec-mock.mjs: a dependency-free Node mock of the deSEC API endpoints the code
  uses, with the real status-code semantics (202 on account creation, 403 until
  verified then 200 + token, 201/409 on domain creation) plus /__control hooks to
  verify and reset state.
- desec-register.spec.js / desec-existing.spec.js drive the real AIO UI through
  the register -> verify -> domain flow and the existing-account login flow;
  desec-helpers.js holds the shared login helper. Each scenario ends by setting a
  domain, so they run as separate CI steps with a re-seed in between.
- seed-desec-mock-config.php points desec_api_base / desec_update_url at the mock
  (config key only, no env override, so production is unaffected) and seeds a
  known master password, since seeding configuration.json makes AIO consider
  itself already installed and /setup no longer shows a generated password.
- Both Playwright workflows start the mock, mount ./community-containers so the
  caddy/dnsmasq definitions enabled by the flow are present, seed the config, and
  run the two deSEC specs with a re-seed between them.

Co-Authored-By: szaimen <42591237+szaimen@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-06-18 13:19:16 +02:00
Copilot 05f9fa0e25 Fix playwright CI tests broken by Apache→Caddy switch (#7795)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-03-20 15:27:54 +01:00
Simon L. b47e894681 increase timeout for backup restore
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-01-29 09:54:34 +01:00
Julius Knorr 3f4eecaa96 feat: Add office switcher with feature comparison (#7421)
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Simon L. <szaimen@e.mail.de>
Signed-off-by: Andrew Backhouse <andrew.backhouse@nextcloud.com>
Co-authored-by: Simon L. <szaimen@e.mail.de>
Co-authored-by: Andrew Backhouse <andrew.backhouse@nextcloud.com>
2026-01-28 09:53:53 +01:00
dependabot[bot] 4690c8a4df build(deps): bump playwright and @playwright/test in /php/tests
Bumps [playwright](https://github.com/microsoft/playwright) to 1.56.1 and updates ancestor dependency [@playwright/test](https://github.com/microsoft/playwright). These dependencies need to be updated together.


Updates `playwright` from 1.51.1 to 1.56.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.51.1...v1.56.1)

Updates `@playwright/test` from 1.51.1 to 1.56.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.51.1...v1.56.1)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.56.1
  dependency-type: indirect
- dependency-name: "@playwright/test"
  dependency-version: 1.56.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 19:04:20 +00:00
Simon L. 27eac87064 restore-instance: fix domain check?
Signed-off-by: Simon L. <szaimen@e.mail.de>
2025-07-28 18:47:06 +02:00
Simon L. f2ff7451b4 initial-setup-test: adjust timeouts
Signed-off-by: Simon L. <szaimen@e.mail.de>
2025-07-28 16:31:19 +02:00
Simon L. b538bc7155 restore-instance: make hint more visible that backup needs to be restored two times if the backup contained any community container data
Signed-off-by: Simon L. <szaimen@e.mail.de>
2025-07-04 19:31:51 +02:00
Simon L. 9f5710917d restore-instance test: try to fix timeout problem
Signed-off-by: Simon L. <szaimen@e.mail.de>
2025-04-11 12:50:07 +02:00
Simon L. 0ed524baba modify two details in initial-setup test
Signed-off-by: Simon L. <szaimen@e.mail.de>
2025-03-20 13:13:09 +01:00
Simon L. 7eabc59328 adjust some details to actually do what the test is intended to do
Signed-off-by: Simon L. <szaimen@e.mail.de>
2025-03-20 13:08:54 +01:00
Richard Steinmetz e37611a759 test: add e2e tests via playwright
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-03-20 12:08:32 +01:00