Coverage for example/advanced_example_property.py: 65%
49 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-22 16:05 +0800
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-22 16:05 +0800
1import sys
3sys.path.append("..")
4from kea import *
7class Test(KeaTest):
9 @initializer()
10 def set_up(self):
11 d.set_fastinput_ime(True)
12 d(resourceId="it.feio.android.omninotes:id/next").click()
14 d(resourceId="it.feio.android.omninotes:id/next").click()
16 d(resourceId="it.feio.android.omninotes:id/next").click()
18 d(resourceId="it.feio.android.omninotes:id/next").click()
20 d(resourceId="it.feio.android.omninotes:id/next").click()
22 d(resourceId="it.feio.android.omninotes:id/done").click()
24 if d(text="OK").exists():
25 d(text="OK").click()
27 @mainPath()
28 def remove_password_in_setting_should_effect_mainpath(self):
29 d(resourceId="it.feio.android.omninotes:id/fab_expand_menu_button").long_click()
30 d(resourceId="it.feio.android.omninotes:id/detail_content").set_text("Hello world")
31 d(description="More options").click()
32 d(text="Lock").click()
33 d(resourceId="it.feio.android.omninotes:id/password").set_text("1")
34 d(resourceId="it.feio.android.omninotes:id/password_check").set_text("1")
35 d(resourceId="it.feio.android.omninotes:id/question").set_text("1")
36 d(resourceId="it.feio.android.omninotes:id/answer").set_text("1")
37 d(resourceId="it.feio.android.omninotes:id/answer_check").set_text("1")
38 d(scrollable=True).scroll.to(text="OK")
39 d(text="OK").click()
40 d.press("back")
41 d(description="drawer open").click()
42 d(resourceId="it.feio.android.omninotes:id/settings").click()
43 d(resourceId="android:id/title", text="Data").click()
44 d(resourceId="android:id/title", text="Password").click()
45 d(resourceId="it.feio.android.omninotes:id/password_remove").click()
47 @precondition(lambda self: d(text="Insert password").exists() and d(text="PASSWORD FORGOTTEN").exists())
48 @rule()
49 def remove_password_in_setting_should_effect(self):
51 d(resourceId="it.feio.android.omninotes:id/customViewFrame").click()
53 d.send_keys("1", clear=True)
55 d(resourceId="it.feio.android.omninotes:id/buttonDefaultPositive").click()
57 if d(text="Insert password").exists():
58 print("wrong password")
59 return
61 d(resourceId="it.feio.android.omninotes:id/buttonDefaultPositive").click()
63 d.press("back")
65 d.press("back")
67 d.press("back")
69 d.press("back")
71 assert not d(resourceId="it.feio.android.omninotes:id/lockedIcon").exists()