Merge lp:~josharenson/unity8/qa_helpers into lp:unity8

Proposed by Josh Arenson
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1767
Merged at revision: 1823
Proposed branch: lp:~josharenson/unity8/qa_helpers
Merge into: lp:unity8
Diff against target: 620 lines (+238/-166)
12 files modified
qml/Greeter/ShimGreeter.qml (+45/-0)
qml/Shell.qml (+56/-43)
qml/Stages/ShimStage.qml (+44/-0)
tests/autopilot/unity8/application_lifecycle/tests/__init__.py (+2/-2)
tests/autopilot/unity8/greeter/__init__.py (+52/-0)
tests/autopilot/unity8/indicators/tests/__init__.py (+1/-1)
tests/autopilot/unity8/process_helpers.py (+9/-96)
tests/autopilot/unity8/shell/tests/test_emulators.py (+2/-2)
tests/autopilot/unity8/shell/tests/test_notifications.py (+22/-22)
tests/qmltests/Tutorial/tst_Tutorial.qml (+1/-0)
tests/qmltests/tst_Shell.qml (+2/-0)
tests/qmltests/tst_ShellWithPin.qml (+2/-0)
To merge this branch: bzr merge lp:~josharenson/unity8/qa_helpers
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Abstain
Albert Astals Cid (community) Abstain
PS Jenkins bot (community) continuous-integration Needs Fixing
Leo Arias (community) Approve
Review via email: mp+258435@code.launchpad.net

Commit message

Refactor greeter emulator to unlock the greeter via dbus

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

Thanks Josh.
A couple of things.

The idea is to use these helpers before autopilot comes to play, so it's better to keep them at the module level instead of getting them as methods in the greeter autopilot custom proxy object.
The namespace of helpers is currently a little mess, so I would put them in tests/autopilot/unity8/greeter/__init__.py instead of where you put them. I have a branch in progress to solve the mess:
https://code.launchpad.net/~canonical-platform-qa/unity8/fix1306340-deprecate_emulators/+merge/257812

Next, I think we can remove the other part of unlock calling wait_for_greeter. But I'm not quite sure about this.
Take a look at my diff: http://paste.ubuntu.com/11014223/
Be warned that I didn't have time to run it, so my assumptions might be wrong or I might have left a stupid mistake.

Last think, please make sure that the code you touch passes the static checks. Call:

python3 -m flake8 .

I'm leaving for lunch, but I'll have time later and tomorrow, in case you need me.

review: Needs Fixing
Revision history for this message
Josh Arenson (josharenson) wrote :

Added a way to lock the greeter via dbus too. Makes everything simpler and eliminates a bit of namespace pollution. The wait_for_greeter check is just run in reverse for the lock. The few manual test I ran seemed ok.

Revision history for this message
Leo Arias (elopio) wrote :

Cool! Even more than what I asked for.

You have these flake8 errors:

http://paste.ubuntu.com/11016895/

And you can now remove the unity_proxy_obj argument from:

67 def unlock_unity(unity_proxy_obj=None):
120 def lock_unity(unity_proxy_obj=None):

Revision history for this message
Josh Arenson (josharenson) wrote :

Fixed :-)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

:)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

oh crap. Removing the argument from unlock caused a lot of failures from the tests that were passing it.

review: Needs Fixing
Revision history for this message
Josh Arenson (josharenson) wrote :

> oh crap. Removing the argument from unlock caused a lot of failures from the
> tests that were passing it.

Humm so add an unused arg or refactor everything... I'll try the refactor first and see how ugly it gets.

Revision history for this message
Josh Arenson (josharenson) wrote :

Refactored.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Josh Arenson (josharenson) wrote :
Revision history for this message
Leo Arias (elopio) wrote :

Thank you!

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
If it's good for Leo it's good for us

 * Did CI run pass?
Known broken AP test

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/autopilot/unity8/indicators/tests/__init__.py
Text conflict in tests/autopilot/unity8/process_helpers.py
2 conflicts encountered.

review: Needs Fixing
lp:~josharenson/unity8/qa_helpers updated
1767. By Josh Arenson

Resolved merge conflicts

[ Albert Astals Cid ]
* Make runtests fake a test error if make fails
* Make the test more stable
* Use dbus-test-runner instead of dbus-launch
* DirectionalDragArea: improvements & API grooming (LP: #1417920)
* Fix EdgeDragEvaluator when a drag can happen both ways
  (Direction.Horizontal)
[ Josh Arenson ]
* Remove panelHeight property as it is unused.
[ Leo Arias ]
* Initial clean up of the autopilot tests set up. Removed the touch
  device from the test case. Moved the restart of unity to a fixture.
  Removed the unused DragMixin. Updated the setUpClass to use
  process_helpers. Removed the workaround for bug #1238417, already
  fixed. Use the toolkit helper to set the testability environment
  variable. Fixed the indicators base class that was restarting unity
  twice. (LP: #1238417, #1447206)
* Use the base class from the toolkit in autopilot tests.
[ Michael Zanetti ]
* emit application-stop when we're going down (LP: #1326513)
[ Michał Sawicz ]
* UNITY_SCOPES_LIST is no more
[ handsome_feng<email address hidden> ]
* When click the favorite scope in Dash Manager , it just return to
  the corresponding scope page. (LP: #1447056)

Revision history for this message
Josh Arenson (josharenson) wrote :

Resolved and striped tags.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) :
review: Abstain
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Needs a merge

review: Needs Fixing
lp:~josharenson/unity8/qa_helpers updated
1768. By Josh Arenson

* No-change rebuild against Qt 5.4.2.
[ Michał Sawicz ]
* Implement full-shell rotation (LP: #1210199)
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Daniel d'Andrada ]
* Implemented autopilot-test and fake-sensors for shell-rotation.
[ Mirco Müller ]
* Implemented autopilot-test and fake-sensors for shell-rotation.
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Renato Araujo Oliveira Filho ]
* Set the device led color to green. (LP: #1450894)
[ Albert Astals Cid ]
* Add overrides to override functions
* Implement "rating-edit" preview widget (LP: #1318144)
* Make the DashContent::test_mainNavigation test more stable (LP:
  #1450809)
* Use art height as implicitHeight when the header is overlayed and
  there's no summary
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Daniel d'Andrada ]
* Introducing FloatingFlickable
* Make Ubuntu.Gestures components install TouchRegistry by themselves
[ Michael Terry ]
* Fix a possible crash in our PAM threading code. (LP: #1425362) (LP:
  #1425362)
* Fix the lockscreen becoming unresponsive after testing an app on the
  device from QtCreator. (LP: #1435364)
[ Nick Dedekind ]
* Fixed desktop stage app focus.
* Fixed issue in laggy indicator autpilot tests (LP: #1446846)
[ Albert Astals Cid ]
* Workarounds for concierge mode.
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.

Revision history for this message
Michael Zanetti (mzanetti) :
review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'qml/Greeter/ShimGreeter.qml'
--- qml/Greeter/ShimGreeter.qml 1970-01-01 00:00:00 +0000
+++ qml/Greeter/ShimGreeter.qml 2015-06-16 19:33:06 +0000
@@ -0,0 +1,45 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.3
18
19/*
20 * This is a shim greeter that is only used to provide a shell,
21 * running without a greeter, the requisite information
22 *
23 */
24
25/* FIXME: this shuld be fine as a QtObject, but bug lp:1447391
26 * dictates wrapping as an item instead
27 */
28Item {
29 id: shimGreeter
30
31 readonly property bool active: false
32 readonly property bool hasLockedApp: lockedApp !== ""
33 readonly property bool locked: false
34 readonly property bool shown: false
35 readonly property bool waiting: false
36
37 property string lockedApp: ""
38
39 // Since ShimGreeter is never active, these can just return
40 property var forceShow: (function() { return; })
41 property var notifyAboutToFocusApp: (function(appId) { return; })
42 property var notifyAppFocused: (function(appId) { return; })
43 property var notifyShowingDashFromDrag: (function(appId) { return false; })
44
45}
046
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2015-06-12 16:07:43 +0000
+++ qml/Shell.qml 2015-06-16 19:33:06 +0000
@@ -111,6 +111,8 @@
111 // This is _only_ used to expose the property to autopilot tests111 // This is _only_ used to expose the property to autopilot tests
112 readonly property string testShellMode: shellMode112 readonly property string testShellMode: shellMode
113113
114 readonly property alias greeter: greeterLoader.item
115
114 function activateApplication(appId) {116 function activateApplication(appId) {
115 if (ApplicationManager.findApplication(appId)) {117 if (ApplicationManager.findApplication(appId)) {
116 ApplicationManager.requestFocusApplication(appId);118 ApplicationManager.requestFocusApplication(appId);
@@ -262,7 +264,9 @@
262 ? "phone"264 ? "phone"
263 : shell.usageScenario265 : shell.usageScenario
264 source: {266 source: {
265 if (applicationsDisplayLoader.usageScenario === "phone") {267 if(shellMode === "greeter") {
268 return "Stages/ShimStage.qml"
269 } else if (applicationsDisplayLoader.usageScenario === "phone") {
266 return "Stages/PhoneStage.qml";270 return "Stages/PhoneStage.qml";
267 } else if (applicationsDisplayLoader.usageScenario === "tablet") {271 } else if (applicationsDisplayLoader.usageScenario === "tablet") {
268 return "Stages/TabletStage.qml";272 return "Stages/TabletStage.qml";
@@ -414,50 +418,59 @@
414 }418 }
415 }419 }
416420
417 Greeter {421 Loader {
418 id: greeter422 id: greeterLoader
419 objectName: "greeter"
420
421 hides: [launcher, panel.indicators]
422 tabletMode: shell.usageScenario !== "phone"
423 launcherOffset: launcher.progress
424 forcedUnlock: tutorial.running
425 background: shell.background
426
427 anchors.fill: parent423 anchors.fill: parent
428 anchors.topMargin: panel.panelHeight424 anchors.topMargin: panel.panelHeight
429425 sourceComponent: shellMode != "shell" ? integratedGreeter :
430 // avoid overlapping with Launcher's edge drag area426 Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
431 // FIXME: Fix TouchRegistry & friends and remove this workaround427 onLoaded: {
432 // Issue involves launcher's DDA getting disabled on a long428 item.objectName = "greeter"
433 // left-edge drag429 }
434 dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0430 }
435431
436 onSessionStarted: {432 Component {
437 launcher.hide();433 id: integratedGreeter
438 }434 Greeter {
439435
440 onTease: {436 hides: [launcher, panel.indicators]
441 if (!tutorial.running) {437 tabletMode: shell.sideStageEnabled
442 launcher.tease();438 launcherOffset: launcher.progress
443 }439 forcedUnlock: tutorial.running
444 }440 background: shell.background
445441
446 onEmergencyCall: startLockedApp("dialer-app")442 // avoid overlapping with Launcher's edge drag area
447443 // FIXME: Fix TouchRegistry & friends and remove this workaround
448 Timer {444 // Issue involves launcher's DDA getting disabled on a long
449 // See powerConnection for why this is useful445 // left-edge drag
450 id: showGreeterDelayed446 dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
451 interval: 1447
452 onTriggered: {448 onSessionStarted: {
453 greeter.forceShow();449 launcher.hide();
454 }450 }
455 }451
456452 onTease: {
457 Binding {453 if (!tutorial.running) {
458 target: ApplicationManager454 launcher.tease();
459 property: "suspended"455 }
460 value: greeter.shown456 }
457
458 onEmergencyCall: startLockedApp("dialer-app")
459
460 Binding {
461 target: ApplicationManager
462 property: "suspended"
463 value: greeter.shown
464 }
465 }
466 }
467
468 Timer {
469 // See powerConnection for why this is useful
470 id: showGreeterDelayed
471 interval: 1
472 onTriggered: {
473 greeter.forceShow();
461 }474 }
462 }475 }
463476
464477
=== added file 'qml/Stages/ShimStage.qml'
--- qml/Stages/ShimStage.qml 1970-01-01 00:00:00 +0000
+++ qml/Stages/ShimStage.qml 2015-06-16 19:33:06 +0000
@@ -0,0 +1,44 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.3
18import Ubuntu.Components 0.1
19
20Rectangle {
21 id: shimStage
22
23 anchors.fill: parent
24 color: UbuntuColors.lightAubergine
25
26 Text {
27 id: greeterModeText
28
29 anchors.horizontalCenter: parent.horizontalCenter
30 anchors.top: parent.top
31 anchors.topMargin: units.gu(10)
32 font.bold: true
33 horizontalAlignment: Text.AlignHCenter
34 text: "Shell is in \"greeter\" mode"
35 }
36
37 Text {
38 anchors.centerIn: parent
39 color: UbuntuColors.orange
40 font.pointSize: units.gu(8)
41 horizontalAlignment: Text.AlignHCenter
42 text: "Shim \nStage"
43 }
44}
045
=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/__init__.py'
--- tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2015-02-23 17:29:04 +0000
+++ tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2015-06-16 19:33:06 +0000
@@ -31,8 +31,8 @@
31 super().setUp()31 super().setUp()
32 self._qml_mock_enabled = False32 self._qml_mock_enabled = False
33 self._data_dirs_mock_enabled = False33 self._data_dirs_mock_enabled = False
34 unity_proxy = self.launch_unity()34 self.launch_unity()
35 process_helpers.unlock_unity(unity_proxy)35 process_helpers.unlock_unity()
3636
37 def create_test_application(self):37 def create_test_application(self):
38 desktop_file_dict = fixture_setup.DEFAULT_DESKTOP_FILE_DICT38 desktop_file_dict = fixture_setup.DEFAULT_DESKTOP_FILE_DICT
3939
=== modified file 'tests/autopilot/unity8/greeter/__init__.py'
--- tests/autopilot/unity8/greeter/__init__.py 2015-03-23 23:40:27 +0000
+++ tests/autopilot/unity8/greeter/__init__.py 2015-06-16 19:33:06 +0000
@@ -0,0 +1,52 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Unity Autopilot Test Suite
4# Copyright (C) 2015 Canonical
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19
20import dbus
21
22from autopilot.matchers import Eventually
23from testtools.matchers import Equals
24
25
26def hide_greeter_with_dbus():
27 dbus_proxy = _get_greeter_dbus_proxy()
28 if _is_greeter_active():
29 dbus_proxy.HideGreeter()
30
31
32def show_greeter_with_dbus():
33 dbus_proxy = _get_greeter_dbus_proxy()
34 if not _is_greeter_active():
35 dbus_proxy.ShowGreeter()
36
37
38def wait_for_greeter():
39 Eventually(Equals(True), timeout=300).match(_is_greeter_active)
40
41
42def _get_greeter_dbus_proxy():
43 bus = dbus.SessionBus()
44 return bus.get_object('com.canonical.UnityGreeter', '/')
45
46
47def _is_greeter_active():
48 try:
49 dbus_proxy = _get_greeter_dbus_proxy()
50 return dbus_proxy.Get('com.canonical.UnityGreeter', 'IsActive')
51 except:
52 return False
053
=== modified file 'tests/autopilot/unity8/indicators/tests/__init__.py'
--- tests/autopilot/unity8/indicators/tests/__init__.py 2015-05-11 14:36:03 +0000
+++ tests/autopilot/unity8/indicators/tests/__init__.py 2015-06-16 19:33:06 +0000
@@ -31,7 +31,7 @@
31 def setUp(self):31 def setUp(self):
32 super().setUp()32 super().setUp()
33 self.unity_proxy = self.launch_unity()33 self.unity_proxy = self.launch_unity()
34 process_helpers.unlock_unity(self.unity_proxy)34 process_helpers.unlock_unity()
3535
3636
37class DeviceIndicatorTestCase(IndicatorTestCase):37class DeviceIndicatorTestCase(IndicatorTestCase):
3838
=== modified file 'tests/autopilot/unity8/process_helpers.py'
--- tests/autopilot/unity8/process_helpers.py 2015-05-11 14:36:03 +0000
+++ tests/autopilot/unity8/process_helpers.py 2015-06-16 19:33:06 +0000
@@ -19,14 +19,11 @@
1919
20import logging20import logging
21import subprocess21import subprocess
22import dbus
2322
24import ubuntuuitoolkit23import ubuntuuitoolkit
25from autopilot.exceptions import ProcessSearchError
26from autopilot.introspection import get_proxy_object_for_existing_process24from autopilot.introspection import get_proxy_object_for_existing_process
2725
28from unity8.shell import emulators26from unity8 import greeter
29from unity8.shell.emulators import main_window as main_window_emulator
3027
31logger = logging.getLogger(__name__)28logger = logging.getLogger(__name__)
3229
@@ -39,104 +36,20 @@
39 pass36 pass
4037
4138
42def unlock_unity(unity_proxy_obj=None):39def unlock_unity():
43 """Helper function that attempts to unlock the unity greeter.40 """Helper function that attempts to unlock the unity greeter.
4441
45 If unity_proxy_object is None create a proxy object by querying for the
46 running unity process.
47 Otherwise re-use the passed proxy object.
48
49 :raises RuntimeError: if the greeter attempts and fails to be unlocked.
50
51 :raises RuntimeWarning: when the greeter cannot be found because it is
52 already unlocked.
53 :raises CannotAccessUnity: if unity is not introspectable or cannot be
54 found on dbus.
55 :raises CannotAccessUnity: if unity's upstart status is not "start" or the
56 upstart job cannot be found at all.
57
58 """42 """
59 if unity_proxy_obj is None:43 greeter.wait_for_greeter()
60 try:44 greeter.hide_greeter_with_dbus()
61 pid = get_unity_pid()45
62 unity = _get_unity_proxy_object(pid)46
63 main_window = unity.select_single(main_window_emulator.QQuickView)47def lock_unity():
64 except ProcessSearchError as e:
65 raise CannotAccessUnity(
66 "Cannot introspect unity, make sure that it has been started "
67 "with testability. Perhaps use the function "
68 "'restart_unity_with_testability' this module provides."
69 "(%s)"
70 % str(e)
71 )
72 else:
73 main_window = unity_proxy_obj.select_single(
74 main_window_emulator.QQuickView)
75
76 greeter = main_window.get_greeter()
77 if greeter.created is False:
78 raise RuntimeWarning("Greeter appears to be already unlocked.")
79
80 bus = dbus.SessionBus()
81 dbus_proxy = bus.get_object("com.canonical.UnityGreeter", "/")
82 try:
83 dbus_proxy.HideGreeter()
84 except dbus.DBusException:
85 logger.info("Failed to unlock greeter")
86 raise
87 else:
88 greeter.created.wait_for(False)
89 logger.info("Greeter unlocked, continuing.")
90
91
92def lock_unity(unity_proxy_obj=None):
93 """Helper function that attempts to lock unity greeter.48 """Helper function that attempts to lock unity greeter.
9449
95 If unity_proxy_object is None create a proxy object by querying for the
96 running unity process.
97 Otherwise re-use the passed proxy object.
98
99 :raises RuntimeError: if the greeter attempts and fails to be locked.
100
101 :raises RuntimeWarning: when the greeter is found because it is
102 already locked.
103 :raises CannotAccessUnity: if unity is not introspectable or cannot be
104 found on dbus.
105 :raises CannotAccessUnity: if unity's upstart status is not "start" or the
106 upstart job cannot be found at all.
107
108 """50 """
109 if unity_proxy_obj is None:51 greeter.show_greeter_with_dbus()
110 try:52 greeter.wait_for_greeter()
111 pid = get_unity_pid()
112 unity = _get_unity_proxy_object(pid)
113 main_window = unity.select_single(main_window_emulator.QQuickView)
114 except ProcessSearchError as e:
115 raise CannotAccessUnity(
116 "Cannot introspect unity, make sure that it has been started "
117 "with testability. Perhaps use the function "
118 "'restart_unity_with_testability' this module provides."
119 "(%s)"
120 % str(e)
121 )
122 else:
123 main_window = unity_proxy_obj.select_single(
124 main_window_emulator.QQuickView)
125
126 greeter = main_window.get_greeter()
127 if greeter.created is True:
128 raise RuntimeWarning("Greeter appears to be already locked.")
129
130 bus = dbus.SessionBus()
131 dbus_proxy = bus.get_object("com.canonical.UnityGreeter", "/")
132 try:
133 dbus_proxy.ShowGreeter()
134 except dbus.DBusException:
135 logger.info("Failed to lock greeter")
136 raise
137 else:
138 greeter.created.wait_for(True)
139 logger.info("Greeter locked, continuing.")
14053
14154
142def restart_unity_with_testability(*args):55def restart_unity_with_testability(*args):
14356
=== modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py'
--- tests/autopilot/unity8/shell/tests/test_emulators.py 2015-04-17 21:58:16 +0000
+++ tests/autopilot/unity8/shell/tests/test_emulators.py 2015-06-16 19:33:06 +0000
@@ -41,8 +41,8 @@
4141
42 def setUp(self):42 def setUp(self):
43 super().setUp()43 super().setUp()
44 unity_proxy = self.launch_unity()44 self.launch_unity()
45 process_helpers.unlock_unity(unity_proxy)45 process_helpers.unlock_unity()
4646
4747
48class DashEmulatorTestCase(tests.DashBaseTestCase):48class DashEmulatorTestCase(tests.DashBaseTestCase):
4949
=== modified file 'tests/autopilot/unity8/shell/tests/test_notifications.py'
--- tests/autopilot/unity8/shell/tests/test_notifications.py 2015-04-17 21:58:16 +0000
+++ tests/autopilot/unity8/shell/tests/test_notifications.py 2015-06-16 19:33:06 +0000
@@ -119,8 +119,8 @@
119119
120 def test_interactive(self):120 def test_interactive(self):
121 """Interactive notification must react upon click on itself."""121 """Interactive notification must react upon click on itself."""
122 unity_proxy = self.launch_unity()122 self.launch_unity()
123 unlock_unity(unity_proxy)123 unlock_unity()
124124
125 notify_list = self._get_notifications_list()125 notify_list = self._get_notifications_list()
126126
@@ -156,8 +156,8 @@
156 """Snap-decision with three actions should use156 """Snap-decision with three actions should use
157 one-over two button layout.157 one-over two button layout.
158 """158 """
159 unity_proxy = self.launch_unity()159 self.launch_unity()
160 unlock_unity(unity_proxy)160 unlock_unity()
161161
162 summary = "Theatre at Ferria Stadium"162 summary = "Theatre at Ferria Stadium"
163 body = "at Ferria Stadium in Bilbao, Spain\n07578545317"163 body = "at Ferria Stadium in Bilbao, Spain\n07578545317"
@@ -197,8 +197,8 @@
197 """Snap-decision should block input to shell197 """Snap-decision should block input to shell
198 without greeter/lockscreen.198 without greeter/lockscreen.
199 """199 """
200 unity_proxy = self.launch_unity()200 self.launch_unity()
201 unlock_unity(unity_proxy)201 unlock_unity()
202202
203 summary = "Incoming file"203 summary = "Incoming file"
204 body = "Frank would like to send you the file: essay.pdf"204 body = "Frank would like to send you the file: essay.pdf"
@@ -421,8 +421,8 @@
421421
422 def test_icon_summary_body(self):422 def test_icon_summary_body(self):
423 """Notification must display the expected summary and body text."""423 """Notification must display the expected summary and body text."""
424 unity_proxy = self.launch_unity()424 self.launch_unity()
425 unlock_unity(unity_proxy)425 unlock_unity()
426426
427 notify_list = self._get_notifications_list()427 notify_list = self._get_notifications_list()
428428
@@ -458,8 +458,8 @@
458 def test_icon_summary(self):458 def test_icon_summary(self):
459 """Notification must display the expected summary and secondary459 """Notification must display the expected summary and secondary
460 icon."""460 icon."""
461 unity_proxy = self.launch_unity()461 self.launch_unity()
462 unlock_unity(unity_proxy)462 unlock_unity()
463463
464 notify_list = self._get_notifications_list()464 notify_list = self._get_notifications_list()
465465
@@ -491,8 +491,8 @@
491 def test_urgency_order(self):491 def test_urgency_order(self):
492 """Notifications must be displayed in order according to their492 """Notifications must be displayed in order according to their
493 urgency."""493 urgency."""
494 unity_proxy = self.launch_unity()494 self.launch_unity()
495 unlock_unity(unity_proxy)495 unlock_unity()
496496
497 notify_list = self._get_notifications_list()497 notify_list = self._get_notifications_list()
498498
@@ -578,8 +578,8 @@
578578
579 def test_summary_and_body(self):579 def test_summary_and_body(self):
580 """Notification must display the expected summary- and body-text."""580 """Notification must display the expected summary- and body-text."""
581 unity_proxy = self.launch_unity()581 self.launch_unity()
582 unlock_unity(unity_proxy)582 unlock_unity()
583583
584 notify_list = self._get_notifications_list()584 notify_list = self._get_notifications_list()
585585
@@ -603,8 +603,8 @@
603603
604 def test_summary_only(self):604 def test_summary_only(self):
605 """Notification must display only the expected summary-text."""605 """Notification must display only the expected summary-text."""
606 unity_proxy = self.launch_unity()606 self.launch_unity()
607 unlock_unity(unity_proxy)607 unlock_unity()
608608
609 notify_list = self._get_notifications_list()609 notify_list = self._get_notifications_list()
610610
@@ -621,8 +621,8 @@
621 def test_update_notification_same_layout(self):621 def test_update_notification_same_layout(self):
622 """Notification must allow updating its contents while being622 """Notification must allow updating its contents while being
623 displayed."""623 displayed."""
624 unity_proxy = self.launch_unity()624 self.launch_unity()
625 unlock_unity(unity_proxy)625 unlock_unity()
626626
627 notify_list = self._get_notifications_list()627 notify_list = self._get_notifications_list()
628628
@@ -660,8 +660,8 @@
660 def test_update_notification_layout_change(self):660 def test_update_notification_layout_change(self):
661 """Notification must allow updating its contents and layout while661 """Notification must allow updating its contents and layout while
662 being displayed."""662 being displayed."""
663 unity_proxy = self.launch_unity()663 self.launch_unity()
664 unlock_unity(unity_proxy)664 unlock_unity()
665665
666 notify_list = self._get_notifications_list()666 notify_list = self._get_notifications_list()
667667
@@ -709,8 +709,8 @@
709 """ use the create notification script to get a notification dialog.709 """ use the create notification script to get a notification dialog.
710 Check that the arguments passed to the script match the fields. """710 Check that the arguments passed to the script match the fields. """
711711
712 unity_proxy = self.launch_unity()712 self.launch_unity()
713 unlock_unity(unity_proxy)713 unlock_unity()
714714
715 summary = 'Helper summary'715 summary = 'Helper summary'
716 body = 'Helper body'716 body = 'Helper body'
717717
=== modified file 'tests/qmltests/Tutorial/tst_Tutorial.qml'
--- tests/qmltests/Tutorial/tst_Tutorial.qml 2015-05-18 23:04:12 +0000
+++ tests/qmltests/Tutorial/tst_Tutorial.qml 2015-06-16 19:33:06 +0000
@@ -73,6 +73,7 @@
73 sourceComponent: Component {73 sourceComponent: Component {
74 Shell {74 Shell {
75 property string indicatorProfile: "phone"75 property string indicatorProfile: "phone"
76 property string shellMode: "full-greeter" /* default */
7677
77 Component.onDestruction: {78 Component.onDestruction: {
78 shellLoader.itemDestroyed = true;79 shellLoader.itemDestroyed = true;
7980
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2015-06-12 16:07:43 +0000
+++ tests/qmltests/tst_Shell.qml 2015-06-16 19:33:06 +0000
@@ -81,6 +81,8 @@
81 property bool itemDestroyed: false81 property bool itemDestroyed: false
82 sourceComponent: Component {82 sourceComponent: Component {
83 Shell {83 Shell {
84 property string shellMode: "full-greeter" /* default */
85
84 usageScenario: "phone"86 usageScenario: "phone"
85 orientation: Qt.PortraitOrientation87 orientation: Qt.PortraitOrientation
86 primaryOrientation: Qt.PortraitOrientation88 primaryOrientation: Qt.PortraitOrientation
8789
=== modified file 'tests/qmltests/tst_ShellWithPin.qml'
--- tests/qmltests/tst_ShellWithPin.qml 2015-05-11 14:36:03 +0000
+++ tests/qmltests/tst_ShellWithPin.qml 2015-06-16 19:33:06 +0000
@@ -69,6 +69,8 @@
69 property bool itemDestroyed: false69 property bool itemDestroyed: false
70 sourceComponent: Component {70 sourceComponent: Component {
71 Shell {71 Shell {
72 property string shellMode: "full-greeter" /* default */
73
72 Component.onDestruction: {74 Component.onDestruction: {
73 shellLoader.itemDestroyed = true75 shellLoader.itemDestroyed = true
74 }76 }

Subscribers

People subscribed via source and target branches