@@ -3,6 +3,12 @@ def before_first
33 screen . must_equal catalog
44 end
55
6+ # go back to the main page
7+ def go_back
8+ back
9+ wait { ! exists { id 'ArrowButton' } } # successfully transitioned back
10+ end
11+
612 t 'before_first' do
713 before_first
814 end
@@ -13,7 +19,7 @@ def before_first
1319
1420 # It appears that lockForDuration doesn't.
1521 close_app
16- launch
22+ launch_app
1723 end
1824
1925 t 'background_app' do
@@ -32,7 +38,7 @@ def before_first
3238
3339 t 'close and launch' do
3440 close_app
35- launch
41+ launch_app
3642 tag ( 'UIANavigationBar' ) . name . must_equal 'UICatalog'
3743 end
3844
@@ -45,12 +51,12 @@ def before_first
4551 end
4652
4753 t 'current_context' do
48- current_context . must_equal nil
54+ current_context . must_equal 'NATIVE_APP'
4955 end
5056
5157 t 'switch_to_default_context' do
5258 switch_to_default_context
53- current_context . must_equal nil
59+ current_context . must_equal 'NATIVE_APP'
5460 end
5561
5662 t 'app_strings' do
@@ -59,21 +65,21 @@ def before_first
5965 end
6066
6167 t 'action_chain' do
62- ac = Appium ::TouchAction . new
63- e = find_element ( :name , 'Buttons, Various uses of UIButton' )
64- ac . press element : e , x : 10 , y : 10
65- ac . perform
66- back
68+ Appium ::TouchAction . new . press ( element : id ( 'ButtonsExplain' ) ) . perform
69+ wait { id 'ArrowButton' } # successfully transitioned to buttons page
70+ go_back
6771 end
6872
6973 t 'swipe' do
7074 swipe start_x : 75 , start_y : 500 , end_x : 75 , end_y : 0 , duration : 800
7175 end
7276
7377 t 'pinch & zoom' do
74- text ( 'Images, Use of UIImageView' ) . click
78+ wait { id ( 'ImagesExplain' ) . click }
79+ # both of these appear to do nothing on iOS 8
7580 zoom 200
7681 pinch 75
82+ go_back
7783 end
7884
7985 t 'pull_file' do
0 commit comments