Give KO reactions an animated arcade overlay
This commit is contained in:
@@ -75,6 +75,24 @@ def test_reactions_work_with_chat_popout_focused(room, qtbot):
|
||||
popout.close()
|
||||
|
||||
|
||||
def test_arcade_ko_covers_video_then_restores_strip(room, qtbot):
|
||||
room.activateWindow()
|
||||
qtbot.wait(30)
|
||||
room.handle_fight_reaction({'kind': 'ko', 'position': 0})
|
||||
overlay = room.ringside_strip
|
||||
assert overlay.size() == room.video_frame.size()
|
||||
assert overlay.panel.isHidden()
|
||||
assert not overlay.ko_canvas.isHidden()
|
||||
assert overlay.ko_animation.state() == overlay.ko_animation.State.Running
|
||||
room.handle_fight_reaction({'kind': 'bell', 'position': 0})
|
||||
assert overlay.ko_canvas.isHidden()
|
||||
assert not overlay.panel.isHidden()
|
||||
assert overlay.width() <= 540
|
||||
assert overlay.height() < room.video_frame.height()
|
||||
room.cleanup()
|
||||
assert overlay.ko_animation.state() == overlay.ko_animation.State.Stopped
|
||||
|
||||
|
||||
def test_sound_is_enabled_by_default_and_background_effects_are_suppressed(room, qtbot, monkeypatch):
|
||||
play = Mock()
|
||||
monkeypatch.setattr(room, '_play_reaction_sound', play)
|
||||
|
||||
Reference in New Issue
Block a user