mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
feat: add persistent per-game compatibility profiles (#449)
* feat(profiles): add persistent per-game compatibility profiles * fix(profiles): show Windows component overrides Include per-game Windows component selections in the resolved profile summary so the session overlay marks those games as custom and shows the selected components. * fix(session): detect Proton games across runtime paths * fix(profiles): select the active Gamescope game * fix(profiles): improve per-game reset feedback * fix(profiles): align session components with game overrides * fix(session): prefer selected Steam game during refresh * fix(session): resume profile following when reopening games * chore: keep local dev testing outside the repository * test(session): remove local dev package path * fix(session): preserve profiles when refresh fails * fix(session): reject empty game profile reset scope * perf(session): cache drawer inventory by refresh revision * fix(profiles): align game presets and profile reset behavior * fix(profiles): preserve originals and normalize shortcut ids * fix(profiles): keep editor scope stable after rebase * fix(tests): host Compose tests in both build variants * fix(profiles): recover interrupted component selection saves --------- Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
This commit is contained in:
1 parent
78fcb60fd5
commit
435beb7f19
46 files changed
+3501
-150
No files matched your search
@@ -208,6 +208,22 @@ class AgentTest(unittest.TestCase):
|
||||
missing = self.ask({"kind": "cdp", "expression": "1", "target": "Nope"})
|
||||
self.assertEqual("NO_TARGET", missing["error"]["code"])
|
||||
|
||||
def test_steam_selection(self):
|
||||
with patch.object(agent, "cdp_eval", return_value={"value": "3180310"}) as evaluate:
|
||||
answer = self.ask({"kind": "steam-selection"})
|
||||
self.assertEqual(3180310, answer["appId"])
|
||||
self.assertIn("document.activeElement", evaluate.call_args.args[1])
|
||||
self.assertEqual("Steam Big Picture Mode", evaluate.call_args.kwargs["target"])
|
||||
|
||||
def test_steam_selection_allows_no_highlight(self):
|
||||
with patch.object(agent, "cdp_eval", return_value={"value": None}):
|
||||
self.assertIsNone(self.ask({"kind": "steam-selection"})["appId"])
|
||||
|
||||
def test_steam_selection_rejects_invalid_app_id(self):
|
||||
with patch.object(agent, "cdp_eval", return_value={"value": "4294967296"}):
|
||||
answer = self.ask({"kind": "steam-selection"})
|
||||
self.assertEqual("INVALID_SELECTION", answer["error"]["code"])
|
||||
|
||||
def test_cdp_exception(self):
|
||||
server = FakeDevTools({"result": {"result": {"type": "object"}, "exceptionDetails": {
|
||||
"text": "Uncaught", "exception": {"description": "ReferenceError: SteamClient is not defined"}}}})
|
||||
|
||||
Reference in new issue
Block a user