Merge lp:~om26er/ubuntu-clock-app/fix_autopilot_on_touch into lp:ubuntu-clock-app/saucy
Proposed by
Omer Akram
Status: | Rejected |
---|---|
Rejected by: | Nicholas Skaggs |
Proposed branch: | lp:~om26er/ubuntu-clock-app/fix_autopilot_on_touch |
Merge into: | lp:ubuntu-clock-app/saucy |
Diff against target: |
191 lines (+74/-27) 4 files modified
tests/autopilot/ubuntu_clock_app/emulators/main_window.py (+9/-0) tests/autopilot/ubuntu_clock_app/tests/__init__.py (+1/-1) tests/autopilot/ubuntu_clock_app/tests/test_timer.py (+62/-25) timer/TimerPage.qml (+2/-1) |
To merge this branch: | bzr merge lp:~om26er/ubuntu-clock-app/fix_autopilot_on_touch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nicholas Skaggs | Pending | ||
Ubuntu Clock Developers | Pending | ||
Review via email: mp+178443@code.launchpad.net |
Commit message
fix autopilot tests on touch
Description of the change
autopilot tests are failing on touch devices, this branch fixes that. Also "NewTabBar" is now "TabBar" it seems to re-named that in autopilot tests as tests were failing on the desktop as well.
To post a comment you must log in.
Nice! Just need some small house cleaning.
Can you add comments to what these emulator function do. Sort of like "Returns the number of presets in the timer list view".
9 + def get_num_ of_presets( self): select_ single( "TimerPage" ) select_ single( "QQuickListView ").count preset_ list_item( self): select_ single( "Standard" , objectName= "preset0" )
10 + time_page = self.app.
11 + return time_page.
12 +
13 + def get_first_
14 + return self.app.
I think here you meant "timer_page" instead of "time_page"
9 + def get_num_ of_presets( self): select_ single( "TimerPage" ) select_ single( "QQuickListView ").count
10 + time_page = self.app.
11 + return time_page.
I think the show_toolbar should be replaced with the new emulator functions which landed in the SDK itself. It was implemented by elopio (irc) where the SDK provides common emulator functions such as show/hide toolbar, switch tabs etc. If you want you can implement this in this MP or otherwise take care of this in a latter commit.
43 def show_toolbar(self): window. get_toolbar_ timer() timer.globalRec t device. drag(tx, ty + (h / 3), tx, ty - h) select_ single( "Toolbar" ) device. drag(tx, ty, tx, ty - h) (toolbar. animating, Eventually( Equals( False)) ) (toolbar. state, Eventually( Equals( "spread" )))
44 - toolbar_timer = self.main_
45 -
46 - x, y, w, h = toolbar_
47 - tx = x + (w / 2)
48 - ty = y - (h / 2)
49 -
50 - self.pointing_
51 + toolbar = self.app.
52 +
53 + x, y, w, h = toolbar.globalRect
54 + tx = x + (w / 2)
55 + ty = y + (h - (h / 8))
56 +
57 + self.pointing_
58 + self.assertThat
59 + self.assertThat
Otherwise it all looks good.