on xenial help sign in
Merge pull request #240 from ubports/xenial_-_unityTestSpeedup

Speed up test suite a bit

commit31d9e497c1edb2ded8e98d40ef62d64530120d23 authorMarius Gripsgard <marius@ubports.com> dateSat 14 Dec 2019, 18:25 (7 years ago) parentb154e595dc5593
3 files changed+4−23
tests/qmltests/Stage/tst_PhoneStage.qml−9 tests/qmltests/Stage/tst_TabletStage.qml−10 tests/qmltests/tst_Shell.qml+4−4
tests/qmltests/Stage/tst_PhoneStage.qml−9
@@ -77,15 +77,6 @@ Item {
7777 Column {
7878 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
7979 spacing: units.gu(1)
80− EdgeBarrierControls {
81− id: edgeBarrierControls
82− text: "Drag here to pull out spread"
83− backgroundColor: "blue"
84− onDragged: { stage.pushRightEdge(amount); }
85− Component.onCompleted: {
86− edgeBarrierControls.target = testCase.findChild(stage, "edgeBarrierController");
87− }
88− }
8980 Repeater {
9081 model: ApplicationManager.availableApplications
9182 ApplicationCheckBox { appId: modelData }
tests/qmltests/Stage/tst_TabletStage.qml−10
@@ -85,16 +85,6 @@ Rectangle {
8585 anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
8686 spacing: units.gu(1)
8787
88− EdgeBarrierControls {
89− id: edgeBarrierControls
90− text: "Drag here to pull out spread"
91− backgroundColor: "blue"
92− onDragged: { stage.pushRightEdge(amount); }
93− Component.onCompleted: {
94− edgeBarrierControls.target = testCase.findChild(stage, "edgeBarrierController");
95− }
96− }
97−
9888 Button {
9989 text: testCase.sideStage ? testCase.sideStage.shown ? "Hide Side-stage" : "Show Side-stage" : ""
10090 enabled: testCase.sideStage
tests/qmltests/tst_Shell.qml+4−4
@@ -2114,7 +2114,7 @@ Rectangle {
21142114 {tag: "forceClose", replug: false, tabletMode: false, screenSize: Qt.size(units.gu(20), units.gu(40)) },
21152115 {tag: "replug", replug: true, tabletMode: false, screenSize: Qt.size(units.gu(20), units.gu(40)) },
21162116 {tag: "forceClose+tablet", replug: false, tabletMode: true, screenSize: Qt.size(units.gu(90), units.gu(65)) },
2117− {tag: "replug+tablet", replug: true, tabletMode: true, screenSize: Qt.size(units.gu(90), units.gu(65)) }
2117+ {tag: "replug+tablet", replug: true, tabletMode: true, screenSize: Qt.size(units.gu(90), units.gu(65)) },
21182118 ];
21192119 }
21202120
@@ -2134,7 +2134,7 @@ Rectangle {
21342134 waitForRendering(shell);
21352135
21362136 // No legacy app running yet... Popup must *not* show.
2137− var popup = findChild(root, "modeSwitchWarningDialog");
2137+ var popup = findChild(dialogs, "modeSwitchWarningDialog", 1000);
21382138 compare(popup, null);
21392139
21402140 shell.usageScenario = "desktop"
@@ -2147,7 +2147,7 @@ Rectangle {
21472147 waitForRendering(shell);
21482148
21492149 // The popup must appear now, unless in "tablet" mode
2150− popup = findChild(root, "modeSwitchWarningDialog");
2150+ popup = findChild(dialogs, "modeSwitchWarningDialog", 1000);
21512151 if (data.tabletMode) {
21522152 verify(!popup);
21532153 } else {
@@ -2164,7 +2164,7 @@ Rectangle {
21642164 }
21652165
21662166 // Popup must be gone now
2167− popup = findChild(root, "modeSwitchWarningDialog");
2167+ popup = findChild(dialogs, "modeSwitchWarningDialog", 1000);
21682168 tryCompareFunction(function() { return popup === null}, true);
21692169
21702170 if (data.replug || data.tabletMode) {