on xenial help sign in
Show the Drawer tutorial for upgrading users
ad9f0bdDalton Durst
plugins/AccountsService/AccountsService.cpp+1−1
@@ -32,7 +32,7 @@
32#define IFACE_UNITY_PRIVATE QStringLiteral("com.canonical.unity.AccountsService.Private")
32#define IFACE_UNITY_PRIVATE QStringLiteral("com.canonical.unity.AccountsService.Private")
33
33
34#define PROP_BACKGROUND_FILE QStringLiteral("BackgroundFile")
34#define PROP_BACKGROUND_FILE QStringLiteral("BackgroundFile")
35−#define PROP_DEMO_EDGES QStringLiteral("demo-edges")
35+#define PROP_DEMO_EDGES QStringLiteral("DemoEdges2")
36#define PROP_DEMO_EDGES_COMPLETED QStringLiteral("DemoEdgesCompleted")
36#define PROP_DEMO_EDGES_COMPLETED QStringLiteral("DemoEdgesCompleted")
37#define PROP_EMAIL QStringLiteral("Email")
37#define PROP_EMAIL QStringLiteral("Email")
38#define PROP_ENABLE_FINGERPRINT_IDENTIFICATION QStringLiteral("EnableFingerprintIdentification")
38#define PROP_ENABLE_FINGERPRINT_IDENTIFICATION QStringLiteral("EnableFingerprintIdentification")
plugins/AccountsService/com.canonical.unity.AccountsService.xml+6
@@ -9,11 +9,17 @@
9 <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny"
9 <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny"
10 value="com.ubuntu.AccountsService.GreeterChangeAny"/>
10 value="com.ubuntu.AccountsService.GreeterChangeAny"/>
11
11
12+ <!-- Marks that V1 (pre-8.21) edge demos have been run. Legacy value. -->
12 <!-- Should have been named DemoEdges, sorry folks. -mterry -->
13 <!-- Should have been named DemoEdges, sorry folks. -mterry -->
13 <property name="demo-edges" type="b" access="readwrite">
14 <property name="demo-edges" type="b" access="readwrite">
14 <annotation name="org.freedesktop.Accounts.DefaultValue" value="true"/>
15 <annotation name="org.freedesktop.Accounts.DefaultValue" value="true"/>
15 </property>
16 </property>
16
17
18+ <!-- Marks that V2 (post-8.21) edge demos have been run -->
19+ <property name="DemoEdges2" type="b" access="readwrite">
20+ <annotation name="org.freedesktop.Accounts.DefaultValue" value="true"/>
21+ </property>
22+
17 <!-- List of tutorial pages that have been completed by the user -->
23 <!-- List of tutorial pages that have been completed by the user -->
18 <property name="DemoEdgesCompleted" type="as" access="readwrite">
24 <property name="DemoEdgesCompleted" type="as" access="readwrite">
19 <annotation name="org.freedesktop.Accounts.DefaultValue" value="[]"/>
25 <annotation name="org.freedesktop.Accounts.DefaultValue" value="[]"/>
qml/Tutorial/TutorialContent.qml+2−2
@@ -149,7 +149,7 @@ Item {
149 objectName: "tutorialLeftLongLoader"
149 objectName: "tutorialLeftLongLoader"
150 anchors.fill: parent
150 anchors.fill: parent
151
151
152− readonly property bool skipped: !d.mobileScenario || d.haveShown("left-long")
152+ readonly property bool skipped: !d.mobileScenario || d.haveShown("left-drawer")
153 readonly property bool shown: item && item.shown
153 readonly property bool shown: item && item.shown
154 active: !skipped || (item && item.visible)
154 active: !skipped || (item && item.visible)
155 onSkippedChanged: if (skipped && shown) item.hide()
155 onSkippedChanged: if (skipped && shown) item.hide()
@@ -178,7 +178,7 @@ Item {
178 }
178 }
179
179
180 onIsReadyChanged: if (isReady && !shown) tutorialLeftLongTimer.start()
180 onIsReadyChanged: if (isReady && !shown) tutorialLeftLongTimer.start()
181− onFinished: AccountsService.markDemoEdgeCompleted("left-long")
181+ onFinished: AccountsService.markDemoEdgeCompleted("left-drawer")
182 }
182 }
183 }
183 }
184
184
tests/autopilot/unity8/shell/fixture_setup.py+1−1
@@ -48,7 +48,7 @@ class Tutorial(fixtures.Fixture):
48 '/org/freedesktop/Accounts/User32011',
48 '/org/freedesktop/Accounts/User32011',
49 'org.freedesktop.DBus.Properties.Get',
49 'org.freedesktop.DBus.Properties.Get',
50 'string:com.canonical.unity.AccountsService',
50 'string:com.canonical.unity.AccountsService',
51− 'string:demo-edges'
51+ 'string:DemoEdges2'
52 ]
52 ]
53 output = subprocess.check_output(command, universal_newlines=True)
53 output = subprocess.check_output(command, universal_newlines=True)
54 return True if output.count('true') else False
54 return True if output.count('true') else False
tests/plugins/AccountsService/PropertiesServer.cpp+1−1
@@ -124,7 +124,7 @@ void PropertiesServer::internalSet(const QString &interface, const QString &prop
124
124
125void PropertiesServer::Reset()
125void PropertiesServer::Reset()
126{
126{
127− m_properties["com.canonical.unity.AccountsService"]["demo-edges"] = false;
127+ m_properties["com.canonical.unity.AccountsService"]["DemoEdges2"] = false;
128 m_properties["com.canonical.unity.AccountsService"]["DemoEdgesCompleted"] = QStringList();
128 m_properties["com.canonical.unity.AccountsService"]["DemoEdgesCompleted"] = QStringList();
129 m_properties["com.canonical.unity.AccountsService"]["LauncherItems"] = QVariant::fromValue(QList<QVariantMap>());
129 m_properties["com.canonical.unity.AccountsService"]["LauncherItems"] = QVariant::fromValue(QList<QVariantMap>());
130 m_properties["com.canonical.unity.AccountsService.Private"]["FailedLogins"] = 0;
130 m_properties["com.canonical.unity.AccountsService.Private"]["FailedLogins"] = 0;
tests/plugins/AccountsService/client.cpp+6−6
@@ -92,17 +92,17 @@ private Q_SLOTS:
92 {
92 {
93 // Test various invalid calls
93 // Test various invalid calls
94 AccountsServiceDBusAdaptor session;
94 AccountsServiceDBusAdaptor session;
95− QCOMPARE(session.getUserPropertyAsync("NOPE", "com.canonical.unity.AccountsService", "demo-edges").value(), QVariant());
95+ QCOMPARE(session.getUserPropertyAsync("NOPE", "com.canonical.unity.AccountsService", "DemoEdges2").value(), QVariant());
96 QCOMPARE(session.getUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "NOPE").value(), QVariant());
96 QCOMPARE(session.getUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "NOPE").value(), QVariant());
97 }
97 }
98
98
99 void testGetSetServiceDBusAdaptor()
99 void testGetSetServiceDBusAdaptor()
100 {
100 {
101 AccountsServiceDBusAdaptor session;
101 AccountsServiceDBusAdaptor session;
102− session.setUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "demo-edges", QVariant(true)).waitForFinished();
102+ session.setUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "DemoEdges2", QVariant(true)).waitForFinished();
103− QCOMPARE(session.getUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "demo-edges").value(), QVariant(true));
103+ QCOMPARE(session.getUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "DemoEdges2").value(), QVariant(true));
104− session.setUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "demo-edges", QVariant(false)).waitForFinished();
104+ session.setUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "DemoEdges2", QVariant(false)).waitForFinished();
105− QCOMPARE(session.getUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "demo-edges").value(), QVariant(false));
105+ QCOMPARE(session.getUserPropertyAsync(QTest::currentTestFunction(), "com.canonical.unity.AccountsService", "DemoEdges2").value(), QVariant(false));
106 }
106 }
107
107
108 void testGetSetService()
108 void testGetSetService()
@@ -162,7 +162,7 @@ private Q_SLOTS:
162 QCOMPARE(session.demoEdges(), false);
162 QCOMPARE(session.demoEdges(), false);
163 ASSERT_DBUS_CALL(m_userInterface->call("Set",
163 ASSERT_DBUS_CALL(m_userInterface->call("Set",
164 "com.canonical.unity.AccountsService",
164 "com.canonical.unity.AccountsService",
165− "demo-edges",
165+ "DemoEdges2",
166 dbusVariant(true)));
166 dbusVariant(true)));
167 QTRY_COMPARE(session.demoEdges(), true);
167 QTRY_COMPARE(session.demoEdges(), true);
168 }
168 }
tests/qmltests/Tutorial/tst_Tutorial.qml+7−7
@@ -361,7 +361,7 @@ Rectangle {
361 var tutorialRight = findChild(shell, "tutorialRight");
361 var tutorialRight = findChild(shell, "tutorialRight");
362 var tutorialRightTimer = findChild(tutorialRight, "tutorialRightTimer");
362 var tutorialRightTimer = findChild(tutorialRight, "tutorialRightTimer");
363
363
364− AccountsService.demoEdgesCompleted = ["top", "left", "left-long"];
364+ AccountsService.demoEdgesCompleted = ["top", "left", "left-drawer"];
365 ApplicationManager.startApplication("facebook-webapp");
365 ApplicationManager.startApplication("facebook-webapp");
366
366
367 tryCompare(tutorialLeftLongLoader, "active", false);
367 tryCompare(tutorialLeftLongLoader, "active", false);
@@ -457,7 +457,7 @@ Rectangle {
457 touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
457 touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
458
458
459 tryCompare(tutorialLeftLongLoader, "shown", false);
459 tryCompare(tutorialLeftLongLoader, "shown", false);
460− tryCompare(AccountsService, "demoEdgesCompleted", ["top", "left", "left-long"]);
460+ tryCompare(AccountsService, "demoEdgesCompleted", ["top", "left", "left-drawer"]);
461 }
461 }
462
462
463 function test_tutorialLeftAutoSkipped() {
463 function test_tutorialLeftAutoSkipped() {
@@ -573,7 +573,7 @@ Rectangle {
573 openTutorialRight();
573 openTutorialRight();
574 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
574 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
575
575
576− tryCompare(AccountsService, "demoEdgesCompleted", ["top", "left", "left-long", "right"]);
576+ tryCompare(AccountsService, "demoEdgesCompleted", ["top", "left", "left-drawer", "right"]);
577 tryCompare(AccountsService, "demoEdges", false);
577 tryCompare(AccountsService, "demoEdges", false);
578 }
578 }
579
579
@@ -603,7 +603,7 @@ Rectangle {
603 ApplicationManager.startApplication("gallery-app");
603 ApplicationManager.startApplication("gallery-app");
604 tryCompare(ApplicationManager, "count", 1);
604 tryCompare(ApplicationManager, "count", 1);
605
605
606− AccountsService.demoEdgesCompleted = ["top", "left", "left-long"];
606+ AccountsService.demoEdgesCompleted = ["top", "left", "left-drawer"];
607 verify(tutorialRightTimer.running);
607 verify(tutorialRightTimer.running);
608 verify(!tutorialRightLoader.shown);
608 verify(!tutorialRightLoader.shown);
609 tutorialRightTimer.interval = 1;
609 tutorialRightTimer.interval = 1;
@@ -622,7 +622,7 @@ Rectangle {
622 ApplicationManager.startApplication("facebook-webapp");
622 ApplicationManager.startApplication("facebook-webapp");
623 tryCompare(ApplicationManager, "count", 1);
623 tryCompare(ApplicationManager, "count", 1);
624
624
625− AccountsService.demoEdgesCompleted = ["top", "left", "left-long"];
625+ AccountsService.demoEdgesCompleted = ["top", "left", "left-drawer"];
626 tryCompare(tutorialLeftLongLoader, "skipped", true);
626 tryCompare(tutorialLeftLongLoader, "skipped", true);
627 verify(tutorialRightTimer.running);
627 verify(tutorialRightTimer.running);
628 tryCompare(tutorialRight, "isReady", true);
628 tryCompare(tutorialRight, "isReady", true);
@@ -631,7 +631,7 @@ Rectangle {
631 wait(1000);
631 wait(1000);
632
632
633 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
633 touchFlick(shell, shell.width, halfHeight, 0, halfHeight);
634− tryCompare(AccountsService, "demoEdgesCompleted", ["top", "left", "left-long", "right"]);
634+ tryCompare(AccountsService, "demoEdgesCompleted", ["top", "left", "left-drawer", "right"]);
635 }
635 }
636
636
637 function test_activeCallInterruptsTutorial() {
637 function test_activeCallInterruptsTutorial() {
@@ -683,7 +683,7 @@ Rectangle {
683 verify(!tutorialRight.isReady);
683 verify(!tutorialRight.isReady);
684 verify(!tutorialRight.shown);
684 verify(!tutorialRight.shown);
685 verify(!tutorialRight.paused);
685 verify(!tutorialRight.paused);
686− compare(AccountsService.demoEdgesCompleted, ["top", "left", "left-long"]);
686+ compare(AccountsService.demoEdgesCompleted, ["top", "left", "left-drawer"]);
687 }
687 }
688
688
689 function test_desktopOnlyShowsTutorialRight() {
689 function test_desktopOnlyShowsTutorialRight() {