@@ -139,12 +139,28 @@ Item {
139139 tryCompare(panel, "x", -panel.width, 1000)
140140 }
141141
142− function test_teaseLauncher() {
143− launcher.maxPanelX = -99999999;
142+
143+ function test_teaseLauncher_data() {
144+ return [
145+ {tag: "tease - available", available: true},
146+ {tag: "tease - not available", available: false}
147+ ];
148+ }
149+
150+ function test_teaseLauncher(data) {
151+ launcher.available = data.available;
152+ launcher.maxPanelX = -launcher.panelWidth;
144153 launcher.tease();
145− // Check if the launcher slides in for units.gu(2). However, as the animation is 200ms
146− // and the teaseTimer's timeout too, give it a 2 pixels grace distance
147− tryCompareFunction(function(){return launcher.maxPanelX >= -launcher.panelWidth + units.gu(2) - 2;}, true)
154+
155+ if (data.available) {
156+
157+ // Check if the launcher slides in for units.gu(2). However, as the animation is 200ms
158+ // and the teaseTimer's timeout too, give it a 2 pixels grace distance
159+ tryCompareFunction(function(){return launcher.maxPanelX >= -launcher.panelWidth + units.gu(2) - 2;}, true)
160+ } else {
161+ wait(100)
162+ compare(launcher.maxPanelX, -launcher.panelWidth, "Launcher moved even if it shouldn't")
163+ }
148164 waitUntilLauncherDisappears();
149165 }
150166 }