From dfd60f8e18603ebff9567f5c90810f8775941a48 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sun, 14 Dec 2025 14:05:20 -0500 Subject: [PATCH 1/6] Add UI test step --- .github/workflows/node.js.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 048b287..a1e97f8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -59,3 +59,8 @@ 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 From bfb23f3e74a0edc77258697ea993aaeacf1c1fa3 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sun, 14 Dec 2025 14:10:29 -0500 Subject: [PATCH 2/6] add UI test script --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 0222ac6..4bc3f47 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 && npm run test", "watch": "nodemon ./bin/www.js" }, "license": "Apache-2.0" From a7ef7837f6446d66be6b30c97b25f6a179f42b38 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sun, 14 Dec 2025 14:19:30 -0500 Subject: [PATCH 3/6] install playwright browsers --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4bc3f47..e29fa8d 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 && npm run test", + "test:ui": "git clone https://github.com/FieldDB/FieldDB.git && cd FieldDB/test-e2e && npm install && npx playwright install firefox chromium && npm run test", "watch": "nodemon ./bin/www.js" }, "license": "Apache-2.0" From 7b15f7912397ac53c8e1952abc4c2dd7a3d2a6b0 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sun, 14 Dec 2025 14:21:45 -0500 Subject: [PATCH 4/6] upload playwright report --- .github/workflows/node.js.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a1e97f8..e1cdf7f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -64,3 +64,11 @@ jobs: 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 \ No newline at end of file From 6053ec9c7e02104461116885fbc258c31bb11f74 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sun, 14 Dec 2025 14:46:42 -0500 Subject: [PATCH 5/6] add base_path to tests --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e29fa8d..3f41eaa 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 && npm run test", + "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 e94643b54ef13a3158cdc5e2020fea4304e3b9d0 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sun, 14 Dec 2025 14:47:15 -0500 Subject: [PATCH 6/6] fix paste --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e1cdf7f..fd7de13 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -71,4 +71,4 @@ jobs: 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 \ No newline at end of file + retention-days: 30