diff --git a/.github/workflows/desktop-linux.yml b/.github/workflows/desktop-linux.yml index fa1f7df16d..d794a0c07a 100644 --- a/.github/workflows/desktop-linux.yml +++ b/.github/workflows/desktop-linux.yml @@ -205,7 +205,7 @@ jobs: dpkg-query -W xvfb xdotool openbox imagemagick tesseract-ocr - name: Run smoke test - run: scripts/ci/desktop-linux/smoke-test.sh "$RUNNER_TEMP/release/app/opt/simplex" "$RUNNER_TEMP/smoke-test" + run: scripts/ci/desktop-linux/smoke-test.sh "$RUNNER_TEMP/release/app/opt/simplex" "$RUNNER_TEMP/smoke-test" onboarding - name: Upload smoke test results if: ${{ !cancelled() }} diff --git a/scripts/ci/desktop-linux/smoke-test.sh b/scripts/ci/desktop-linux/smoke-test.sh index cee0a871f3..1708958ca8 100755 --- a/scripts/ci/desktop-linux/smoke-test.sh +++ b/scripts/ci/desktop-linux/smoke-test.sh @@ -1,8 +1,9 @@ #!/bin/bash # Starts the desktop app on a virtual display and runs the scripted UI cases with the ui helper: -# onboarding to the chat list, and typing in the chat list search field. -# Usage: scripts/ci/desktop-linux/smoke-test.sh +# onboarding to the chat list, and typing in the chat list search field, which offers the directory. +# Usage: scripts/ci/desktop-linux/smoke-test.sh [onboarding] +# With "onboarding" it stops at the chat list: releases before directory search show no search field without chats. # Each step saves a numbered screenshot and the text read from it to the output dir, prints the text to the log, # and adds a line to steps.log there. The app keeps running for later steps of the job, which get UI_OUT. @@ -10,6 +11,7 @@ set -euo pipefail app_dir=$1 export UI_OUT=$2 +cases=${3:-all} search_text="ci smoke" ui=$(dirname "$0")/ui mkdir -p "$UI_OUT" @@ -56,18 +58,18 @@ trap finish EXIT "$ui" shot network-commitments "$ui" click-text "Accept" -"$ui" wait "Search or paste SimpleX link" 60 +"$ui" wait "Talk to someone" 60 sleep 3 "$ui" shot chat-list +if [ "$cases" = onboarding ]; then + echo "smoke test passed: onboarding reached the chat list" + exit 0 +fi +# typed text that is not a SimpleX link offers the directory "$ui" click-text "Search or paste SimpleX link" "$ui" type "$search_text" "$ui" wait "$search_text" 15 -# builds with directory search offer it for typed text that is not a SimpleX link; releases before it don't -if "$ui" wait "Search in Directory" 10; then - directory_row=shown -else - directory_row="not shown" -fi +"$ui" wait "Search in Directory" 15 "$ui" shot search-typed -echo "smoke test passed: onboarding reached the chat list, its search field shows \"$search_text\", and the \"Search in Directory\" row is $directory_row" +echo "smoke test passed: onboarding reached the chat list, and its search field shows \"$search_text\" and the \"Search in Directory\" row"