Merge lp:~aacid/unity8/unfavorite_scope_test into lp:unity8

Proposed by Albert Astals Cid on 2015-11-10
Status: Merged
Approved by: Michael Zanetti on 2015-11-25
Approved revision: 2042
Merged at revision: 2083
Proposed branch: lp:~aacid/unity8/unfavorite_scope_test
Merge into: lp:unity8
Diff against target: 52 lines (+21/-0)
3 files modified
tests/mocks/Unity/fake_scopes.cpp (+3/-0)
tests/qmltests/Dash/tst_DashContent.qml (+13/-0)
tests/qmltests/Dash/tst_GenericScopeView.qml (+5/-0)
To merge this branch: bzr merge lp:~aacid/unity8/unfavorite_scope_test
Reviewer Review Type Date Requested Status
Michael Zanetti (community) 2015-11-10 Approve on 2015-11-25
PS Jenkins bot continuous-integration Needs Fixing on 2015-11-24
Review via email: mp+277157@code.launchpad.net

Commit Message

Make sure that unfavoriting a scope gives us the next one

This is currently broken due to a regression in the Qt Quick ListView

Description of the Change

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

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

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

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

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

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2039
http://jenkins.qa.ubuntu.com/job/unity8-ci/6696/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5110
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/111/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1408
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/111
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1303
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1304
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/110
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/110
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4091
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5119
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5119/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25076
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/14/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/111
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/111/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25075

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

review: Needs Fixing (continuous-integration)
2039. By Albert Astals Cid on 2015-11-11

Make sure that unfavoriting a scope gives us the next one

This is currently broken due to a regression in the Qt Quick ListView

2040. By Albert Astals Cid on 2015-11-11

Start from a clean scopes situation every test now that favorite changes scopes

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2040
http://jenkins.qa.ubuntu.com/job/unity8-ci/6698/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5118
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/113/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1410
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/113
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1305
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1306
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/112
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/112
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4097
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5130
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5130/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25091
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/16/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/113
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/113/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25090

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

review: Needs Fixing (continuous-integration)
2041. By Albert Astals Cid on 2015-11-24

Merge

2042. By Albert Astals Cid on 2015-11-24

Remove the expectFail since the fix for the bug has landed

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2042
http://jenkins.qa.ubuntu.com/job/unity8-ci/6792/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5358
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/207/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1505
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/207/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1399
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1400
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/206
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/206
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4248
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5378
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5378/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25446
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/65/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/207
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/207/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25445

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

review: Needs Fixing (continuous-integration)
Michael Zanetti (mzanetti) wrote :

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

yes

 * Did CI run pass? If not, please explain why.

yes (v+o at least)

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

yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/mocks/Unity/fake_scopes.cpp'
2--- tests/mocks/Unity/fake_scopes.cpp 2015-08-19 13:56:21 +0000
3+++ tests/mocks/Unity/fake_scopes.cpp 2015-11-24 09:19:18 +0000
4@@ -260,6 +260,9 @@
5 beginInsertRows(QModelIndex(), index, index);
6 m_scopes.append(scope);
7 endInsertRows();
8+ connect(scope, &Scope::favoriteChanged, [this, scope]{
9+ setFavorite(scope->id(), scope->favorite());
10+ });
11 }
12 m_allScopes.append(scope);
13 }
14
15=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
16--- tests/qmltests/Dash/tst_DashContent.qml 2015-09-18 07:43:38 +0000
17+++ tests/qmltests/Dash/tst_DashContent.qml 2015-11-24 09:19:18 +0000
18@@ -599,5 +599,18 @@
19 expectFail("", "There has to be new cards after releasing the list is not moving anymore");
20 verify(compareArrays(buttons3, buttons));
21 }
22+
23+ function test_unfavoriteScope()
24+ {
25+ var dashContentList = findChild(dashContent, "dashContentList");
26+ var header = findChild(dashContentList.currentItem, "scopePageHeader")
27+ var favoriteAction = findChild(header, "favorite_action_button");
28+ compare(dashContentList.currentIndex, 0);
29+ compare(dashContentList.indexAt(dashContentList.width * 1.5, 0), 1);
30+ var nextScopeId = dashContentList.itemAt(dashContentList.width * 1.5, 0).item.scope.id;
31+ mouseClick(favoriteAction);
32+ tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true);
33+ compare(dashContentList.currentIndex, 0);
34+ }
35 }
36 }
37
38=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
39--- tests/qmltests/Dash/tst_GenericScopeView.qml 2015-08-03 13:48:14 +0000
40+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2015-11-24 09:19:18 +0000
41@@ -70,6 +70,11 @@
42 property Item header: findChild(genericScopeView, "scopePageHeader")
43
44 function init() {
45+ // Start from a clean scopes situation every test
46+ scopes.clear();
47+ scopes.load();
48+ tryCompare(scopes, "loaded", true);
49+
50 genericScopeView.scope = scopes.getScope(2);
51 shell.width = units.gu(120);
52 genericScopeView.categoryView.positionAtBeginning();

Subscribers

People subscribed via source and target branches