diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 048b287..e404d3f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -59,3 +59,18 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Run UI tests + run: npm run test:ui + timeout-minutes: 5 + env: + BASE_URL: https://localhost:6984 + BASE_PATH: /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/.gitignore b/.gitignore index e7bd3a6..ce62c34 100644 --- a/.gitignore +++ b/.gitignore @@ -142,3 +142,4 @@ node_modules .DS_Store ~* *.swp +FieldDB diff --git a/package.json b/package.json index 0222ac6..406e55c 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 chromium && BASE_URL=${BASE_URL:-https://localhost:6984} BASE_PATH=${BASE_PATH:-/prototypedev/_design/prototype} DEBUG=${DEBUG:-none} npm run test -- --retries=0 --project=Chromium register", "watch": "nodemon ./bin/www.js" }, "license": "Apache-2.0"