From 36173c8b9cb8aa8a1c8e38fc01b16624f3ca1e64 Mon Sep 17 00:00:00 2001 From: Benjamin Graham Date: Mon, 1 Jun 2020 17:08:29 -0400 Subject: [PATCH] Added test for zooming while playing at 16x Added test `testZoomSpeedControls` --- src/recordings.jsx | 2 +- test/check-application | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/recordings.jsx b/src/recordings.jsx index 3f78206..ae10345 100644 --- a/src/recordings.jsx +++ b/src/recordings.jsx @@ -940,7 +940,7 @@ class View extends React.Component {
-
diff --git a/test/check-application b/test/check-application index 37a7b9c..3c507b4 100755 --- a/test/check-application +++ b/test/check-application @@ -261,6 +261,27 @@ class TestApplication(MachineCase): # check for extra log entries b.wait_present(".cockpit-log-message:contains('authentication failure')") + def testZoomSpeedControls(self): + default_scale_sel = '.console-ct[style^="transform: scale(1)"]' + play_scale_sel = '.console-ct[style^="transform: scale(0.4"]' + zoom_one_scale_sel = '.console-ct[style^="transform: scale(0.5"]' + b, _ = self._login() + self._sel_rec() + # set speed x16 and begin playing, expecting a size adjustment + for _ in range(4): + b.click("#player-speed-up") + b.wait_present(default_scale_sel) + b.click("#player-play-pause") + b.wait_present(play_scale_sel) + # wait until sleeping and zoom in + b.wait_in_text(self._term_line(8), "sleep") + b.click("#player-zoom-in") + b.wait_present(zoom_one_scale_sel) + # zoom out while typing fast + b.wait_in_text(self._term_line(9), "localhost") + b.click("#player-zoom-out") + b.wait_present(play_scale_sel) + if __name__ == "__main__": test_main()