From 7361b48461b6899e7b63bb2caa7ba0e03b410740 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 22 Jul 2026 15:31:01 -0700 Subject: [PATCH] Refresh shell test fixtures --- test/shell.d/runtime-smoke-test.sh | 17 ++++++++++++++--- test/shell.d/screenshot-sanity-test.sh | 17 ++++++++++++++--- test/shell.d/system-power-test.sh | 2 +- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/test/shell.d/runtime-smoke-test.sh b/test/shell.d/runtime-smoke-test.sh index e474c3f1..c9ed6432 100755 --- a/test/shell.d/runtime-smoke-test.sh +++ b/test/shell.d/runtime-smoke-test.sh @@ -60,11 +60,22 @@ exit 0 SH chmod +x "$stub_bin/omarchy-update-available" -cat >"$test_root/shell/plugins/panels/weather/status.sh" <<'SH' +cat >"$stub_bin/curl" <<'SH' #!/bin/bash -printf '{"text":"72F","class":"sunny"}\n' + +case "${*: -1}" in + *'?format=j1') + printf '{"current_condition":[{"weatherCode":"113","temp_F":"72"}]}\n' + ;; + *'?format=%l') + printf 'Test City, Test Region\n' + ;; + *) + exit 1 + ;; +esac SH -chmod +x "$test_root/shell/plugins/panels/weather/status.sh" +chmod +x "$stub_bin/curl" OMARCHY_PATH="$test_root" \ HOME="$test_home" \ diff --git a/test/shell.d/screenshot-sanity-test.sh b/test/shell.d/screenshot-sanity-test.sh index a905a7b4..4337d556 100755 --- a/test/shell.d/screenshot-sanity-test.sh +++ b/test/shell.d/screenshot-sanity-test.sh @@ -70,11 +70,22 @@ exit 0 SH chmod +x "$stub_bin/omarchy-update-available" -cat >"$test_root/shell/plugins/panels/weather/status.sh" <<'SH' +cat >"$stub_bin/curl" <<'SH' #!/bin/bash -printf '{"text":"72F","class":"sunny"}\n' + +case "${*: -1}" in + *'?format=j1') + printf '{"current_condition":[{"weatherCode":"113","temp_F":"72"}]}\n' + ;; + *'?format=%l') + printf 'Test City, Test Region\n' + ;; + *) + exit 1 + ;; +esac SH -chmod +x "$test_root/shell/plugins/panels/weather/status.sh" +chmod +x "$stub_bin/curl" OMARCHY_PATH="$test_root" \ HOME="$test_home" \ diff --git a/test/shell.d/system-power-test.sh b/test/shell.d/system-power-test.sh index cc90ee9b..2c65b5e1 100755 --- a/test/shell.d/system-power-test.sh +++ b/test/shell.d/system-power-test.sh @@ -39,7 +39,7 @@ assert_power_calls() { local expected_log="$test_tmp/$action-expected.log" cat >"$expected_log" <