@@ -139,12 +139,28 @@ Item {
139 tryCompare(panel, "x", -panel.width, 1000)
139 tryCompare(panel, "x", -panel.width, 1000)
143+ function test_teaseLauncher_data() {
145+ {tag: "tease - available", available: true},
146+ {tag: "tease - not available", available: false}
142− function test_teaseLauncher() {
150+ function test_teaseLauncher(data) {
143− launcher.maxPanelX = -99999999;
151+ launcher.available = data.available;
152+ launcher.maxPanelX = -launcher.panelWidth;
144 launcher.tease();
153 launcher.tease();
155+ if (data.available) {
145− // Check if the launcher slides in for units.gu(2). However, as the animation is 200ms
157+ // 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
158+ // 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)
159+ tryCompareFunction(function(){return launcher.maxPanelX >= -launcher.panelWidth + units.gu(2) - 2;}, true)
162+ compare(launcher.maxPanelX, -launcher.panelWidth, "Launcher moved even if it shouldn't")
148 waitUntilLauncherDisappears();
164 waitUntilLauncherDisappears();