@@ -199,54 +199,28 @@ Item {
199199 }
200200
201201 function goToPage(name) {
202− var page = waitForPage("tutorialIntro");
203− if (name === "tutorialIntro") return page;
204− tap(page);
205−
206− page = waitForPage("tutorialTop");
207− checkLeftEdge();
208− checkRightEdge();
209− checkBottomEdge();
210− if (name === "tutorialTop") return page;
211− touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
212−
213− page = waitForPage("tutorialTopFinish");
214− checkLeftEdge();
215− checkRightEdge();
216− checkBottomEdge();
217− if (name === "tutorialTopFinish") return page;
218− touchFlick(shell, halfWidth, shell.height, halfWidth, 0);
219−
220− page = waitForPage("tutorialLeft");
202+ var page = waitForPage("tutorialLeft");
221203 checkTopEdge();
222204 checkRightEdge();
223205 checkBottomEdge();
224206 if (name === "tutorialLeft") return page;
225− touchFlick(shell, 0, halfHeight, halfWidth, halfHeight, true, false);
207+ touchFlick(shell, 0, halfHeight, halfWidth, halfHeight);
226208
227− page = waitForPage("tutorialLeftRelease");
228− if (name === "tutorialLeftRelease") return page;
229− touchFlick(shell, halfWidth, halfHeight, halfWidth, halfHeight, false, true);
209+ page = waitForPage("tutorialLeftFinish");
210+ if (name === "tutorialLeftFinish") return page;
211+ var tick = findChild(page, "tick");
212+ tap(tick);
230213
231214 checkFinished();
232215 return null;
233216 }
234217
235− function test_skippable() {
236− var top = goToPage("tutorialTop");
237−
238− var skipLabel = findChild(top, "skipLabel");
239− tap(skipLabel);
240−
241− checkFinished();
242− }
243−
244218 function test_walkthrough() {
245219 goToPage(null);
246220 }
247221
248− function test_launcherShortDrags() {
249− // goToPage does a full launcher pull. But here we want to test
222+ function test_launcherShortDrag() {
223+ // goToPage does a normal launcher pull. But here we want to test
250224 // just barely pulling the launcher out and letting go (i.e. not
251225 // triggering the "progress" property of Launcher).
252226
@@ -263,23 +237,36 @@ Item {
263237 touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.9, halfHeight);
264238
265239 waitForPage("tutorialLeftFinish");
266− tap(launcher);
240+ }
267241
268− checkFinished();
242+ function test_launcherLongDrag() {
243+ // goToPage does a normal launcher pull. But here we want to test
244+ // a full pull across the page.
245+
246+ var left = goToPage("tutorialLeft");
247+
248+ var launcher = findChild(shell, "launcher");
249+ touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
250+
251+ var errorLabel = findChild(left, "errorLabel");
252+ tryCompare(launcher, "state", ""); // launcher goes away
253+ tryCompare(left, "shown", true); // still on left page
254+ tryCompare(errorLabel, "opacity", 1); // show error
269255 }
270256
271257 function test_launcherDragBack() {
272258 // goToPage does a full launcher pull. But here we test pulling
273259 // all the way out, then dragging back into place.
274260
275− goToPage("tutorialLeftRelease");
261+ var left = goToPage("tutorialLeft");
262+ touchFlick(shell, 0, halfHeight, halfWidth, halfHeight, true, false);
276263 touchFlick(shell, halfWidth, halfHeight, 0, halfHeight, false, true);
277264
278− checkFinished();
265+ tryCompare(left, "shown", true); // and we should still be on left
279266 }
280267
281268 function test_interrupted() {
282− goToPage("tutorialTop");
269+ goToPage("tutorialLeft");
283270 ApplicationManager.startApplication("dialer-app");
284271 checkFinished();
285272 }