ya2 · news · projects · code · about

tests for level 6 and 7
authorFlavio Calva <f.calva@gmail.com>
Mon, 30 May 2022 18:10:04 +0000 (19:10 +0100)
committerFlavio Calva <f.calva@gmail.com>
Mon, 30 May 2022 18:10:04 +0000 (19:10 +0100)
lib/tools/functional_test.py
prj.org

index eb4c06d18a35e229a43cce7e341c1f94f5a89d2b..de53cdd1bc4a88298c3fa61f943ef4de6d27a952 100644 (file)
@@ -322,30 +322,34 @@ class FunctionalTest(GameObject):
         self._event(FunctionalTest.evt_time, 'mouseclick', [(1340, 740), 'left'])  # play
         self._screenshot(16 + FunctionalTest.screenshot_time, 'win_domino_box_basketball')
         self._enforce_res(FunctionalTest.evt_time, '')
         self._event(FunctionalTest.evt_time, 'mouseclick', [(1340, 740), 'left'])  # play
         self._screenshot(16 + FunctionalTest.screenshot_time, 'win_domino_box_basketball')
         self._enforce_res(FunctionalTest.evt_time, '')
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(735, 450), 'left'])  # next
-        # self._screenshot(FunctionalTest.screenshot_time, 'scene_teeter_tooter')
-        # # scene 6
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(820, 455), 'left'])  # close instructions
-        # self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (490, 300), 'left'])  # drag a box
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(1260, 695), 'left'])  # play
-        # self._screenshot(16 + FunctionalTest.screenshot_time, 'fail_teeter_tooter')
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(640, 420), 'left'])  # replay
-        # self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (490, 150), 'left'])  # drag a box
-        # self._event(FunctionalTest.drag_time, 'mousedrag', [(515, 115), (515, 122), 'right'])  # rotate a box
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(1260, 695), 'left'])  # play
-        # self._screenshot(16 + FunctionalTest.screenshot_time, 'win_teeter_tooter')
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(690, 420), 'left'])  # next
-        # self._screenshot(FunctionalTest.screenshot_time, 'scene_teeter_domino_box_basketball')
-        # # scene 7
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(880, 455), 'left'])  # close instructions
-        # self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (155, 180), 'left'])  # drag a box
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(1260, 695), 'left'])  # play
-        # self._screenshot(16 + FunctionalTest.screenshot_time, 'fail_teeter_domino_box_basketball')
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(640, 420), 'left'])  # replay
-        # self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (170, 80), 'left'])  # drag a box
-        # self._event(FunctionalTest.drag_time, 'mousedrag', [(195, 50), (195, 80), 'right'])  # rotate a box
-        # self._event(FunctionalTest.evt_time, 'mouseclick', [(1260, 695), 'left'])  # play
-        # self._screenshot(16 + FunctionalTest.screenshot_time, 'win_teeter_domino_box_basketball')
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(735, 450), 'left'])  # next
+        self._screenshot(FunctionalTest.screenshot_time, 'scene_teeter_tooter')
+        # scene 6
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(870, 485), 'left'])  # close instructions
+        self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (490, 300), 'left'])  # drag a box
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(1340, 740), 'left'])  # play
+        self._screenshot(16 + FunctionalTest.screenshot_time, 'fail_teeter_tooter')
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(680, 450), 'left'])  # replay
+        self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (490, 150), 'left'])  # drag a box
+        self._event(FunctionalTest.drag_time, 'mousedrag', [(515, 115), (515, 122), 'right'])  # rotate a box
+        self._enforce_res(FunctionalTest.evt_time, 'win')
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(1340, 740), 'left'])  # play
+        self._screenshot(16 + FunctionalTest.screenshot_time, 'win_teeter_tooter')
+        self._enforce_res(FunctionalTest.evt_time, '')
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(735, 450), 'left'])  # next
+        self._screenshot(FunctionalTest.screenshot_time, 'scene_teeter_domino_box_basketball')
+        # scene 7
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(930, 485), 'left'])  # close instructions
+        self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (155, 180), 'left'])  # drag a box
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(1340, 740), 'left'])  # play
+        self._screenshot(16 + FunctionalTest.screenshot_time, 'fail_teeter_domino_box_basketball')
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(680, 450), 'left'])  # replay
+        self._event(FunctionalTest.drag_time, 'mousedrag', [(60, 60), (170, 80), 'left'])  # drag a box
+        self._event(FunctionalTest.drag_time, 'mousedrag', [(195, 50), (195, 80), 'right'])  # rotate a box
+        self._enforce_res(FunctionalTest.evt_time, 'win')
+        self._event(FunctionalTest.evt_time, 'mouseclick', [(1340, 740), 'left'])  # play
+        self._screenshot(16 + FunctionalTest.screenshot_time, 'win_teeter_domino_box_basketball')
+        self._enforce_res(FunctionalTest.evt_time, '')
         self._event(FunctionalTest.evt_time, 'mouseclick', [(630, 450), 'left'])  # home
         self._screenshot(FunctionalTest.screenshot_time, 'home_from_play')
 
         self._event(FunctionalTest.evt_time, 'mouseclick', [(630, 450), 'left'])  # home
         self._screenshot(FunctionalTest.screenshot_time, 'home_from_play')
 
diff --git a/prj.org b/prj.org
index e15761237942308af65f31fde0f1240fb2fe3972..5b24d461cb0849bffc64944e37262bbbcdc0a808 100644 (file)
--- a/prj.org
+++ b/prj.org
@@ -3,8 +3,7 @@
 #+CATEGORY: pmachines
 #+TAGS: bug(b) calendar(c) waiting(w)
 
 #+CATEGORY: pmachines
 #+TAGS: bug(b) calendar(c) waiting(w)
 
-* RED restore tests for level 6 and 7
-* READY move functional tests in tests from lib.engine
+* RED move functional tests in tests from lib.engine
 * READY rename lib to ya2
 * READY refactoring
 * BACKLOG improve level domino box basketball: it can be solved trivially
 * READY rename lib to ya2
 * READY refactoring
 * BACKLOG improve level domino box basketball: it can be solved trivially