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

Richard Huddie richard.huddie at canonical.com
Wed Aug 20 16:15:14 UTC 2014


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

Diff comments:

> === modified file 'debian/control'
> --- debian/control	2014-08-08 06:53:37 +0000
> +++ debian/control	2014-08-20 04:36:11 +0000
> @@ -18,10 +18,16 @@
>  Depends: ${misc:Depends},
>           ${python3:Depends},
>           ${shlibs:Depends},
> +         address-book-app,
> +         dialer-app,
> +         messaging-app,
>           python3-autopilot,
> +         ubuntu-system-settings,
>           ubuntu-ui-toolkit-autopilot,
> -         unity8-autopilot,
> +         unity8,
> +         unity8-autopilot (>= 8.00+14.10.20140814.1-0ubuntu1),
>           url-dispatcher-tools,
> +         webbrowser-app
>  Description: Ubuntu user experience Autopilot tests
>   This package provides a set of autopilot tests for testing
>   the inter-app integration under Unity8
> 
> === added file 'ubuntu_experience_tests/tests/application_life_cycle/test_launcher.py'
> --- ubuntu_experience_tests/tests/application_life_cycle/test_launcher.py	1970-01-01 00:00:00 +0000
> +++ ubuntu_experience_tests/tests/application_life_cycle/test_launcher.py	2014-08-20 04:36:11 +0000
> @@ -0,0 +1,57 @@
> +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
> +#
> +# Copyright (C) 2014 Canonical Ltd.
> +#
> +# This file is part of ubuntu-experience-tests.
> +#
> +# ubuntu-experience-tests is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; version 3.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU Lesser General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program. If not, see <http://www.gnu.org/licenses/>.
> +
> +import os
> +
> +from autopilot import platform
> +from autopilot.matchers import Eventually
> +from testtools.matchers import Equals
> +
> +from ubuntu_experience_tests import tests
> +
> +
> +class LaunchAppsFromLauncherTestCase(tests.UbuntuExperienceTestCase):
> +
> +    applications_in_launcher = [
> +        ('dialer-app', 'dialer-app',),
> +        ('messaging-app', 'messaging-app'),
> +        ('address-book-app', 'address-book-app'),
> +        ('ubuntu-system-settings', 'system-settings'),
> +        ('webbrowser-app', 'webbrowser-app')
> +    ]
> +
> +    scenarios = [
> +        (application_name, {
> +            'application_name': application_name,
> +            'process_name': process_name,
> +            })
> +        for application_name, process_name in applications_in_launcher
> +    ]
> +
> +    def setUp(self):
> +        super(LaunchAppsFromLauncherTestCase, self).setUp()
> +        if platform.model() == 'Desktop':
> +            self.skipTest(
> +                'Focusing apps launched by Unity8 works only on the phone.')
> +
> +    def test_launch_app_from_launcher_must_focus_it(self):
> +        self.addCleanup(os.system, 'pkill -f ' + self.process_name)

Is it better to use /usr/bin/ubuntu-app-stop?

I think that has been used in other tests.

> +        self.unity.launch_application(self.application_name)
> +        self.assertThat(
> +            self.unity.get_current_focused_app_id,
> +            Eventually(Equals(self.application_name)))
> 
> === modified file 'ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py'
> --- ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py	2014-08-20 04:36:11 +0000
> +++ ubuntu_experience_tests/tests/application_life_cycle/test_url_dispatcher.py	2014-08-20 04:36:11 +0000
> @@ -2,9 +2,9 @@
>  #
>  # Copyright (C) 2014 Canonical Ltd.
>  #
> -# This file is part of ubuntu-integration-tests.
> +# This file is part of ubuntu-experience-tests.
>  #
> -# ubuntu-integration-tests is free software; you can redistribute it and/or
> +# ubuntu-experience-tests is free software; you can redistribute it and/or
>  # modify it under the terms of the GNU General Public License as published by
>  # the Free Software Foundation; version 3.
>  #
> 


-- 
https://code.launchpad.net/~canonical-platform-qa/ubuntu-autopilot-tests/launcher/+merge/231473
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~canonical-platform-qa/ubuntu-autopilot-tests/launcher into lp:ubuntu-autopilot-tests/ubuntu-experience-tests.



More information about the Ubuntu-reviews mailing list