Skip to content

Commit 0ad4c45

Browse files
Copilotskjnldsv
andauthored
feat: add Playwright e2e tests for login page background
Agent-Logs-Url: https://github.com/nextcloud/unsplash/sessions/e614a94e-a2a4-4aa3-bbc2-6cac574430f9 Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com>
1 parent 96d85da commit 0ad4c45

9 files changed

Lines changed: 1689 additions & 1 deletion

File tree

.github/workflows/playwright.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Playwright Tests
10+
11+
on:
12+
pull_request:
13+
branches:
14+
- main
15+
- stable*
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
test:
22+
timeout-minutes: 60
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout app
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
30+
31+
- name: Read package.json node and npm engines version
32+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
33+
id: versions
34+
with:
35+
fallbackNode: '^20'
36+
fallbackNpm: '^10'
37+
38+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
39+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
40+
with:
41+
node-version: ${{ steps.versions.outputs.nodeVersion }}
42+
43+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
44+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
45+
46+
- name: Install node dependencies
47+
run: npm ci
48+
49+
- name: Install Playwright Browsers
50+
run: npx playwright install chromium --only-shell
51+
52+
- name: Run Playwright tests
53+
run: npx playwright test
54+
55+
- name: Upload test results
56+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
57+
if: always()
58+
with:
59+
name: playwright-report
60+
path: test-results/
61+
retention-days: 30

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build
22
node_modules
3-
build
43
unsplash
4+
/test-results/
5+
/playwright-report/

.nextcloudignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@
1010
krankerl.toml
1111
Makefile
1212
screenshots
13+
node_modules
14+
package.json
15+
package-lock.json
16+
playwright
17+
playwright.config.ts
18+
test-results
19+
playwright-report

0 commit comments

Comments
 (0)