Merge lp:~zsombi/ubuntu-ui-toolkit/dynamic-tabs-test-failure into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri on 2014-04-15
Status: Merged
Approved by: Tim Peeters on 2014-04-15
Approved revision: 1011
Merged at revision: 1007
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/dynamic-tabs-test-failure
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 67 lines (+19/-6)
2 files modified
modules/Ubuntu/Components/Tabs.qml (+11/-3)
tests/unit_x11/tst_components/tst_tabs.qml (+8/-3)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/dynamic-tabs-test-failure
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2014-04-15
Tim Peeters 2014-04-15 Approve on 2014-04-15
Review via email: mp+215886@code.launchpad.net

Commit message

Fix for arm64 test failure

To post a comment you must log in.
Tim Peeters (tpeeters) wrote :

ok

review: Approve
1010. By Zsombor Egri on 2014-04-15

bug ID added to the comments

1011. By Zsombor Egri on 2014-04-15

comments fixed

PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1010
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/26/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/247
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4846
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-amd64-ci/26
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/26
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/26/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-i386-ci/26
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/234
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4422
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4422/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6045
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4189
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4983
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4983/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/26/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/Tabs.qml'
2--- modules/Ubuntu/Components/Tabs.qml 2014-04-10 11:25:17 +0000
3+++ modules/Ubuntu/Components/Tabs.qml 2014-04-15 14:53:59 +0000
4@@ -473,8 +473,6 @@
5 var tab = tabsList[i];
6 if (internal.isTab(tab)) {
7 tabIndex = i - offset;
8- // make sure we have the right parent
9- tab.parent = tabs;
10
11 if (!tab.__protected.inserted) {
12 tab.__protected.index = tabIndex;
13@@ -511,7 +509,17 @@
14
15 for (var i = start; i < count; i++) {
16 var tab = get(i).tab;
17- tab.__protected.index = i;
18+ // FIXME: introduce an idle timer to get the model updated properly. This small delay
19+ // is needed for arm64 unit tests, as the move() seems to update the model asynchronously.
20+ // fixes bug #1308086
21+ if (!tab) wait(0);
22+ tab = get(i).tab;
23+
24+ if (tab) {
25+ tab.__protected.index = i;
26+ } else {
27+ console.error("Invalid Tab at index", i, get(i).title)
28+ }
29 }
30 }
31
32
33=== modified file 'tests/unit_x11/tst_components/tst_tabs.qml'
34--- tests/unit_x11/tst_components/tst_tabs.qml 2014-02-25 11:01:06 +0000
35+++ tests/unit_x11/tst_components/tst_tabs.qml 2014-04-15 14:53:59 +0000
36@@ -90,7 +90,7 @@
37 title: "load"
38 page: Loader {
39 id: loader
40- sourceComponent: tabs.selectedTabIndex != 5 ? null : pageComponent
41+ sourceComponent: tabs.selectedTabIndex != tabFlickLoader.index ? null : pageComponent
42 }
43 }
44 Tab {
45@@ -103,8 +103,8 @@
46 right: parent.right
47 bottom: parent.bottom
48 }
49- // height compes from the loaded Page
50- sourceComponent: tabs.selectedTabIndex === 6 ? pageComponentNoFlick : null
51+ // height comes from the loaded Page
52+ sourceComponent: tabs.selectedTabIndex === tabNoFlickLoader.index ? pageComponentNoFlick : null
53 }
54 }
55 }
56@@ -219,6 +219,11 @@
57 name: "TabsAPI"
58 when: windowShown
59
60+ function init() {
61+ // introduce a small delay in front of each test
62+ wait(200);
63+ }
64+
65 /*
66 The following testcases are all related to bug #1253804
67 */

Subscribers

People subscribed via source and target branches