Merge lp:~elopio/ubuntu-ui-toolkit/autopilot-1.4 into lp:ubuntu-ui-toolkit

Proposed by Leo Arias
Status: Superseded
Proposed branch: lp:~elopio/ubuntu-ui-toolkit/autopilot-1.4
Merge into: lp:ubuntu-ui-toolkit
Prerequisite: lp:~elopio/ubuntu-ui-toolkit/toolkit_exception
Diff against target: 66 lines (+14/-9)
2 files modified
debian/control (+1/-1)
tests/autopilot/ubuntuuitoolkit/emulators.py (+13/-8)
To merge this branch: bzr merge lp:~elopio/ubuntu-ui-toolkit/autopilot-1.4
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Chris Gagnon (community) Approve
Ubuntu SDK team Pending
Review via email: mp+192574@code.launchpad.net

This proposal has been superseded by a proposal from 2013-11-06.

Commit message

Update the tests to work with autopilot 1.4.

Description of the change

Update the tests to work with autopilot 1.4.

To post a comment you must log in.
Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

it worked for me using autopilot -v
Autopilot Source Version: 1.4.0 Autopilot Package Version:
1.4+14.04.20130917ubuntu.unity.nextbzr353saucy0

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:808
http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-ci/1086/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/81/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/80/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-amd64-ci/34
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/34
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-armhf-ci/34/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/72/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/81
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/81/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/80
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/80/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2707/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2758/console
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/456
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/453

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-ui-toolkit-ci/1086/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-10-04 19:49:11 +0000
3+++ debian/control 2013-10-24 19:27:15 +0000
4@@ -116,7 +116,7 @@
5 dpkg-dev,
6 libqt5test5,
7 libqt5widgets5,
8- python-autopilot (>= 1.3),
9+ python-autopilot (>= 1.4),
10 python-mock,
11 ubuntu-ui-toolkit-examples (>= ${source:Version}),
12 Description: Test package for Ubuntu UI Toolkit
13
14=== modified file 'tests/autopilot/ubuntuuitoolkit/emulators.py'
15--- tests/autopilot/ubuntuuitoolkit/emulators.py 2013-10-24 19:27:15 +0000
16+++ tests/autopilot/ubuntuuitoolkit/emulators.py 2013-10-24 19:27:15 +0000
17@@ -57,7 +57,10 @@
18
19 def get_header(self):
20 """Return the Header emulator of the MainView."""
21- return self.select_single('Header', objectName='MainView_Header')
22+ try:
23+ return self.select_single('Header', objectName='MainView_Header')
24+ except dbus.StateNotFoundError:
25+ raise ToolkitEmulatorException('The main view has no header.')
26
27 def get_toolbar(self):
28 """Return the Toolbar emulator of the MainView."""
29@@ -109,10 +112,10 @@
30 :raise ToolkitEmulatorException: If the main view has no tabs.
31
32 """
33- tabs = self.select_single(Tabs)
34- if tabs is None:
35+ try:
36+ return self.select_single(Tabs)
37+ except dbus.StateNotFoundError:
38 raise ToolkitEmulatorException(_NO_TABS_ERROR)
39- return tabs
40
41 def switch_to_next_tab(self):
42 """Open the next tab.
43@@ -214,8 +217,9 @@
44 :raise ToolkitEmulatorException: If the main view has no tabs.
45
46 """
47- tab_bar = self.select_single(TabBar)
48- if tab_bar is None:
49+ try:
50+ tab_bar = self.select_single(TabBar)
51+ except dbus.StateNotFoundError:
52 raise ToolkitEmulatorException(_NO_TABS_ERROR)
53 tab_bar.switch_to_next_tab()
54
55@@ -234,8 +238,9 @@
56 name.
57
58 """
59- button = self._get_button(object_name)
60- if button is None:
61+ try:
62+ button = self._get_button(object_name)
63+ except dbus.StateNotFoundError:
64 raise ToolkitEmulatorException(
65 'Button with objectName "{0}" not found.'.format(object_name))
66 self.pointing_device.click_object(button)

Subscribers

People subscribed via source and target branches

to status/vote changes: