@@ -293,6 +293,40 @@ Item {
293 tryCompare(left, "shown", true); // and we should still be on left
293 tryCompare(left, "shown", true); // and we should still be on left
296+ function test_spread() {
297+ // Unfortunately, most of what we want to test of the spread is
298+ // "did it render correctly?" but that's hard to test. So instead,
299+ // just poke and prod it a little bit to see if some of the values
300+ // we'd expect to be correct, are so.
302+ var right = goToPage("tutorialRight");
303+ var stage = findChild(right, "stage");
304+ var delegate0 = findChild(right, "appDelegate0");
306+ tryCompare(stage, "dragProgress", 0);
307+ touchFlick(shell, shell.width, halfHeight, shell.width * 0.8, halfHeight, true, false);
308+ verify(stage.dragProgress > 0);
309+ compare(stage.dragProgress, -delegate0.xTranslate);
310+ touchFlick(shell, shell.width * 0.8, halfHeight, shell.width, halfHeight, false, true);
311+ tryCompare(stage, "dragProgress", 0);
313+ tryCompare(delegate0, "x", shell.width);
315+ var screenshotImage = findChild(right, "screenshotImage");
316+ tryCompare(screenshotImage, "source", Qt.resolvedUrl("../../../qml/Tutorial/graphics/facebook.png"));
317+ tryCompare(screenshotImage, "visible", true);
320+ function test_bottomShortDrag() {
321+ var bottom = goToPage("tutorialBottom");
323+ touchFlick(shell, halfWidth, shell.height, halfWidth, shell.height * 0.8);
325+ var errorLabel = findChild(bottom, "errorLabel");
326+ tryCompare(bottom, "shown", true); // still on bottom page
327+ tryCompare(errorLabel, "opacity", 1); // show error
296 function test_interrupted() {
330 function test_interrupted() {
297 goToPage("tutorialLeft");
331 goToPage("tutorialLeft");
298 ApplicationManager.startApplication("dialer-app");
332 ApplicationManager.startApplication("dialer-app");