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
1=== added file 'qml/Greeter/ShimGreeter.qml'
2--- qml/Greeter/ShimGreeter.qml 1970-01-01 00:00:00 +0000
3+++ qml/Greeter/ShimGreeter.qml 2015-06-16 19:33:06 +0000
4@@ -0,0 +1,45 @@
5+/*
6+ * Copyright (C) 2015 Canonical, Ltd.
7+ *
8+ * This program is free software; you can redistribute it and/or modify
9+ * it under the terms of the GNU General Public License as published by
10+ * the Free Software Foundation; version 3.
11+ *
12+ * This program is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19+ */
20+
21+import QtQuick 2.3
22+
23+/*
24+ * This is a shim greeter that is only used to provide a shell,
25+ * running without a greeter, the requisite information
26+ *
27+ */
28+
29+/* FIXME: this shuld be fine as a QtObject, but bug lp:1447391
30+ * dictates wrapping as an item instead
31+ */
32+Item {
33+ id: shimGreeter
34+
35+ readonly property bool active: false
36+ readonly property bool hasLockedApp: lockedApp !== ""
37+ readonly property bool locked: false
38+ readonly property bool shown: false
39+ readonly property bool waiting: false
40+
41+ property string lockedApp: ""
42+
43+ // Since ShimGreeter is never active, these can just return
44+ property var forceShow: (function() { return; })
45+ property var notifyAboutToFocusApp: (function(appId) { return; })
46+ property var notifyAppFocused: (function(appId) { return; })
47+ property var notifyShowingDashFromDrag: (function(appId) { return false; })
48+
49+}
50
51=== modified file 'qml/Shell.qml'
52--- qml/Shell.qml 2015-06-12 16:07:43 +0000
53+++ qml/Shell.qml 2015-06-16 19:33:06 +0000
54@@ -111,6 +111,8 @@
55 // This is _only_ used to expose the property to autopilot tests
56 readonly property string testShellMode: shellMode
57
58+ readonly property alias greeter: greeterLoader.item
59+
60 function activateApplication(appId) {
61 if (ApplicationManager.findApplication(appId)) {
62 ApplicationManager.requestFocusApplication(appId);
63@@ -262,7 +264,9 @@
64 ? "phone"
65 : shell.usageScenario
66 source: {
67- if (applicationsDisplayLoader.usageScenario === "phone") {
68+ if(shellMode === "greeter") {
69+ return "Stages/ShimStage.qml"
70+ } else if (applicationsDisplayLoader.usageScenario === "phone") {
71 return "Stages/PhoneStage.qml";
72 } else if (applicationsDisplayLoader.usageScenario === "tablet") {
73 return "Stages/TabletStage.qml";
74@@ -414,50 +418,59 @@
75 }
76 }
77
78- Greeter {
79- id: greeter
80- objectName: "greeter"
81-
82- hides: [launcher, panel.indicators]
83- tabletMode: shell.usageScenario !== "phone"
84- launcherOffset: launcher.progress
85- forcedUnlock: tutorial.running
86- background: shell.background
87-
88+ Loader {
89+ id: greeterLoader
90 anchors.fill: parent
91 anchors.topMargin: panel.panelHeight
92-
93- // avoid overlapping with Launcher's edge drag area
94- // FIXME: Fix TouchRegistry & friends and remove this workaround
95- // Issue involves launcher's DDA getting disabled on a long
96- // left-edge drag
97- dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
98-
99- onSessionStarted: {
100- launcher.hide();
101- }
102-
103- onTease: {
104- if (!tutorial.running) {
105- launcher.tease();
106- }
107- }
108-
109- onEmergencyCall: startLockedApp("dialer-app")
110-
111- Timer {
112- // See powerConnection for why this is useful
113- id: showGreeterDelayed
114- interval: 1
115- onTriggered: {
116- greeter.forceShow();
117- }
118- }
119-
120- Binding {
121- target: ApplicationManager
122- property: "suspended"
123- value: greeter.shown
124+ sourceComponent: shellMode != "shell" ? integratedGreeter :
125+ Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
126+ onLoaded: {
127+ item.objectName = "greeter"
128+ }
129+ }
130+
131+ Component {
132+ id: integratedGreeter
133+ Greeter {
134+
135+ hides: [launcher, panel.indicators]
136+ tabletMode: shell.sideStageEnabled
137+ launcherOffset: launcher.progress
138+ forcedUnlock: tutorial.running
139+ background: shell.background
140+
141+ // avoid overlapping with Launcher's edge drag area
142+ // FIXME: Fix TouchRegistry & friends and remove this workaround
143+ // Issue involves launcher's DDA getting disabled on a long
144+ // left-edge drag
145+ dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
146+
147+ onSessionStarted: {
148+ launcher.hide();
149+ }
150+
151+ onTease: {
152+ if (!tutorial.running) {
153+ launcher.tease();
154+ }
155+ }
156+
157+ onEmergencyCall: startLockedApp("dialer-app")
158+
159+ Binding {
160+ target: ApplicationManager
161+ property: "suspended"
162+ value: greeter.shown
163+ }
164+ }
165+ }
166+
167+ Timer {
168+ // See powerConnection for why this is useful
169+ id: showGreeterDelayed
170+ interval: 1
171+ onTriggered: {
172+ greeter.forceShow();
173 }
174 }
175
176
177=== added file 'qml/Stages/ShimStage.qml'
178--- qml/Stages/ShimStage.qml 1970-01-01 00:00:00 +0000
179+++ qml/Stages/ShimStage.qml 2015-06-16 19:33:06 +0000
180@@ -0,0 +1,44 @@
181+/*
182+ * Copyright (C) 2015 Canonical, Ltd.
183+ *
184+ * This program is free software; you can redistribute it and/or modify
185+ * it under the terms of the GNU General Public License as published by
186+ * the Free Software Foundation; version 3.
187+ *
188+ * This program is distributed in the hope that it will be useful,
189+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
190+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
191+ * GNU General Public License for more details.
192+ *
193+ * You should have received a copy of the GNU General Public License
194+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
195+ */
196+
197+import QtQuick 2.3
198+import Ubuntu.Components 0.1
199+
200+Rectangle {
201+ id: shimStage
202+
203+ anchors.fill: parent
204+ color: UbuntuColors.lightAubergine
205+
206+ Text {
207+ id: greeterModeText
208+
209+ anchors.horizontalCenter: parent.horizontalCenter
210+ anchors.top: parent.top
211+ anchors.topMargin: units.gu(10)
212+ font.bold: true
213+ horizontalAlignment: Text.AlignHCenter
214+ text: "Shell is in \"greeter\" mode"
215+ }
216+
217+ Text {
218+ anchors.centerIn: parent
219+ color: UbuntuColors.orange
220+ font.pointSize: units.gu(8)
221+ horizontalAlignment: Text.AlignHCenter
222+ text: "Shim \nStage"
223+ }
224+}
225
226=== modified file 'tests/autopilot/unity8/application_lifecycle/tests/__init__.py'
227--- tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2015-02-23 17:29:04 +0000
228+++ tests/autopilot/unity8/application_lifecycle/tests/__init__.py 2015-06-16 19:33:06 +0000
229@@ -31,8 +31,8 @@
230 super().setUp()
231 self._qml_mock_enabled = False
232 self._data_dirs_mock_enabled = False
233- unity_proxy = self.launch_unity()
234- process_helpers.unlock_unity(unity_proxy)
235+ self.launch_unity()
236+ process_helpers.unlock_unity()
237
238 def create_test_application(self):
239 desktop_file_dict = fixture_setup.DEFAULT_DESKTOP_FILE_DICT
240
241=== modified file 'tests/autopilot/unity8/greeter/__init__.py'
242--- tests/autopilot/unity8/greeter/__init__.py 2015-03-23 23:40:27 +0000
243+++ tests/autopilot/unity8/greeter/__init__.py 2015-06-16 19:33:06 +0000
244@@ -0,0 +1,52 @@
245+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
246+#
247+# Unity Autopilot Test Suite
248+# Copyright (C) 2015 Canonical
249+#
250+# This program is free software: you can redistribute it and/or modify
251+# it under the terms of the GNU General Public License as published by
252+# the Free Software Foundation, either version 3 of the License, or
253+# (at your option) any later version.
254+#
255+# This program is distributed in the hope that it will be useful,
256+# but WITHOUT ANY WARRANTY; without even the implied warranty of
257+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
258+# GNU General Public License for more details.
259+#
260+# You should have received a copy of the GNU General Public License
261+# along with this program. If not, see <http://www.gnu.org/licenses/>.
262+#
263+
264+import dbus
265+
266+from autopilot.matchers import Eventually
267+from testtools.matchers import Equals
268+
269+
270+def hide_greeter_with_dbus():
271+ dbus_proxy = _get_greeter_dbus_proxy()
272+ if _is_greeter_active():
273+ dbus_proxy.HideGreeter()
274+
275+
276+def show_greeter_with_dbus():
277+ dbus_proxy = _get_greeter_dbus_proxy()
278+ if not _is_greeter_active():
279+ dbus_proxy.ShowGreeter()
280+
281+
282+def wait_for_greeter():
283+ Eventually(Equals(True), timeout=300).match(_is_greeter_active)
284+
285+
286+def _get_greeter_dbus_proxy():
287+ bus = dbus.SessionBus()
288+ return bus.get_object('com.canonical.UnityGreeter', '/')
289+
290+
291+def _is_greeter_active():
292+ try:
293+ dbus_proxy = _get_greeter_dbus_proxy()
294+ return dbus_proxy.Get('com.canonical.UnityGreeter', 'IsActive')
295+ except:
296+ return False
297
298=== modified file 'tests/autopilot/unity8/indicators/tests/__init__.py'
299--- tests/autopilot/unity8/indicators/tests/__init__.py 2015-05-11 14:36:03 +0000
300+++ tests/autopilot/unity8/indicators/tests/__init__.py 2015-06-16 19:33:06 +0000
301@@ -31,7 +31,7 @@
302 def setUp(self):
303 super().setUp()
304 self.unity_proxy = self.launch_unity()
305- process_helpers.unlock_unity(self.unity_proxy)
306+ process_helpers.unlock_unity()
307
308
309 class DeviceIndicatorTestCase(IndicatorTestCase):
310
311=== modified file 'tests/autopilot/unity8/process_helpers.py'
312--- tests/autopilot/unity8/process_helpers.py 2015-05-11 14:36:03 +0000
313+++ tests/autopilot/unity8/process_helpers.py 2015-06-16 19:33:06 +0000
314@@ -19,14 +19,11 @@
315
316 import logging
317 import subprocess
318-import dbus
319
320 import ubuntuuitoolkit
321-from autopilot.exceptions import ProcessSearchError
322 from autopilot.introspection import get_proxy_object_for_existing_process
323
324-from unity8.shell import emulators
325-from unity8.shell.emulators import main_window as main_window_emulator
326+from unity8 import greeter
327
328 logger = logging.getLogger(__name__)
329
330@@ -39,104 +36,20 @@
331 pass
332
333
334-def unlock_unity(unity_proxy_obj=None):
335+def unlock_unity():
336 """Helper function that attempts to unlock the unity greeter.
337
338- If unity_proxy_object is None create a proxy object by querying for the
339- running unity process.
340- Otherwise re-use the passed proxy object.
341-
342- :raises RuntimeError: if the greeter attempts and fails to be unlocked.
343-
344- :raises RuntimeWarning: when the greeter cannot be found because it is
345- already unlocked.
346- :raises CannotAccessUnity: if unity is not introspectable or cannot be
347- found on dbus.
348- :raises CannotAccessUnity: if unity's upstart status is not "start" or the
349- upstart job cannot be found at all.
350-
351 """
352- if unity_proxy_obj is None:
353- try:
354- pid = get_unity_pid()
355- unity = _get_unity_proxy_object(pid)
356- main_window = unity.select_single(main_window_emulator.QQuickView)
357- except ProcessSearchError as e:
358- raise CannotAccessUnity(
359- "Cannot introspect unity, make sure that it has been started "
360- "with testability. Perhaps use the function "
361- "'restart_unity_with_testability' this module provides."
362- "(%s)"
363- % str(e)
364- )
365- else:
366- main_window = unity_proxy_obj.select_single(
367- main_window_emulator.QQuickView)
368-
369- greeter = main_window.get_greeter()
370- if greeter.created is False:
371- raise RuntimeWarning("Greeter appears to be already unlocked.")
372-
373- bus = dbus.SessionBus()
374- dbus_proxy = bus.get_object("com.canonical.UnityGreeter", "/")
375- try:
376- dbus_proxy.HideGreeter()
377- except dbus.DBusException:
378- logger.info("Failed to unlock greeter")
379- raise
380- else:
381- greeter.created.wait_for(False)
382- logger.info("Greeter unlocked, continuing.")
383-
384-
385-def lock_unity(unity_proxy_obj=None):
386+ greeter.wait_for_greeter()
387+ greeter.hide_greeter_with_dbus()
388+
389+
390+def lock_unity():
391 """Helper function that attempts to lock unity greeter.
392
393- If unity_proxy_object is None create a proxy object by querying for the
394- running unity process.
395- Otherwise re-use the passed proxy object.
396-
397- :raises RuntimeError: if the greeter attempts and fails to be locked.
398-
399- :raises RuntimeWarning: when the greeter is found because it is
400- already locked.
401- :raises CannotAccessUnity: if unity is not introspectable or cannot be
402- found on dbus.
403- :raises CannotAccessUnity: if unity's upstart status is not "start" or the
404- upstart job cannot be found at all.
405-
406 """
407- if unity_proxy_obj is None:
408- try:
409- pid = get_unity_pid()
410- unity = _get_unity_proxy_object(pid)
411- main_window = unity.select_single(main_window_emulator.QQuickView)
412- except ProcessSearchError as e:
413- raise CannotAccessUnity(
414- "Cannot introspect unity, make sure that it has been started "
415- "with testability. Perhaps use the function "
416- "'restart_unity_with_testability' this module provides."
417- "(%s)"
418- % str(e)
419- )
420- else:
421- main_window = unity_proxy_obj.select_single(
422- main_window_emulator.QQuickView)
423-
424- greeter = main_window.get_greeter()
425- if greeter.created is True:
426- raise RuntimeWarning("Greeter appears to be already locked.")
427-
428- bus = dbus.SessionBus()
429- dbus_proxy = bus.get_object("com.canonical.UnityGreeter", "/")
430- try:
431- dbus_proxy.ShowGreeter()
432- except dbus.DBusException:
433- logger.info("Failed to lock greeter")
434- raise
435- else:
436- greeter.created.wait_for(True)
437- logger.info("Greeter locked, continuing.")
438+ greeter.show_greeter_with_dbus()
439+ greeter.wait_for_greeter()
440
441
442 def restart_unity_with_testability(*args):
443
444=== modified file 'tests/autopilot/unity8/shell/tests/test_emulators.py'
445--- tests/autopilot/unity8/shell/tests/test_emulators.py 2015-04-17 21:58:16 +0000
446+++ tests/autopilot/unity8/shell/tests/test_emulators.py 2015-06-16 19:33:06 +0000
447@@ -41,8 +41,8 @@
448
449 def setUp(self):
450 super().setUp()
451- unity_proxy = self.launch_unity()
452- process_helpers.unlock_unity(unity_proxy)
453+ self.launch_unity()
454+ process_helpers.unlock_unity()
455
456
457 class DashEmulatorTestCase(tests.DashBaseTestCase):
458
459=== modified file 'tests/autopilot/unity8/shell/tests/test_notifications.py'
460--- tests/autopilot/unity8/shell/tests/test_notifications.py 2015-04-17 21:58:16 +0000
461+++ tests/autopilot/unity8/shell/tests/test_notifications.py 2015-06-16 19:33:06 +0000
462@@ -119,8 +119,8 @@
463
464 def test_interactive(self):
465 """Interactive notification must react upon click on itself."""
466- unity_proxy = self.launch_unity()
467- unlock_unity(unity_proxy)
468+ self.launch_unity()
469+ unlock_unity()
470
471 notify_list = self._get_notifications_list()
472
473@@ -156,8 +156,8 @@
474 """Snap-decision with three actions should use
475 one-over two button layout.
476 """
477- unity_proxy = self.launch_unity()
478- unlock_unity(unity_proxy)
479+ self.launch_unity()
480+ unlock_unity()
481
482 summary = "Theatre at Ferria Stadium"
483 body = "at Ferria Stadium in Bilbao, Spain\n07578545317"
484@@ -197,8 +197,8 @@
485 """Snap-decision should block input to shell
486 without greeter/lockscreen.
487 """
488- unity_proxy = self.launch_unity()
489- unlock_unity(unity_proxy)
490+ self.launch_unity()
491+ unlock_unity()
492
493 summary = "Incoming file"
494 body = "Frank would like to send you the file: essay.pdf"
495@@ -421,8 +421,8 @@
496
497 def test_icon_summary_body(self):
498 """Notification must display the expected summary and body text."""
499- unity_proxy = self.launch_unity()
500- unlock_unity(unity_proxy)
501+ self.launch_unity()
502+ unlock_unity()
503
504 notify_list = self._get_notifications_list()
505
506@@ -458,8 +458,8 @@
507 def test_icon_summary(self):
508 """Notification must display the expected summary and secondary
509 icon."""
510- unity_proxy = self.launch_unity()
511- unlock_unity(unity_proxy)
512+ self.launch_unity()
513+ unlock_unity()
514
515 notify_list = self._get_notifications_list()
516
517@@ -491,8 +491,8 @@
518 def test_urgency_order(self):
519 """Notifications must be displayed in order according to their
520 urgency."""
521- unity_proxy = self.launch_unity()
522- unlock_unity(unity_proxy)
523+ self.launch_unity()
524+ unlock_unity()
525
526 notify_list = self._get_notifications_list()
527
528@@ -578,8 +578,8 @@
529
530 def test_summary_and_body(self):
531 """Notification must display the expected summary- and body-text."""
532- unity_proxy = self.launch_unity()
533- unlock_unity(unity_proxy)
534+ self.launch_unity()
535+ unlock_unity()
536
537 notify_list = self._get_notifications_list()
538
539@@ -603,8 +603,8 @@
540
541 def test_summary_only(self):
542 """Notification must display only the expected summary-text."""
543- unity_proxy = self.launch_unity()
544- unlock_unity(unity_proxy)
545+ self.launch_unity()
546+ unlock_unity()
547
548 notify_list = self._get_notifications_list()
549
550@@ -621,8 +621,8 @@
551 def test_update_notification_same_layout(self):
552 """Notification must allow updating its contents while being
553 displayed."""
554- unity_proxy = self.launch_unity()
555- unlock_unity(unity_proxy)
556+ self.launch_unity()
557+ unlock_unity()
558
559 notify_list = self._get_notifications_list()
560
561@@ -660,8 +660,8 @@
562 def test_update_notification_layout_change(self):
563 """Notification must allow updating its contents and layout while
564 being displayed."""
565- unity_proxy = self.launch_unity()
566- unlock_unity(unity_proxy)
567+ self.launch_unity()
568+ unlock_unity()
569
570 notify_list = self._get_notifications_list()
571
572@@ -709,8 +709,8 @@
573 """ use the create notification script to get a notification dialog.
574 Check that the arguments passed to the script match the fields. """
575
576- unity_proxy = self.launch_unity()
577- unlock_unity(unity_proxy)
578+ self.launch_unity()
579+ unlock_unity()
580
581 summary = 'Helper summary'
582 body = 'Helper body'
583
584=== modified file 'tests/qmltests/Tutorial/tst_Tutorial.qml'
585--- tests/qmltests/Tutorial/tst_Tutorial.qml 2015-05-18 23:04:12 +0000
586+++ tests/qmltests/Tutorial/tst_Tutorial.qml 2015-06-16 19:33:06 +0000
587@@ -73,6 +73,7 @@
588 sourceComponent: Component {
589 Shell {
590 property string indicatorProfile: "phone"
591+ property string shellMode: "full-greeter" /* default */
592
593 Component.onDestruction: {
594 shellLoader.itemDestroyed = true;
595
596=== modified file 'tests/qmltests/tst_Shell.qml'
597--- tests/qmltests/tst_Shell.qml 2015-06-12 16:07:43 +0000
598+++ tests/qmltests/tst_Shell.qml 2015-06-16 19:33:06 +0000
599@@ -81,6 +81,8 @@
600 property bool itemDestroyed: false
601 sourceComponent: Component {
602 Shell {
603+ property string shellMode: "full-greeter" /* default */
604+
605 usageScenario: "phone"
606 orientation: Qt.PortraitOrientation
607 primaryOrientation: Qt.PortraitOrientation
608
609=== modified file 'tests/qmltests/tst_ShellWithPin.qml'
610--- tests/qmltests/tst_ShellWithPin.qml 2015-05-11 14:36:03 +0000
611+++ tests/qmltests/tst_ShellWithPin.qml 2015-06-16 19:33:06 +0000
612@@ -69,6 +69,8 @@
613 property bool itemDestroyed: false
614 sourceComponent: Component {
615 Shell {
616+ property string shellMode: "full-greeter" /* default */
617+
618 Component.onDestruction: {
619 shellLoader.itemDestroyed = true
620 }

Subscribers

People subscribed via source and target branches