From 843f29106c6f91bad00ea9dc914148d48a44c464 Mon Sep 17 00:00:00 2001 From: MatMath Date: Fri, 26 Dec 2025 10:13:00 -0500 Subject: [PATCH 1/3] Add UI test step --- .github/workflows/node.js.yml | 13 +++++++++++++ package.json | 1 + 2 files changed, 14 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 048b287..07117fa 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" From f4fdc89b6c078f03aff843a6bc28ae3a98c30103 Mon Sep 17 00:00:00 2001 From: cesine Date: Sat, 27 Dec 2025 09:25:30 -0500 Subject: [PATCH 2/3] add BASE_PATH --- .github/workflows/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 07117fa..a2deb4a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -63,7 +63,8 @@ jobs: - name: Run UI tests run: npm run test:ui env: - BASE_URL: https://localhost:6984/prototype/_design/prototype + 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 From e15661111419ea4a94004d8709eb60d3b580140b Mon Sep 17 00:00:00 2001 From: cesine Date: Sat, 27 Dec 2025 09:43:12 -0500 Subject: [PATCH 3/3] limit tests to one while we get them working --- .github/workflows/node.js.yml | 1 + .gitignore | 1 + package.json | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a2deb4a..e404d3f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -62,6 +62,7 @@ jobs: - name: Run UI tests run: npm run test:ui + timeout-minutes: 5 env: BASE_URL: https://localhost:6984 BASE_PATH: /prototype/_design/prototype 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 3f41eaa..406e55c 100644 --- a/package.json +++ b/package.json @@ -74,7 +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", + "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"