diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 048b287..fd7de13 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -59,3 +59,16 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Run UI tests + run: npm run test:ui + env: + BASE_URL: https://localhost:6984/prototype/_design/prototype + + - name: Upload Playwright report and traces for trace.playwright.dev + uses: actions/upload-artifact@v5 + if: ${{ !cancelled() }} # Upload even if the previous step failed + with: + name: test-results # Name of the artifact + path: FieldDB/test-e2e/test-results/ # Path to the directory containing reports and traces + retention-days: 30 diff --git a/package.json b/package.json index 0222ac6..3f41eaa 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "test:deprecated": "DEBUG=${DEBUG:-lib:user} REPLAY=bloody NODE_TLS_REJECT_UNAUTHORIZED=0 nyc mocha --timeout 25000 test/routes/deprecated-spec.js", "test:fielddb": "NODE_ENV=localhost jasmine-node node_modules/fielddb/tests", "test:production": "ls config/production.js", + "test:ui": "git clone https://github.com/FieldDB/FieldDB.git && cd FieldDB/test-e2e && npm install && npx playwright install firefox chromium && BASE_URL='https://localhost:6984' BASE_PATH='/prototype/_design/prototype' npm run test", "watch": "nodemon ./bin/www.js" }, "license": "Apache-2.0"