on xenial help sign in
Fix Tutorial qmluitest too, whoops!
5b38a05Michael Terry
tests/mocks/Unity/Application/SurfaceManager.cpp+1
@@ -63,6 +63,7 @@ MirSurface *SurfaceManager::inputMethodSurface()
63 if (!m_virtualKeyboard) {
63 if (!m_virtualKeyboard) {
64 m_virtualKeyboard = new VirtualKeyboard;
64 m_virtualKeyboard = new VirtualKeyboard;
65 connect(m_virtualKeyboard, &QObject::destroyed, this, [this](QObject *obj) {
65 connect(m_virtualKeyboard, &QObject::destroyed, this, [this](QObject *obj) {
66+ m_virtualKeyboard = nullptr;
66 MirSurface* surface = qobject_cast<MirSurface*>(obj);
67 MirSurface* surface = qobject_cast<MirSurface*>(obj);
67 Q_EMIT surfaceDestroyed(surface);
68 Q_EMIT surfaceDestroyed(surface);
68 });
69 });
tests/qmltests/Tutorial/tst_Tutorial.qml+14−15
@@ -309,7 +309,7 @@ Rectangle {
309 var tutorialTopTimer = findInvisibleChild(tutorialTop, "tutorialTopTimer");
309 var tutorialTopTimer = findInvisibleChild(tutorialTop, "tutorialTopTimer");
310
310
311 tutorialTopTimer.interval = 1;
311 tutorialTopTimer.interval = 1;
312− AccountsService.demoEdgesCompleted = ["left"];
312+ AccountsService.demoEdgesCompleted = ["left", "left-long"];
313
313
314 tryCompare(tutorialLeftLoader, "active", false);
314 tryCompare(tutorialLeftLoader, "active", false);
315 tryCompare(tutorialTop, "shown", true);
315 tryCompare(tutorialTop, "shown", true);
@@ -320,7 +320,7 @@ Rectangle {
320 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
320 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
321 var tutorialRight = findChild(shell, "tutorialRight");
321 var tutorialRight = findChild(shell, "tutorialRight");
322
322
323− AccountsService.demoEdgesCompleted = ["left", "top"];
323+ AccountsService.demoEdgesCompleted = ["left", "left-long", "top"];
324 ApplicationManager.startApplication("gallery-app");
324 ApplicationManager.startApplication("gallery-app");
325 ApplicationManager.startApplication("facebook-webapp");
325 ApplicationManager.startApplication("facebook-webapp");
326
326
@@ -333,7 +333,7 @@ Rectangle {
333 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
333 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
334 var tutorialBottom = findChild(shell, "tutorialBottom");
334 var tutorialBottom = findChild(shell, "tutorialBottom");
335
335
336− AccountsService.demoEdgesCompleted = ["left", "top", "right"];
336+ AccountsService.demoEdgesCompleted = ["left", "left-long", "top", "right"];
337 ApplicationManager.startApplication("dialer-app");
337 ApplicationManager.startApplication("dialer-app");
338
338
339 tryCompare(tutorialLeftLoader, "active", false);
339 tryCompare(tutorialLeftLoader, "active", false);
@@ -456,7 +456,7 @@ Rectangle {
456 touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
456 touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
457
457
458 tryCompare(tutorialTop, "shown", false);
458 tryCompare(tutorialTop, "shown", false);
459− tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top"]);
459+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "left-long", "top"]);
460 tryCompare(panel.indicators, "fullyOpened", true);
460 tryCompare(panel.indicators, "fullyOpened", true);
461 }
461 }
462
462
@@ -482,12 +482,12 @@ Rectangle {
482
482
483 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
483 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
484 var tutorialTop = findChild(shell, "tutorialTop");
484 var tutorialTop = findChild(shell, "tutorialTop");
485− AccountsService.demoEdgesCompleted = ["left"];
485+ AccountsService.demoEdgesCompleted = ["left", "left-long"];
486 tryCompare(tutorialLeftLoader, "active", false);
486 tryCompare(tutorialLeftLoader, "active", false);
487 verify(!tutorialTop.shown);
487 verify(!tutorialTop.shown);
488
488
489 touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
489 touchFlick(shell, halfWidth, 0, halfWidth, shell.height);
490− tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top"]);
490+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "left-long", "top"]);
491 }
491 }
492
492
493 function test_tutorialRightEdges() {
493 function test_tutorialRightEdges() {
@@ -518,7 +518,7 @@ Rectangle {
518 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
518 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
519
519
520 tryCompare(tutorialRight, "shown", false);
520 tryCompare(tutorialRight, "shown", false);
521− tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top", "right"]);
521+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "left-long", "top", "right"]);
522 }
522 }
523
523
524 function test_tutorialRightShortDrag() {
524 function test_tutorialRightShortDrag() {
@@ -550,7 +550,7 @@ Rectangle {
550 ApplicationManager.startApplication("facebook-webapp");
550 ApplicationManager.startApplication("facebook-webapp");
551 tryCompare(ApplicationManager, "count", 3);
551 tryCompare(ApplicationManager, "count", 3);
552
552
553− AccountsService.demoEdgesCompleted = ["left", "top"];
553+ AccountsService.demoEdgesCompleted = ["left", "left-long", "top"];
554 verify(tutorialRightTimer.running, true);
554 verify(tutorialRightTimer.running, true);
555 verify(!tutorialRight.shown);
555 verify(!tutorialRight.shown);
556 tryCompare(tutorialRight, "shown", true);
556 tryCompare(tutorialRight, "shown", true);
@@ -560,11 +560,11 @@ Rectangle {
560 // Test that we skip the tutorial if user uses right edge themselves
560 // Test that we skip the tutorial if user uses right edge themselves
561
561
562 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
562 var tutorialLeftLoader = findChild(shell, "tutorialLeftLoader");
563− AccountsService.demoEdgesCompleted = ["left"];
563+ AccountsService.demoEdgesCompleted = ["left", "left-long"];
564 tryCompare(tutorialLeftLoader, "active", false);
564 tryCompare(tutorialLeftLoader, "active", false);
565
565
566 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
566 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
567− tryCompare(AccountsService, "demoEdgesCompleted", ["left", "right"]);
567+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "left-long", "right"]);
568 }
568 }
569
569
570 function test_tutorialBottomEdges() {
570 function test_tutorialBottomEdges() {
@@ -596,14 +596,13 @@ Rectangle {
596 touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
596 touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
597
597
598 tryCompare(tutorialBottom, "shown", false);
598 tryCompare(tutorialBottom, "shown", false);
599− tryCompare(AccountsService, "demoEdgesCompleted", ["left", "top", "right", "bottom-dialer-app"]);
599+ tryCompare(AccountsService, "demoEdgesCompleted", ["left", "left-long", "top", "right", "bottom-dialer-app"]);
600
600
601 // OK, we did one, just confirm that when all are done, we mark whole tutorial as done.
601 // OK, we did one, just confirm that when all are done, we mark whole tutorial as done.
602 verify(AccountsService.demoEdges);
602 verify(AccountsService.demoEdges);
603− AccountsService.demoEdgesCompleted = ["left", "top", "right",
603+ AccountsService.demoEdgesCompleted = ["left", "left-long", "top", "right",
604 "bottom-address-book-app",
604 "bottom-address-book-app",
605 "bottom-com.ubuntu.calculator_calculator",
605 "bottom-com.ubuntu.calculator_calculator",
606− "bottom-com.ubuntu.clock_clock",
607 "bottom-dialer-app",
606 "bottom-dialer-app",
608 "bottom-messaging-app"];
607 "bottom-messaging-app"];
609 verify(!AccountsService.demoEdges);
608 verify(!AccountsService.demoEdges);
@@ -617,7 +616,7 @@ Rectangle {
617 var tutorialRight = findChild(shell, "tutorialRight");
616 var tutorialRight = findChild(shell, "tutorialRight");
618 var tutorialBottom = findChild(shell, "tutorialBottom");
617 var tutorialBottom = findChild(shell, "tutorialBottom");
619
618
620− AccountsService.demoEdgesCompleted = ["left", "top"];
619+ AccountsService.demoEdgesCompleted = ["left", "left-long", "top"];
621 ApplicationManager.startApplication("gallery-app");
620 ApplicationManager.startApplication("gallery-app");
622 ApplicationManager.startApplication("dialer-app");
621 ApplicationManager.startApplication("dialer-app");
623
622
@@ -717,7 +716,7 @@ Rectangle {
717 verify(!tutorialRight.isReady);
716 verify(!tutorialRight.isReady);
718 verify(!tutorialRight.shown);
717 verify(!tutorialRight.shown);
719 verify(!tutorialRight.paused);
718 verify(!tutorialRight.paused);
720− compare(AccountsService.demoEdgesCompleted, ["left", "top"]);
719+ compare(AccountsService.demoEdgesCompleted, ["left", "left-long", "top"]);
721 }
720 }
722
721
723 function test_desktopOnlyShowsTutorialRight() {
722 function test_desktopOnlyShowsTutorialRight() {