Merge lp:~canonical-platform-qa/ubuntu-autopilot-tests/launcher into lp:ubuntu-autopilot-tests/ubuntu-experience-tests

Proposed by Leo Arias on 2014-08-19
Status: Approved
Approved by: Leo Arias on 2014-08-22
Approved revision: 32
Proposed branch: lp:~canonical-platform-qa/ubuntu-autopilot-tests/launcher
Merge into: lp:ubuntu-autopilot-tests/ubuntu-experience-tests
Prerequisite: lp:~canonical-platform-qa/ubuntu-autopilot-tests/oneline_accounts_window
Diff against target: 93 lines (+60/-3)
3 files modified
debian/control (+7/-1)
ubuntu_experience_tests/tests/application_life_cycle/test_launcher.py (+51/-0)
ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py (+2/-2)
To merge this branch: bzr merge lp:~canonical-platform-qa/ubuntu-autopilot-tests/launcher
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration 2014-08-19 Needs Fixing on 2014-08-22
Richard Huddie (community) 2014-08-19 Approve on 2014-08-21
Ubuntu Testcase Admins 2014-08-19 Pending
Ubuntu Core Development Team 2014-08-19 Pending
Review via email: mp+231473@code.launchpad.net

This proposal supersedes a proposal from 2014-08-14.

Commit message

Added tests to launch the applications that are on the launcher by default.

To post a comment you must log in.
Richard Huddie (rhuddie) wrote :

Looks good. My only comment is whether to use ubuntu-app-stop instead of pkill?

Richard Huddie (rhuddie) :
review: Approve
Leo Arias (elopio) wrote :

Thanks Richard. I'll ask for a silo to land this.

review: Approve (continuous-integration)
Francis Ginther (fginther) wrote :

Autolander has been disabled, please re-approve.

Unmerged revisions

32. By Leo Arias on 2014-08-20

Only one value now.

31. By Leo Arias on 2014-08-20

Use ubuntu-app-stop.

30. By Leo Arias on 2014-08-20

The process name can be different than the app name.

29. By Leo Arias on 2014-08-19

Merged with prerequisite.

28. By Leo Arias on 2014-08-14

Updated the copyright.

27. By Leo Arias on 2014-08-14

Added tests to launch the applications that are on the launcher by default.

26. By Leo Arias on 2014-08-11

Initial commit of Debian packaging.

Approved by PS Jenkins bot, Martin Pitt, Barry Warsaw.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-08-08 06:53:37 +0000
3+++ debian/control 2014-08-20 23:55:23 +0000
4@@ -18,10 +18,16 @@
5 Depends: ${misc:Depends},
6 ${python3:Depends},
7 ${shlibs:Depends},
8+ address-book-app,
9+ dialer-app,
10+ messaging-app,
11 python3-autopilot,
12+ ubuntu-system-settings,
13 ubuntu-ui-toolkit-autopilot,
14- unity8-autopilot,
15+ unity8,
16+ unity8-autopilot (>= 8.00+14.10.20140814.1-0ubuntu1),
17 url-dispatcher-tools,
18+ webbrowser-app
19 Description: Ubuntu user experience Autopilot tests
20 This package provides a set of autopilot tests for testing
21 the inter-app integration under Unity8
22
23=== added file 'ubuntu_experience_tests/tests/application_life_cycle/test_launcher.py'
24--- ubuntu_experience_tests/tests/application_life_cycle/test_launcher.py 1970-01-01 00:00:00 +0000
25+++ ubuntu_experience_tests/tests/application_life_cycle/test_launcher.py 2014-08-20 23:55:23 +0000
26@@ -0,0 +1,51 @@
27+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
28+#
29+# Copyright (C) 2014 Canonical Ltd.
30+#
31+# This file is part of ubuntu-experience-tests.
32+#
33+# ubuntu-experience-tests is free software; you can redistribute it and/or
34+# modify it under the terms of the GNU General Public License as published by
35+# the Free Software Foundation; version 3.
36+#
37+# This program is distributed in the hope that it will be useful,
38+# but WITHOUT ANY WARRANTY; without even the implied warranty of
39+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40+# GNU Lesser General Public License for more details.
41+#
42+# You should have received a copy of the GNU General Public License
43+# along with this program. If not, see <http://www.gnu.org/licenses/>.
44+
45+import os
46+
47+from autopilot import platform
48+from autopilot.matchers import Eventually
49+from testtools.matchers import Equals
50+
51+from ubuntu_experience_tests import tests
52+
53+
54+class LaunchAppsFromLauncherTestCase(tests.UbuntuExperienceTestCase):
55+
56+ applications_in_launcher = [
57+ 'dialer-app', 'messaging-app', 'address-book-app',
58+ 'ubuntu-system-settings', 'webbrowser-app'
59+ ]
60+
61+ scenarios = [
62+ (application_name, {'application_name': application_name})
63+ for application_name in applications_in_launcher
64+ ]
65+
66+ def setUp(self):
67+ super(LaunchAppsFromLauncherTestCase, self).setUp()
68+ if platform.model() == 'Desktop':
69+ self.skipTest(
70+ 'Focusing apps launched by Unity8 works only on the phone.')
71+
72+ def test_launch_app_from_launcher_must_focus_it(self):
73+ self.addCleanup(os.system, 'ubuntu-app-stop ' + self.application_name)
74+ self.unity.launch_application(self.application_name)
75+ self.assertThat(
76+ self.unity.get_current_focused_app_id,
77+ Eventually(Equals(self.application_name)))
78
79=== modified file 'ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py'
80--- ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py 2014-08-19 22:51:07 +0000
81+++ ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py 2014-08-20 23:55:23 +0000
82@@ -2,9 +2,9 @@
83 #
84 # Copyright (C) 2014 Canonical Ltd.
85 #
86-# This file is part of ubuntu-integration-tests.
87+# This file is part of ubuntu-experience-tests.
88 #
89-# ubuntu-integration-tests is free software; you can redistribute it and/or
90+# ubuntu-experience-tests is free software; you can redistribute it and/or
91 # modify it under the terms of the GNU General Public License as published by
92 # the Free Software Foundation; version 3.
93 #

Subscribers

People subscribed via source and target branches