diff --git a/tests/e2e/test_framey.py b/tests/e2e/test_framey.py index 1731e58..2ca458b 100644 --- a/tests/e2e/test_framey.py +++ b/tests/e2e/test_framey.py @@ -9,7 +9,7 @@ import subprocess import threading import zipfile -from harness import FrameTestCase, ROOT, Server, api, finished, ok, require, ssh +from harness import FrameTestCase, ROOT, Server, api, finished, ok, require, reset, ssh import frame_decky_store from framey_official import LEGACY_PLUGINS, PLUGINS as PANEL_PLUGINS, archive as official_archive @@ -100,6 +100,13 @@ u=h/'.config/systemd/user/frame-control-decky.service'; u.parent.mkdir(parents=T input=source, capture_output=True, timeout=20) self.assertEqual(copy.returncode, 0, copy.stderr) + def test_fake_frame_reset_clears_managed_decky_state(self): + ssh('mkdir -p ~/.local/share/frame-control/decky/plugins/test-leftover ~/.config/systemd/user') + ssh('touch ~/.config/systemd/user/frame-control-decky.service') + reset() + self.assertEqual(ssh('test -e ~/.local/share/frame-control/decky && echo yes || echo no').strip(), 'no') + self.assertEqual(ssh('test -e ~/.config/systemd/user/frame-control-decky.service && echo yes || echo no').strip(), 'no') + def test_store_install_update_remove_and_guards(self): self.backend() status, _, _ = api('GET', '/api/decky/store', headers={'X-Frame-UI':''}) diff --git a/tests/fakeframe/rootfs/usr/local/lib/fakeframe/init.py b/tests/fakeframe/rootfs/usr/local/lib/fakeframe/init.py index d2104b2..b2e9cbb 100755 --- a/tests/fakeframe/rootfs/usr/local/lib/fakeframe/init.py +++ b/tests/fakeframe/rootfs/usr/local/lib/fakeframe/init.py @@ -304,6 +304,8 @@ def clean_home(): pass for pattern in (fs.DEVKIT_GAMES + '/*', fs.DEVKIT_GAMES + '/.[!.]*', HOME + '/devkit-utils', HOME + '/.devkit-utils.frame-control', HOME + '/Applications', HOME + '/Downloads/*', + HOME + '/.local/share/frame-control', + HOME + '/.config/systemd/user/frame-control-decky.service', fs.STEAM_ROOT + '/steamapps/compatdata', fs.STEAM_ROOT + '/steamapps/shadercache', fs.STEAM_ROOT + '/logs', '/var/log/fakeframe/devkit-*', '/var/log/fakeframe/shortcut-*'): for p in glob.glob(pattern):