From 28ebc17785a8cca52f289b74261d1f310fd35904 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 10 Sep 2026 07:08:19 -0400 Subject: fix: detect wrapped Flatpak shortcuts --- tests/test_steam_service.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'tests') diff --git a/tests/test_steam_service.py b/tests/test_steam_service.py index 849bb01..9924186 100644 --- a/tests/test_steam_service.py +++ b/tests/test_steam_service.py @@ -51,6 +51,24 @@ class SteamTransportTests(unittest.TestCase): ), {"kind": "host"}, ) + self.assertEqual( + classify_shortcut_transport( + "~/.lsfg", + "run --branch=stable --arch=x86_64 com.example.PCSX2", + ), + {"kind": "flatpak", "flatpakAppId": "com.example.PCSX2"}, + ) + self.assertEqual( + classify_shortcut_transport( + "/home/deck/.lsfg", + "run com.example.PCSX2", + ), + {"kind": "flatpak", "flatpakAppId": "com.example.PCSX2"}, + ) + self.assertEqual( + classify_shortcut_transport("~/.lsfg", "--profile high"), + {"kind": "host"}, + ) def test_shortcut_data_preserves_transport_inputs(self): game = SteamService._shortcut_game( @@ -72,6 +90,21 @@ class SteamTransportTests(unittest.TestCase): self.assertEqual(game["arguments"], "run net.pcsx2.PCSX2 --fullscreen") self.assertEqual(game["startDir"], "/home/deck/Games") + def test_wrapped_flatpak_shortcut_remains_a_flatpak_target(self): + game = SteamService._shortcut_game( + { + "appid": 987654, + "AppName": "Wrapped Flatpak", + "Exe": "~/.lsfg", + "LaunchOptions": "run --branch=stable --arch=x86_64 com.example.Game", + } + ) + + self.assertEqual(game["transport"], { + "kind": "flatpak", + "flatpakAppId": "com.example.Game", + }) + if __name__ == "__main__": unittest.main() -- cgit v1.2.3