aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/tests/test_desktop.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testing/tests/test_desktop.py')
-rw-r--r--scripts/testing/tests/test_desktop.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/testing/tests/test_desktop.py b/scripts/testing/tests/test_desktop.py
index 53e54e1..6f79bfd 100644
--- a/scripts/testing/tests/test_desktop.py
+++ b/scripts/testing/tests/test_desktop.py
@@ -50,6 +50,19 @@ def test_hyprland_config_present(host, hyprland_installed, home, rel):
@pytest.mark.attribution("archsetup")
+def test_live_update_guard_installed(host, hyprland_installed):
+ if not hyprland_installed:
+ pytest.skip("Hyprland not installed (DESKTOP_ENV != hyprland)")
+ guard = host.file("/usr/local/bin/hypr-live-update-guard")
+ assert guard.exists, "live-update guard script missing"
+ assert guard.mode & 0o111, "live-update guard not executable"
+ hook = host.file("/etc/pacman.d/hooks/hypr-live-update-guard.hook")
+ assert hook.exists, "live-update guard pacman hook missing"
+ assert "hypr-live-update-guard" in hook.content_string, \
+ "hook does not invoke the guard script"
+
+
+@pytest.mark.attribution("archsetup")
def test_portal_settings_backend_not_disabled(host, hyprland_installed, home):
if not hyprland_installed:
pytest.skip("Hyprland not installed")
@@ -96,3 +109,32 @@ def test_autologin_configured(host):
if not conf.exists:
pytest.skip("autologin not configured (AUTOLOGIN=no, may be intentional)")
assert conf.exists
+
+
+BT_PANEL_BINS = ["bt", "bt-panel", "bt-priv", "waybar-bt"]
+
+
+@pytest.mark.attribution("archsetup")
+@pytest.mark.parametrize("name", BT_PANEL_BINS)
+def test_bt_panel_bin_stowed(host, hyprland_installed, home, name):
+ # Executable via either stow shape (per-file symlink or folded dir).
+ if not hyprland_installed:
+ pytest.skip("Hyprland not installed (DESKTOP_ENV != hyprland)")
+ path = "%s/.local/bin/%s" % (home, name)
+ assert host.file(path).exists, "%s missing from ~/.local/bin" % name
+ assert host.run("test -x %s" % path).rc == 0, "%s not executable" % name
+
+
+@pytest.mark.attribution("archsetup")
+def test_bt_panel_wired(host, hyprland_installed, home):
+ # A fresh install lands the panel reachable: bar module, keybind, css.
+ if not hyprland_installed:
+ pytest.skip("Hyprland not installed (DESKTOP_ENV != hyprland)")
+ waybar = host.file("%s/.config/waybar/config" % home)
+ assert "custom/bluetooth" in waybar.content_string, \
+ "waybar config lacks the custom/bluetooth module"
+ hyprconf = host.file("%s/.config/hypr/hyprland.conf" % home)
+ assert "bt-panel" in hyprconf.content_string, \
+ "hyprland.conf lacks the bt-panel keybind"
+ assert host.file("%s/.config/themes/dupre/panel.css" % home).exists, \
+ "shared panel css missing from the stowed theme"