Merge lp:~lukas-kde/unity8/add-autotest-lp1680018 into lp:unity8

Proposed by Lukáš Tinkl
Status: Approved
Approved by: Albert Astals Cid
Approved revision: 2919
Proposed branch: lp:~lukas-kde/unity8/add-autotest-lp1680018
Merge into: lp:unity8
Prerequisite: lp:~lukas-kde/unity8/fix-window-title-vs-menu
Diff against target: 66 lines (+22/-5)
2 files modified
qml/Stage/WindowDecoration.qml (+1/-0)
tests/qmltests/tst_Shell.qml (+21/-5)
To merge this branch: bzr merge lp:~lukas-kde/unity8/add-autotest-lp1680018
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Albert Astals Cid (community) Approve
Review via email: mp+321974@code.launchpad.net

Commit message

Add autotest for missing window control buttons after a maximized window exits spread

Description of the change

Add autotest for missing window control buttons after a maximized window exits spread

Fixes lp:1680018

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

I think you should add two testcases more in test_selectFromSpreadWithMouse_data so that we also run the test without the requestMaximize like we did before, what do you think?

review: Needs Information
2917. By Lukáš Tinkl

add a maximized variant

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

> I think you should add two testcases more in
> test_selectFromSpreadWithMouse_data so that we also run the test without the
> requestMaximize like we did before, what do you think?

Done

2918. By Lukáš Tinkl

let the restore() call only be in the if block

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2916
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3687/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4896
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/3002
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/3002
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4924
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4732
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4732/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4732
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4732/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4732
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4732/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4732
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4732/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4732
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4732/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4732
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4732/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3687/rebuild

review: Approve (continuous-integration)
2919. By Lukáš Tinkl

fixup the data mess

Revision history for this message
Albert Astals Cid (aacid) 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

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2918
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3690/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4900
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4928
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4736
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4736/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4736
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4736/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4736
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4736/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4736
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4736/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4736
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4736/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4736
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4736/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3690/rebuild

review: Needs Fixing (continuous-integration)

Unmerged revisions

2919. By Lukáš Tinkl

fixup the data mess

2918. By Lukáš Tinkl

let the restore() call only be in the if block

2917. By Lukáš Tinkl

add a maximized variant

2916. By Lukáš Tinkl

add regression test for lp:1680018

2915. By Lukáš Tinkl

merge lp:~lukas-kde/unity8/fix-window-title-vs-menu

2914. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Stage/WindowDecoration.qml'
2--- qml/Stage/WindowDecoration.qml 2017-04-05 12:22:49 +0000
3+++ qml/Stage/WindowDecoration.qml 2017-04-05 12:22:49 +0000
4@@ -100,6 +100,7 @@
5
6 WindowControlButtons {
7 id: buttons
8+ objectName: "windowControlButtons"
9 anchors {
10 top: parent.top
11 bottom: parent.bottom
12
13=== modified file 'tests/qmltests/tst_Shell.qml'
14--- tests/qmltests/tst_Shell.qml 2017-03-24 11:08:11 +0000
15+++ tests/qmltests/tst_Shell.qml 2017-04-05 12:22:49 +0000
16@@ -1734,8 +1734,10 @@
17
18 function test_selectFromSpreadWithMouse_data() {
19 return [
20- {tag: "click on tileInfo", tileInfo: true },
21- {tag: "click on surface", tileInfo: false },
22+ {tag: "click on tileInfo", tileInfo: true, maximize: false },
23+ {tag: "click on surface", tileInfo: false, maximize: false },
24+ {tag: "click on tileInfo, maximized", tileInfo: true, maximize: true },
25+ {tag: "click on surface, maximized", tileInfo: false, maximize: true },
26 ]
27 }
28
29@@ -1749,13 +1751,18 @@
30 var appRepeater = findInvisibleChild(shell, "appRepeater");
31 verify(appRepeater !== null);
32
33- keyPress(Qt.Key_Alt)
34- keyClick(Qt.Key_Tab);
35-
36 var surface = topLevelSurfaceList.surfaceAt(2);
37 var spreadDelegate2 = appRepeater.itemAt(2);
38 var decoratedWindow = findChild(spreadDelegate2, "decoratedWindow");
39
40+ if (data.maximize) {
41+ // maximize hides the window control buttons
42+ spreadDelegate2.requestMaximize();
43+ }
44+
45+ keyPress(Qt.Key_Alt)
46+ keyClick(Qt.Key_Tab);
47+
48 tryCompare(stage, "state", "spread");
49
50 // Move the mouse over tile 2 and verify the highlight becomes visible
51@@ -1777,6 +1784,15 @@
52 tryCompare(surface, "focused", true);
53
54 keyRelease(Qt.Key_Alt);
55+
56+ // verify the window control buttons are again visible, lp#1680018
57+ if (data.maximize) {
58+
59+ spreadDelegate2.requestRestore();
60+ }
61+ var windowButtons = findChild(decoratedWindow, "windowControlButtons");
62+ verify(windowButtons);
63+ tryCompare(windowButtons, "visible", true);
64 }
65
66 function test_progressiveAutoScrolling() {

Subscribers

People subscribed via source and target branches