on xenial help sign in
fix another test
commit4963440db2c5bfbd7f7810d23633c316f30056e7 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 30 Aug 2016, 15:36 (10 years ago) parentd025bc5
2 files changed+11−22
qml/Stage/Stage.qml−5 tests/qmltests/tst_Shell.qml+11−17
qml/Stage/Stage.qml−5
@@ -530,8 +530,6 @@ AbstractStage {
530530 }
531531 }
532532 z: normalZ
533− onZChanged: print("app", model.application.appId, "z changed to:", z)
534−
535533
536534 // Normally we want x/y where we request it to be. Width/height of our delegate will
537535 // match what the actual surface size is.
@@ -878,9 +876,6 @@ AbstractStage {
878876 targetScale: spreadMaths.targetScale
879877 }
880878
881−// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
882−// onRequestedWidthChanged: if (index == 0) print("requestedWidth", requestedWidth)
883− onStateChanged: print("+++ App", model.application.appId, "state changed to:", state)
884879 states: [
885880 State {
886881 name: "spread"; when: root.state == "spread"
tests/qmltests/tst_Shell.qml+11−17
@@ -1658,47 +1658,41 @@ Rectangle {
16581658 function test_altTabWrapAround() {
16591659 loadDesktopShellWithApps();
16601660
1661− var desktopStage = findChild(shell, "stage");
1662− verify(desktopStage !== null)
1663−
1664− var desktopSpread = findChild(shell, "spread");
1665− verify(desktopSpread !== null)
1666−
1667− var spreadContainer = findInvisibleChild(shell, "spreadContainer")
1668− verify(spreadContainer !== null)
1661+ var stage = findChild(shell, "stage");
1662+ verify(stage !== null)
16691663
1670− var spreadRepeater = findInvisibleChild(shell, "spreadRepeater")
1671− verify(spreadRepeater !== null)
1664+ var spread = findChild(shell, "spreadItem");
1665+ verify(spread !== null)
16721666
16731667 // remember the focused appId
16741668 var focused = ApplicationManager.get(ApplicationManager.findApplication(ApplicationManager.focusedApplicationId));
16751669
1676− tryCompare(desktopSpread, "state", "")
1670+ tryCompare(stage, "state", "windowed")
16771671
16781672 // Just press Alt, make sure the spread comes up
16791673 keyPress(Qt.Key_Alt);
16801674 keyClick(Qt.Key_Tab);
1681− tryCompare(desktopSpread, "state", "altTab")
1682− tryCompare(spreadRepeater, "highlightedIndex", 1)
1675+ tryCompare(stage, "state", "spread")
1676+ tryCompare(spread, "highlightedIndex", 1)
16831677 waitForRendering(shell)
16841678
16851679 // Now press and hold Tab, make sure the highlight moves all the way but stops at the last one
16861680 // We can't simulate a pressed key with keyPress() currently, so let's inject the events
16871681 // at API level. Jump for 10 times, verify that it's still at the last one and didn't wrap around.
16881682 for (var i = 0; i < 10; i++) {
1689− desktopSpread.selectNext(true); // true == isAutoRepeat
1683+ spread.selectNext(true); // true == isAutoRepeat
16901684 wait(0); // Trigger the event loop to make sure all the things happen
16911685 }
1692− tryCompare(spreadRepeater, "highlightedIndex", 6)
1686+ tryCompare(spread, "highlightedIndex", 6)
16931687
16941688 // Now release it once, and verify that it does wrap around with an additional Tab press
16951689 keyRelease(Qt.Key_Tab);
16961690 keyClick(Qt.Key_Tab);
1697− tryCompare(spreadRepeater, "highlightedIndex", 0)
1691+ tryCompare(spread, "highlightedIndex", 0)
16981692
16991693 // Release control, check if spread disappears
17001694 keyRelease(Qt.Key_Alt)
1701− tryCompare(desktopSpread, "state", "")
1695+ tryCompare(stage, "state", "windowed")
17021696
17031697 // Make sure that after wrapping around once, we have the same one focused as at the beginning
17041698 var focusedAppSurface = focused.surfaceList.get(0);