summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-09-22 11:39:34 -0500
committerBryan Bishop <kanzure@gmail.com>2013-09-22 11:39:34 -0500
commite3f6d91d0672764ffdcb2cb17483b9cba8845437 (patch)
tree36f38519b253c10fb70c9d3646bb8a458f2116f3 /tests
parent54579ad69962d62a7af874635ff4e3e5fb4738b7 (diff)
basic keyboard writing test
Diffstat (limited to 'tests')
-rw-r--r--tests/test_vba.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_vba.py b/tests/test_vba.py
index 787a151..b9ce832 100644
--- a/tests/test_vba.py
+++ b/tests/test_vba.py
@@ -212,5 +212,26 @@ class VbaTests(unittest.TestCase):
self.assertEqual(self.get_wram_value("MapGroup"), 24)
self.assertEqual(self.get_wram_value("MapNumber"), 4)
+ def test_keyboard_typing(self):
+ runner = autoplayer.SpeedRunner(cry=None)
+ runner.setup()
+ runner.skip_intro(stop_at_name_selection=True, skip=False, override=False)
+
+ self.cry.vba.press("a", hold=20)
+
+ # wait for "Your name?" to show up
+ text = self.cry.get_text()
+
+ while "YOUR NAME?" not in text:
+ self.cry.step(count=50)
+ text = self.cry.get_text()
+
+ self.cry.write()
+
+ # save this selection
+ self.cry.vba.press("a", hold=20)
+
+ # TODO: confirm the test was real
+
if __name__ == "__main__":
unittest.main()