diff --git a/.github/workflows/test-client.yml b/.github/workflows/test-client.yml
index 6566d047a5a..898a1f5734e 100644
--- a/.github/workflows/test-client.yml
+++ b/.github/workflows/test-client.yml
@@ -224,20 +224,7 @@ jobs:
shell: bash
run: |
/usr/bin/google-chrome --headless --virtual-time-budget=120000 --dump-dom http://localhost:8080 > chrome-results.html
-
- # Handle tests results
- if grep -q 'title="FAILED"' chrome-results.html; then
- failed_info=$(grep -oE '
([^<]+)' chrome-results.html | awk 'NR==1 {print substr($0, index($0,$4))}')
- echo $failed_info
- exit 1
- elif grep -q 'title="OK"' chrome-results.html; then
- grep -oE '
([^<]+)' chrome-results.html | awk '{print substr($0, index($0,$4))}'
- echo "Success: all tests passed."
- else
- cat chrome-results.html
- echo "No test results found. Check chrome-results.html output."
- exit 1
- fi
+ ./analyze-headless-tests-results.sh chrome-results.html
- name: Run Firefox headless
working-directory: mithril-client-wasm