Merge lp:~elopio/gallery-app/revert_workaround-1302706-click_toolbar_button_failure into lp:gallery-app

Proposed by Leo Arias
Status: Needs review
Proposed branch: lp:~elopio/gallery-app/revert_workaround-1302706-click_toolbar_button_failure
Merge into: lp:gallery-app
Diff against target: 62 lines (+0/-58)
1 file modified
tests/autopilot/gallery_app/emulators/toolbar.py (+0/-58)
To merge this branch: bzr merge lp:~elopio/gallery-app/revert_workaround-1302706-click_toolbar_button_failure
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+216620@code.launchpad.net

Commit message

Reverted the workaround for bug 1302706 now that it's fixed on the toolkit.
Removed the file altogether as it's no longer used.

Description of the change

No that the method is released to the toolkit, we no longer need to override it on the gallery.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

956. By Leo Arias

Now the toolbar object is not needed at all.

955. By Leo Arias

Reverted the workaround for bug 1302706 now that it's fixed on the toolkit.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'tests/autopilot/gallery_app/emulators/toolbar.py'
2--- tests/autopilot/gallery_app/emulators/toolbar.py 2014-04-04 16:54:58 +0000
3+++ tests/autopilot/gallery_app/emulators/toolbar.py 1970-01-01 00:00:00 +0000
4@@ -1,58 +0,0 @@
5-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
6-# Copyright 2013, 2014 Canonical
7-#
8-# This program is free software: you can redistribute it and/or modify it
9-# under the terms of the GNU General Public License version 3, as published
10-# by the Free Software Foundation.
11-
12-from autopilot.introspection.dbus import StateNotFoundError
13-import logging
14-from ubuntuuitoolkit import emulators as toolkit_emulators
15-
16-logger = logging.getLogger(__name__)
17-
18-
19-class Toolbar(toolkit_emulators.Toolbar):
20- """An emulator class that makes it easy to interact with the tool bar"""
21-
22- def click_button(self, object_name):
23- """Click a button of the toolbar.
24-
25- The toolbar should be opened before clicking the button, or an
26- exception will be raised. If the toolbar is closed for some reason
27- (e.g., timer finishes) after moving the mouse cursor and before
28- clicking the button, it is re-opened automatically by this function.
29-
30- Overriden from the toolkit because of bug http://pad.lv/1302706
31- TODO remove this method once that bug is fixed on the toolkit.
32- --elopio - 2014-04-04
33-
34- :parameter object_name: The QML objectName property of the button.
35- :raise ToolkitEmulatorException: If there is no button with that object
36- name.
37-
38- """
39- # ensure the toolbar is open
40- if not self.opened:
41- raise toolkit_emulators.ToolkitEmulatorException(
42- 'Toolbar must be opened before calling click_button().')
43- try:
44- button = self._get_button(object_name)
45- except StateNotFoundError:
46- raise toolkit_emulators.ToolkitEmulatorException(
47- 'Button with objectName "{0}" not found.'.format(object_name))
48- self.pointing_device.move_to_object(button)
49- # ensure the toolbar is still open (may have closed due to timeout)
50- self.open()
51- # click the button
52- self.pointing_device.click_object(button)
53-
54- def click_custom_button(self, object_name):
55- try:
56- button = self.select_single('Button', objectName=object_name)
57- self.pointing_device.click_object(button)
58- except StateNotFoundError:
59- logger.error(
60- 'Button with objectName "{0}" not found.'.format(object_name)
61- )
62- raise

Subscribers

People subscribed via source and target branches

to all changes: