@@ -241,6 +241,15 @@ jobs:
241241 fi
242242 }
243243
244+ # Get skipped tests first from test results
245+ if [ -f "playwright-artifacts/test-results.json" ]; then
246+ while IFS= read -r test; do
247+ if [[ -n "$test" ]]; then
248+ skipped_tests+=("$test")
249+ fi
250+ done < <(jq -r '.suites[].specs[] | select(.ok == false and .skipped == true) | .title' playwright-artifacts/test-results.json)
251+ fi
252+
244253 # Get list of changed test files
245254 for file in $(git diff --name-only main...HEAD | grep -E '^tests/suites/.*\.(spec|test)\.(ts|tsx|js|jsx)$'); do
246255 # Get test names from both versions
@@ -258,18 +267,14 @@ jobs:
258267
259268 while IFS= read -r test; do
260269 if [[ -n "$test" ]]; then
261- if ! echo "$current_tests" | grep -Fxq "$test"; then
270+ # Only mark as deleted if it's not in current tests AND not in skipped tests
271+ if ! echo "$current_tests" | grep -Fxq "$test" && ! printf '%s\n' "${skipped_tests[@]}" | grep -Fxq "$test"; then
262272 deleted_tests+=("$test")
263273 fi
264274 fi
265275 done <<< "$base_tests"
266276 done
267277
268- # Get skipped tests from test results
269- if [ -f "playwright-artifacts/test-results.json" ]; then
270- skipped_tests=($(jq -r '.suites[].specs[] | select(.ok == false and .skipped == true) | .title' playwright-artifacts/test-results.json))
271- fi
272-
273278 # Create JSON output
274279 echo "added_tests=$(IFS=,; echo "${added_tests[*]}")" >> $GITHUB_OUTPUT
275280 echo "deleted_tests=$(IFS=,; echo "${deleted_tests[*]}")" >> $GITHUB_OUTPUT
@@ -345,10 +350,13 @@ jobs:
345350 |:-----:|:------:|:------:|:-----:|:-------:|
346351 | ${testResults.total} | ${testResults.passed} | ${testResults.failed} | ${testResults.flaky} | ${changesText} |
347352
348- ### Test Changes Details
353+ <details>
354+ <summary>📋 Test Changes Details</summary>
355+
349356 ${addedCount > 0 ? `\n✨ **Added Tests (${addedCount}):**\n${addedTests.map(t => `- ${t}`).join('\n')}` : ''}
350357 ${deletedCount > 0 ? `\n🗑️ **Deleted Tests (${deletedCount}):**\n${deletedTests.map(t => `- ${t}`).join('\n')}` : ''}
351358 ${skippedCount > 0 ? `\n⏭️ **Skipped Tests (${skippedCount}):**\n${skippedTests.map(t => `- ${t}`).join('\n')}` : ''}
359+ </details>
352360
353361 ### Bundle Size: ${bundleStatus}
354362 Current: ${formatSize(currentSize)} | Main: ${formatSize(mainSize)}
0 commit comments