Skip to content

Commit 5f656d4

Browse files
committed
test(core): migrate end-to-end test to PlayWright
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent e99befd commit 5f656d4

12 files changed

Lines changed: 414 additions & 350 deletions

.github/workflows/cypress.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ jobs:
141141
matrix:
142142
# Run multiple copies of the current job in parallel
143143
# Please increase the number or runners as your tests suite grows (0 based index for e2e tests)
144-
containers: ['setup', '0', '1', '2', '3', '4', '5', '6']
144+
containers: ['setup', '0', '1', '2', '3', '4', '5']
145145
# Hack as strategy.job-total includes the "setup" and GitHub does not allow math expressions
146146
# Always align this number with the total of e2e runners (max. index + 1)
147-
total-containers: [7]
147+
total-containers: [6]
148148

149149
services:
150150
mysql:

.github/workflows/playwright.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ jobs:
8282
strategy:
8383
fail-fast: false
8484
matrix:
85-
shardIndex: [1, 2, 3]
86-
shardTotal: [3]
85+
shardIndex: [1, 2, 3, 4]
86+
shardTotal: [4]
8787
outputs:
8888
node-version: ${{ steps.versions.outputs.node-version }}
8989
package-manager-version: ${{ steps.versions.outputs.package-manager-version }}

cypress/e2e/core/404-error.cy.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

cypress/e2e/core/header_access-levels.cy.ts

Lines changed: 0 additions & 101 deletions
This file was deleted.

cypress/e2e/core/header_app-menu.cy.ts

Lines changed: 0 additions & 91 deletions
This file was deleted.

cypress/e2e/core/header_contacts-menu.cy.ts

Lines changed: 0 additions & 135 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
import { test, expect } from '@playwright/test'
7+
8+
test.describe('404 error page', () => {
9+
test('renders 404 page with a link back to login', async ({ page }) => {
10+
// No authentication — the 404 page is shown to unauthenticated visitors.
11+
await page.goto('/doesnotexist')
12+
13+
await expect(page.getByRole('heading', { name: /Page not found/ })).toBeVisible()
14+
15+
const backLink = page.getByRole('link', { name: /Back to Nextcloud/ })
16+
await expect(backLink).toBeVisible()
17+
await backLink.click()
18+
19+
await expect(page).toHaveURL(/\/login$/)
20+
})
21+
})

0 commit comments

Comments
 (0)