Merge lp:~allanlesage/unity8/dash-apps-visible-ordering into lp:unity8

Proposed by Allan LeSage
Status: Superseded
Proposed branch: lp:~allanlesage/unity8/dash-apps-visible-ordering
Merge into: lp:unity8
Diff against target: 64 lines (+22/-11)
2 files modified
tests/autopilot/unity8/shell/emulators/dash.py (+10/-5)
tests/autopilot/unity8/shell/tests/test_emulators.py (+12/-6)
To merge this branch: bzr merge lp:~allanlesage/unity8/dash-apps-visible-ordering
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Leo Arias (community) Needs Fixing
VĂ­ctor R. Ruiz Pending
Richard Huddie Pending
Review via email: mp+213677@code.launchpad.net

This proposal has been superseded by a proposal from 2014-04-02.

Description of the change

These changes are necessary for a scopes-related user experience test for click scope installation.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

30 +from time import sleep

Please remove that unused import.

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

FAILED: Continuous integration, rev:788
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~allanlesage/unity8/dash-apps-visible-ordering/+merge/213677/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity8-ci/2704/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4429
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4027/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1574/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1225
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1229
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1229/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1225
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3831
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4533
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4533/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4051
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4051/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6286/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5498

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2704/rebuild

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

Also, I think this makes the sorting clearer. It sorts using y as the first key, and x as the second one.

sorted(result, key=lambda result: (result.globalRect.y, result.globalRect.x))

789. By Allan LeSage

Merged trunk.

790. By Allan LeSage

Merge elopio's revert_get_applications, fixing tests.

791. By Allan LeSage

Much clearer visual sorting.

792. By Allan LeSage

No sleeping pls.

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

FAILED: Continuous integration, rev:790
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~allanlesage/unity8/dash-apps-visible-ordering/+merge/213677/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity8-ci/2724/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4480
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4080
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1594
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1245
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1249
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1249/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1245
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3872
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4587
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4587/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4115
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4115/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6328
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5585

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2724/rebuild

review: Needs Fixing (continuous-integration)
793. By Allan LeSage

Per elopio's suggestion, combine get_applications length and visible tests.

794. By Allan LeSage

Stripping tags per Saviq's request.

Unmerged revisions

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-03-28 15:24:11 +0000
3+++ tests/autopilot/unity8/shell/emulators/dash.py 2014-04-02 19:23:26 +0000
4@@ -172,11 +172,16 @@
5
6 """
7 category_element = self._get_category_element(category)
8- application_tiles = category_element.select_many('Card')
9- # TODO return them on the same order they are displayed.
10- # --elopio - 2014-1-15
11+ application_cards = category_element.select_many('Card')
12+
13+ # sort by y, x
14+ application_cards = sorted(
15+ application_cards,
16+ key=lambda card: (card.globalRect.y, card.globalRect.x))
17+
18 result = []
19- for card in application_tiles:
20+ for card in application_cards:
21 if card.objectName != 'cardToolCard':
22- result.append(card)
23+ card_header = card.select_single('CardHeader')
24+ result.append(card_header.title)
25 return result
26
27=== modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py'
28--- tests/autopilot/unity8/shell/tests/test_emulators.py 2014-03-28 15:24:11 +0000
29+++ tests/autopilot/unity8/shell/tests/test_emulators.py 2014-04-02 19:23:26 +0000
30@@ -148,7 +148,7 @@
31 available_applications = [
32 'Title.2.0', 'Title.2.1', 'Title.2.2', 'Title.2.3', 'Title.2.4',
33 'Title.2.5', 'Title.2.6', 'Title.2.7', 'Title.2.8', 'Title.2.9',
34- 'Title.2.9', 'Title.2.10', 'Title.2.11']
35+ 'Title.2.10', 'Title.2.11', 'Title.2.12']
36
37 def setUp(self):
38 # Set up the fake scopes before launching unity.
39@@ -172,14 +172,20 @@
40 :expected_apps_count]
41
42 applications = self.applications_scope.get_applications(category)
43- applications_titles = []
44- for application in applications:
45- cardHeader = application.select_single('CardHeader')
46- applications_titles.append(cardHeader.title)
47
48 self.assertThat(applications, HasLength(expected_apps_count))
49 for expected in expected_applications:
50- self.assertThat(applications_titles, Contains(expected))
51+ self.assertThat(applications, Contains(expected))
52+
53+ def test_get_applications_list_matches_visible_ordering(self):
54+ category = '2'
55+ expected_apps_count = self._get_number_of_application_slots(category)
56+ expected_application_titles = self.available_applications[
57+ :expected_apps_count]
58+ applications = self.applications_scope.get_applications(category)
59+ for card_num in range(len(applications)):
60+ self.assertEqual(expected_application_titles[card_num],
61+ applications[card_num])
62
63 def _get_number_of_application_slots(self, category):
64 category_element = self.applications_scope._get_category_element(

Subscribers

People subscribed via source and target branches