From 605d7cc1e2c33a2f40eaf27ff023b0b8ac4ed87d Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 10 Sep 2025 00:28:58 +0000 Subject: [PATCH] fix: correct JSON reporter syntax for Playwright tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use proper syntax for JSON reporter with outputFile option - Run separate commands for HTML and JSON report merging - Specify output path directly in reporter configuration - Ensures report.json is created in playwright-report directory This fixes the "No such file or directory" error when trying to move report.json file, as it wasn't being created in the first place. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/test-ui.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml index ae6552bfa..7920e56d8 100644 --- a/.github/workflows/test-ui.yaml +++ b/.github/workflows/test-ui.yaml @@ -229,10 +229,11 @@ jobs: - name: Run Playwright tests (${{ matrix.browser }}) id: playwright - run: npx playwright test --project=${{ matrix.browser }} --reporter=html --reporter=json + run: | + npx playwright test --project=${{ matrix.browser }} \ + --reporter=html \ + --reporter='json:{"outputFile":"playwright-report/report.json"}' working-directory: ComfyUI_frontend - env: - PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/report.json - uses: actions/upload-artifact@v4 if: always() @@ -278,12 +279,10 @@ jobs: - name: Merge into HTML Report run: | - npx playwright merge-reports --reporter html --reporter json ./all-blob-reports - # Move JSON report to the HTML report directory for easier access - [ -f "report.json" ] && mv report.json playwright-report/report.json + # Generate both HTML and JSON reports + npx playwright merge-reports --reporter html ./all-blob-reports + npx playwright merge-reports --reporter 'json:{"outputFile":"playwright-report/report.json"}' ./all-blob-reports working-directory: ComfyUI_frontend - env: - PLAYWRIGHT_JSON_OUTPUT_NAME: report.json - name: Upload HTML report uses: actions/upload-artifact@v4