Merge lp:~canonical-platform-qa/unity8/fix1335548-click_scope_item into lp:unity8

Proposed by Leo Arias
Status: Merged
Approved by: Michał Sawicz
Approved revision: 984
Merged at revision: 1157
Proposed branch: lp:~canonical-platform-qa/unity8/fix1335548-click_scope_item
Merge into: lp:unity8
Prerequisite: lp:~elopio/unity8/flake8
Diff against target: 58 lines (+16/-6)
1 file modified
tests/autopilot/unity8/shell/emulators/dash.py (+16/-6)
To merge this branch: bzr merge lp:~canonical-platform-qa/unity8/fix1335548-click_scope_item
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid (community) Needs Fixing
Brendan Donegan Pending
Review via email: mp+227570@code.launchpad.net

This proposal supersedes a proposal from 2014-06-29.

Commit message

Added an autopilot helper to click a scope item.

Description of the change

This is already tested on the test for opening a preview. No need to duplicate that adding a new test.

 * Are there any related MPs required for this MP to build/function as expected? Please list.

No MPs related.

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes, ran the tests, explored the QML tree with autopilot vis, tested with the click scope tests.

 * Did you make sure that your branch does not contain spurious tags?

Yes, I did.

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

No debian changes.

 * If you changed the UI, has there been a design review?

No UI changes.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Text conflict in tests/autopilot/unity8/shell/emulators/dash.py
1 conflicts encountered.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

The error was one of the qmlscene crashes that we are finding more often now.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

Just a resubmit to make it a team branch, following the new QA team policy.

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: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/autopilot/unity8/shell/emulators/dash.py
1 conflicts encountered.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

Back to work in progress because the dash app branch will break this. Working on that first.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Should we not have a test for this emulator?

review: Needs Information
Revision history for this message
Michał Sawicz (saviq) wrote :

> Should we not have a test for this emulator?

Ignore please, read description.

Please run http://people.canonical.com/~msawicz/unity8/strip-u8-tags.py on this branch, and any local checkouts you might have.

review: Needs Fixing
Revision history for this message
Leo Arias (elopio) wrote :

Done. Thanks for the review. It is ready again.

Revision history for this message
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yeas.

 * Did CI run pass? If not, please explain why.
Unrelated QML failures fixed in another branch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/unity8/shell/emulators/dash.py'
2--- tests/autopilot/unity8/shell/emulators/dash.py 2014-08-06 13:16:55 +0000
3+++ tests/autopilot/unity8/shell/emulators/dash.py 2014-08-11 15:45:24 +0000
4@@ -24,7 +24,6 @@
5
6 from autopilot import logging as autopilot_logging
7 from autopilot.introspection import dbus
8-from testtools.matchers import MatchesAny, Equals
9 from ubuntuuitoolkit import emulators as toolkit_emulators
10
11
12@@ -146,7 +145,8 @@
13 current_header.globalRect.y +
14 current_header.height / 4)
15 self.pointing_device.click()
16- headerContainer = current_header.select_single(objectName="headerContainer")
17+ headerContainer = current_header.select_single(
18+ objectName="headerContainer")
19 headerContainer.contentY.wait_for(0)
20 search_text_field = self._get_search_text_field()
21 search_text_field.write(query)
22@@ -177,22 +177,32 @@
23 """Open the preview of an application.
24
25 :parameter category: The name of the category where the application is.
26- :app_name: The name of the application.
27+ :parameter app_name: The name of the application.
28 :return: The opened preview.
29
30 """
31- category_element = self._get_category_element(category)
32- icon = category_element.select_single('AbstractButton', title=app_name)
33 # FIXME some categories need a long press in order to see the preview.
34 # Some categories do not show previews, like recent apps.
35 # --elopio - 2014-1-14
36- self.pointing_device.click_object(icon)
37+ self.click_scope_item(category, app_name)
38 preview_list = self.wait_select_single(
39 'PreviewListView', objectName='previewListView')
40 preview_list.x.wait_for(0)
41 return preview_list.select_single(
42 Preview, objectName='preview{}'.format(preview_list.currentIndex))
43
44+ @autopilot_logging.log_action(logger.debug)
45+ def click_scope_item(self, category, title):
46+ """Click an item from the scope.
47+
48+ :parameter category: The name of the category where the item is.
49+ :parameter title: The title of the item.
50+
51+ """
52+ category_element = self._get_category_element(category)
53+ icon = category_element.select_single('AbstractButton', title=title)
54+ self.pointing_device.click_object(icon)
55+
56 def _get_category_element(self, category):
57 try:
58 return self.wait_select_single(

Subscribers

People subscribed via source and target branches