@@ -199,54 +199,28 @@ Item {
201 function goToPage(name) {
201 function goToPage(name) {
202− var page = waitForPage("tutorialIntro");
202+ var page = waitForPage("tutorialLeft");
203− if (name === "tutorialIntro") return page;
206− page = waitForPage("tutorialTop");
210− if (name === "tutorialTop") return page;
211− touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
213− page = waitForPage("tutorialTopFinish");
217− if (name === "tutorialTopFinish") return page;
218− touchFlick(shell, halfWidth, shell.height, halfWidth, 0);
220− page = waitForPage("tutorialLeft");
221 checkTopEdge();
203 checkTopEdge();
222 checkRightEdge();
204 checkRightEdge();
223 checkBottomEdge();
205 checkBottomEdge();
224 if (name === "tutorialLeft") return page;
206 if (name === "tutorialLeft") return page;
225− touchFlick(shell, 0, halfHeight, halfWidth, halfHeight, true, false);
207+ touchFlick(shell, 0, halfHeight, halfWidth, halfHeight);
227− page = waitForPage("tutorialLeftRelease");
209+ page = waitForPage("tutorialLeftFinish");
228− if (name === "tutorialLeftRelease") return page;
210+ if (name === "tutorialLeftFinish") return page;
229− touchFlick(shell, halfWidth, halfHeight, halfWidth, halfHeight, false, true);
211+ var tick = findChild(page, "tick");
231 checkFinished();
214 checkFinished();
232 return null;
215 return null;
235− function test_skippable() {
236− var top = goToPage("tutorialTop");
238− var skipLabel = findChild(top, "skipLabel");
244 function test_walkthrough() {
218 function test_walkthrough() {
245 goToPage(null);
219 goToPage(null);
248− function test_launcherShortDrags() {
222+ function test_launcherShortDrag() {
249− // goToPage does a full launcher pull. But here we want to test
223+ // goToPage does a normal launcher pull. But here we want to test
250 // just barely pulling the launcher out and letting go (i.e. not
224 // just barely pulling the launcher out and letting go (i.e. not
251 // triggering the "progress" property of Launcher).
225 // triggering the "progress" property of Launcher).
@@ -263,23 +237,36 @@ Item {
263 touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.9, halfHeight);
237 touchFlick(shell, 0, halfHeight, launcher.panelWidth * 0.9, halfHeight);
265 waitForPage("tutorialLeftFinish");
239 waitForPage("tutorialLeftFinish");
266− tap(launcher);
240+ }
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.
246+ var left = goToPage("tutorialLeft");
248+ var launcher = findChild(shell, "launcher");
249+ touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
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
271 function test_launcherDragBack() {
257 function test_launcherDragBack() {
272 // goToPage does a full launcher pull. But here we test pulling
258 // goToPage does a full launcher pull. But here we test pulling
273 // all the way out, then dragging back into place.
259 // all the way out, then dragging back into place.
275− goToPage("tutorialLeftRelease");
261+ var left = goToPage("tutorialLeft");
262+ touchFlick(shell, 0, halfHeight, halfWidth, halfHeight, true, false);
276 touchFlick(shell, halfWidth, halfHeight, 0, halfHeight, false, true);
263 touchFlick(shell, halfWidth, halfHeight, 0, halfHeight, false, true);
278− checkFinished();
265+ tryCompare(left, "shown", true); // and we should still be on left
281 function test_interrupted() {
268 function test_interrupted() {
282− goToPage("tutorialTop");
269+ goToPage("tutorialLeft");
283 ApplicationManager.startApplication("dialer-app");
270 ApplicationManager.startApplication("dialer-app");
284 checkFinished();
271 checkFinished();