@@ -54,7 +54,10 @@ def go_back
5454
5555 t 'background_app homescreen' do
5656 background_app ( -1 ) # background_app(nil) should work as same.
57- screen . must_raise ::Selenium ::WebDriver ::Error ::NoSuchElementError
57+
58+ screen . must_equal 'UICatalog'
59+ # TODO: Should update this assert.
60+ # screen.must_raise ::Selenium::WebDriver::Error::NoSuchElementError
5861 end
5962
6063 t 'reset' do
@@ -80,13 +83,30 @@ def go_back
8083 end
8184
8285 t 'action_chain' do
83- Appium ::TouchAction . new . press ( element : id ( 'ButtonsExplain' ) ) . perform
86+ Appium ::TouchAction . new . press ( element : text ( app_strings [ 'ButtonsExplain' ] ) ) . perform
8487 wait { id 'ArrowButton' } # successfully transitioned to buttons page
8588 go_back
8689 end
8790
8891 t 'swipe' do
89- swipe start_x : 75 , start_y : 500 , offset_x : 75 , offset_y : 0 , duration : 800
92+ touch_action = swipe ( start_x : 75 , start_y : 500 , offset_x : 75 , offset_y : 20 , duration : 500 )
93+ touch_action . actions . must_equal [ ]
94+
95+ touch_action = Appium ::TouchAction . new . swipe ( start_x : 75 , start_y : 500 , offset_x : 75 , offset_y : 20 , duration : 500 )
96+
97+ touch_action . actions [ 0 ] [ :action ] . must_equal :press
98+ touch_action . actions [ 0 ] [ :options ] . must_equal ( x : 75 , y : 500 )
99+
100+ touch_action . actions [ 1 ] [ :action ] . must_equal :wait ,
101+ touch_action . actions [ 1 ] [ :options ] . must_equal ( ms : 500 )
102+
103+ touch_action . actions [ 2 ] [ :action ] . must_equal :moveTo
104+ touch_action . actions [ 2 ] [ :options ] . must_equal ( x : 75 , y : 20 )
105+
106+ touch_action . actions [ 3 ] [ :action ] . must_equal :release
107+
108+ touch_action . perform
109+ touch_action . actions . must_equal [ ]
90110 end
91111
92112 t 'pull_file' do
0 commit comments