diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 11:32:06 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 11:32:06 +0100 |
| commit | 24ffea5a7f25b179a8b2fb7f3605a4977c854069 (patch) | |
| tree | 537d0d784325f7704cccac7e83113b8b57c1bd8b /tests | |
| parent | b5b56e4c1854314fb519d13af9dda80a10ee0b8a (diff) | |
| download | deck-it-24ffea5a7f25b179a8b2fb7f3605a4977c854069.tar.gz deck-it-24ffea5a7f25b179a8b2fb7f3605a4977c854069.zip | |
feat(obs): pause, Studio Mode, and working transition tiles
The transition tiles listed transition kinds (fade_transition), which
SetCurrentSceneTransition rejects and which never matched the current
one, so every tile looked inactive. Read GetSceneTransitionList instead.
Add a Pause/Resume button, shown while recording, and a Studio toggle.
With Studio Mode on, a scene tap cues it in Preview (dashed tile) and the
Transition button, shown only then, sends it to Program.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_obs.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/test_obs.py b/tests/test_obs.py index 48a0274..0c9a1a6 100644 --- a/tests/test_obs.py +++ b/tests/test_obs.py @@ -49,6 +49,35 @@ class Actions(unittest.TestCase): self.m.actions["record"]({"on": False}) self.assertEqual(Fake.last[0], "StopRecord") + def test_scene_cues_preview_in_studio_mode(self): + class Studio(Fake): + def request(self, kind, data=None): + if kind == "GetStudioModeEnabled": + return {"studioModeEnabled": True} + return super().request(kind, data) + obs.make({"client": Studio()}).actions["scene"]({"scene": "Live"}) + self.assertEqual(Fake.last, ("SetCurrentPreviewScene", {"sceneName": "Live"})) + self.m.actions["studio"]({"on": True}) + self.assertEqual(Fake.last, ("SetStudioModeEnabled", {"studioModeEnabled": True})) + + def test_pause_and_resume(self): + self.m.actions["pause"]({"on": True}) + self.assertEqual(Fake.last[0], "PauseRecord") + self.m.actions["pause"]({"on": False}) + self.assertEqual(Fake.last[0], "ResumeRecord") + + def test_transitions_are_names(self): + class Obs(Fake): + def request(self, kind, data=None): + if kind == "GetSceneTransitionList": + return {"currentSceneTransitionName": "Fade", + "transitions": [{"transitionName": "Cut", "transitionKind": "cut_transition"}, + {"transitionName": "Fade", "transitionKind": "fade_transition"}]} + return {} + st = obs.make({"client": Obs()}).state() + self.assertEqual(st["transitions"], ["Cut", "Fade"]) + self.assertEqual(st["transition"], "Fade") + def test_mute_and_source(self): self.m.actions["mute"]({"input": "Mic", "muted": True}) self.assertEqual(Fake.last[0], "SetInputMute") |
