Skip to content

feat(e2e): add Playwright e2e tests for first-run wizard and settings page - #2017

Open
szaimen with Copilot wants to merge 3 commits into
masterfrom
copilot/setup-e2e-tests-for-firstrunwizard
Open

feat(e2e): add Playwright e2e tests for first-run wizard and settings page#2017
szaimen with Copilot wants to merge 3 commits into
masterfrom
copilot/setup-e2e-tests-for-firstrunwizard

Conversation

Copilot AI commented Mar 23, 2026

Copy link
Copy Markdown

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/fead3c70-8ae9-4d07-9ab7-4a42f2bbeb6d


fix(e2e): use nextcloud-version-matrix to determine correct server branch

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/c1e9236f-f665-4945-980b-77e53a8f025a


refactor: use @nextcloud/e2e-test-server for Docker-based e2e testing

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/4928786f-c755-4bea-8c14-e5e1ae087ec3


fix(e2e): fix 3 failing test cases

  • Fix App.vue to skip intro animation in changelog-only mode
  • Fix 'can be navigated' test: NcButton primary variant has no CSS class
  • Fix settings test: duplicate ID selector + add Skip button click
  • Use --with-deps for Playwright install in CI

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/57316464-f4c4-4f0c-85e3-87160d3bcd03


fix(e2e): revert App.vue changes, fix tests without app-level workarounds

  • Revert src/views/App.vue to original state (always start at intro animation)
  • Fix 'opens when a new major version' test: click Skip to advance past intro
  • Move 'About & What's new' wizard test from settings.spec.ts to firstrunwizard.spec.ts
  • Remove 'About & What's new' describe block from settings.spec.ts

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/46619e35-ecf5-4089-a682-8830bd9abfe6


fix(e2e): fix setUserPreference to pass value as positional arg to occ user:setting

occ user:setting takes the value as a positional argument, not --value=VALUE.
The --value flag was silently ignored, so setUserPreference never actually set
the 'show' preference, causing the 'opens when a new major version was shipped'
test to always fail with the wizard landing on page 0 instead of the whats-new page.

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/784a92c7-5c87-4afc-b355-9a4633cbe01d


fix(e2e): refactor tests to use Playwright fixtures and fix infrastructure issues

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/d25ff6bc-e079-4e27-b832-5e2301f569ff


fix(e2e): use HTTP-only server, fixture-based random user login, fix copyright year

  • Remove generateSslCertificate(); add makeHttpOnly() that patches the
    container's run.sh to strip the SSL directives (a2enmod ssl, a2ensite
    default-ssl, a2enconf ssl-params, apache2ctl configtest) so Apache
    starts on plain HTTP. Import getContainerName from the package instead
    of recomputing it with basename(process.cwd()).
  • Rewrite fixtures.ts following susnux's suggestion: extend the test
    base with a user fixture (auto: true) that creates a random user,
    logs in via the Nextcloud login form, and deletes the user after the
    test. auto:true ensures every test gets a fresh authenticated session
    without having to explicitly request the fixture.
  • Remove all try/finally blocks and manual user management from the spec
    files; tests that need user.userId declare { page, user }, others only
    { page }.
  • Fix copyright year 2024 → 2026 in all new/modified e2e files.
  • Remove unused basename import from start-nextcloud-server.mjs.

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/1c61fbba-9f10-42ec-9b79-764cf5c34c8c

@szaimen szaimen added this to the Nextcloud 34 milestone Mar 23, 2026
Copilot AI requested a review from szaimen March 23, 2026 11:20
Comment thread src/views/App.vue Outdated
Comment thread e2e/settings.spec.ts Outdated
… page

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/fead3c70-8ae9-4d07-9ab7-4a42f2bbeb6d

fix(e2e): use nextcloud-version-matrix to determine correct server branch

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/c1e9236f-f665-4945-980b-77e53a8f025a

refactor: use @nextcloud/e2e-test-server for Docker-based e2e testing

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/4928786f-c755-4bea-8c14-e5e1ae087ec3

fix(e2e): fix 3 failing test cases

- Fix App.vue to skip intro animation in changelog-only mode
- Fix 'can be navigated' test: NcButton primary variant has no CSS class
- Fix settings test: duplicate ID selector + add Skip button click
- Use --with-deps for Playwright install in CI

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/57316464-f4c4-4f0c-85e3-87160d3bcd03

fix(e2e): revert App.vue changes, fix tests without app-level workarounds

- Revert src/views/App.vue to original state (always start at intro animation)
- Fix 'opens when a new major version' test: click Skip to advance past intro
- Move 'About & What's new' wizard test from settings.spec.ts to firstrunwizard.spec.ts
- Remove 'About & What's new' describe block from settings.spec.ts

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/46619e35-ecf5-4089-a682-8830bd9abfe6

fix(e2e): fix setUserPreference to pass value as positional arg to occ user:setting

occ user:setting takes the value as a positional argument, not --value=VALUE.
The --value flag was silently ignored, so setUserPreference never actually set
the 'show' preference, causing the 'opens when a new major version was shipped'
test to always fail with the wizard landing on page 0 instead of the whats-new page.

Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/784a92c7-5c87-4afc-b355-9a4633cbe01d
Co-Authored-By: szaimen <42591237+szaimen@users.noreply.github.com>
@szaimen
szaimen force-pushed the copilot/setup-e2e-tests-for-firstrunwizard branch from 7744d01 to 185870a Compare March 23, 2026 17:23
@szaimen
szaimen removed their request for review March 23, 2026 17:34
…copyright year

- Remove generateSslCertificate(); add makeHttpOnly() that patches the
  container's run.sh to strip the SSL directives (a2enmod ssl, a2ensite
  default-ssl, a2enconf ssl-params, apache2ctl configtest) so Apache
  starts on plain HTTP. Import getContainerName from the package instead
  of recomputing it with basename(process.cwd()).
- Rewrite fixtures.ts following susnux's suggestion: extend the test
  base with a `user` fixture (auto: true) that creates a random user,
  logs in via the Nextcloud login form, and deletes the user after the
  test. auto:true ensures every test gets a fresh authenticated session
  without having to explicitly request the fixture.
- Remove all try/finally blocks and manual user management from the spec
  files; tests that need user.userId declare { page, user }, others only
  { page }.
- Fix copyright year 2024 → 2026 in all new/modified e2e files.
- Remove unused basename import from start-nextcloud-server.mjs.

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nextcloud/firstrunwizard/sessions/1c61fbba-9f10-42ec-9b79-764cf5c34c8c
@szaimen
szaimen requested a review from susnux March 26, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants