| | |
| | | # shellcheck source=build-output-paths.sh |
| | | source "$SCRIPT_DIR/build-output-paths.sh" |
| | | APP="$BUILD_CURRENT_APP" |
| | | DOMAIN="com.ar.Aligner" |
| | | THEME_KEY="com.ar.Aligner.preferences.appearance.theme" |
| | | LAYOUT_REPORT="$BUILD_REPORT_ROOT/round01-horizontal-waterfall-layout-report.json" |
| | | KEYBOARD_REPORT="$BUILD_REPORT_ROOT/round01-horizontal-waterfall-keyboard-report.json" |
| | | APP_ENTER_REPORT="$BUILD_REPORT_ROOT/round01-horizontal-waterfall-app-enter-report.json" |
| | |
| | | WINDOW_SHORTCUT_TARGET_WINDOW_INDEX="${ALIGNER_ROUND1_HORIZONTAL_WATERFALL_WINDOW_SHORTCUT_TARGET_WINDOW_INDEX:-5}" |
| | | ARROW_WRAP_KEY_SEQUENCE="${ALIGNER_ROUND1_HORIZONTAL_WATERFALL_ARROW_WRAP_KEY_SEQUENCE:-app:1,down,up,left,down,enter}" |
| | | REPORT_WAIT="${ALIGNER_ROUND1_HORIZONTAL_WATERFALL_REPORT_WAIT:-6.0}" |
| | | OLD_THEME_SET=0 |
| | | OLD_THEME="" |
| | | |
| | | fail() { |
| | | echo "Round01.1 horizontal Waterfall fixture QA failed: $*" >&2 |
| | |
| | | done |
| | | |
| | | fail "current Aligner app did not exit before QA" |
| | | } |
| | | |
| | | preserve_user_theme() { |
| | | if OLD_THEME="$(/usr/bin/defaults read "$DOMAIN" "$THEME_KEY" 2>/dev/null)"; then |
| | | OLD_THEME_SET=1 |
| | | else |
| | | OLD_THEME_SET=0 |
| | | OLD_THEME="" |
| | | fi |
| | | } |
| | | |
| | | restore_user_theme() { |
| | | if [ "$OLD_THEME_SET" -eq 1 ]; then |
| | | /usr/bin/defaults write "$DOMAIN" "$THEME_KEY" -string "$OLD_THEME" |
| | | else |
| | | /usr/bin/defaults delete "$DOMAIN" "$THEME_KEY" >/dev/null 2>&1 || true |
| | | fi |
| | | } |
| | | |
| | | wait_for_loaded_report() { |
| | |
| | | wait "$APP_PID" 2>/dev/null || true |
| | | fi |
| | | stop_current_aligner |
| | | restore_user_theme |
| | | } |
| | | trap cleanup EXIT |
| | | preserve_user_theme |
| | | /usr/bin/defaults write "$DOMAIN" "$THEME_KEY" -string "light" |
| | | |
| | | run_fixture "$LAYOUT_REPORT" --round01-debug-mouse-sequence="hover-app:$HOVER_APP_INDEX" |
| | | wait_for_loaded_report "$LAYOUT_REPORT" |
| | |
| | | |
| | | trap - EXIT |
| | | stop_current_aligner |
| | | restore_user_theme |
| | | echo "Round01.1 horizontal Waterfall fixture QA passed" |