Refresh shell test fixtures
This commit is contained in:
@@ -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" \
|
||||
|
||||
@@ -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" \
|
||||
|
||||
@@ -39,7 +39,7 @@ assert_power_calls() {
|
||||
local expected_log="$test_tmp/$action-expected.log"
|
||||
|
||||
cat >"$expected_log" <<EOF
|
||||
systemd-run --user --collect --quiet --on-active=2s systemctl $systemctl_action --no-wall
|
||||
systemd-run --user --collect --quiet --on-active=2s --timer-property=AccuracySec=100ms systemctl $systemctl_action --no-wall
|
||||
omarchy-state clear re*-required
|
||||
omarchy-hyprland-window-close-all
|
||||
sleep 1
|
||||
|
||||
Reference in New Issue
Block a user