Merge lp:~rhuddie/ubuntu-autopilot-tests/create-u1-user-install-app into lp:ubuntu-autopilot-tests/ubuntu-experience-tests

Proposed by Richard Huddie
Status: Work in progress
Proposed branch: lp:~rhuddie/ubuntu-autopilot-tests/create-u1-user-install-app
Merge into: lp:ubuntu-autopilot-tests/ubuntu-experience-tests
Diff against target: 74 lines (+70/-0)
1 file modified
ubuntu_integration_tests/tests/test_u1_create_user_install_app.py (+70/-0)
To merge this branch: bzr merge lp:~rhuddie/ubuntu-autopilot-tests/create-u1-user-install-app
Reviewer Review Type Date Requested Status
Javier Collado Pending
Víctor R. Ruiz Pending
Leo Arias Pending
Ubuntu Testcase Admins Pending
Review via email: mp+209878@code.launchpad.net

Description of the change

Psuedo code for proposed integration test covering creating a new u1 user, installing an app and then launcing it:
1. Open system settings.
2. Go to online accounts.
3. Go to Ubuntu One.
4. Fill the form for a new user.
5. Close online accounts, or swipe it out.
6. Open the applications unity scope.
7. Click an application from the more suggestions section.
8. Click install.
9. Wait for the install to complete.
10. Click open.
11. Validate that the installed app is running

To post a comment you must log in.
Revision history for this message
Javier Collado (javier.collado) wrote :

The code proposed for the test case looks good to me.

The only comment that I have is that probably the `open_app` method can return
better information (maybe a PID) to be passed to the `assert_app_is_running`
method rather than the application name.

Following with that, maybe the assertion can be executed by the app object
itself:
selected_app.assert_is_running()

Anyway, this is something that will be clearer once implementation progress
gets to that point.

Revision history for this message
Víctor R. Ruiz (vrruiz) wrote :

65 + selected_app, selected_app_name = suggested_apps.press_first_available_app()

This should check that the values returned aren't null (no available app to install).

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

53 + system_settings = self.open_system_settings() -> Javier

54 + online_accounts = system_settings.open_online_accounts() -> Victor

65 + selected_app, selected_app_name = suggested_apps.press_first_available_app() -> Richard

70 + selected_app.open_app() -> Leo

Unmerged revisions

12. By Richard Huddie

added pseudo code for test steps

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'ubuntu_integration_tests/tests/test_u1_create_user_install_app.py'
2--- ubuntu_integration_tests/tests/test_u1_create_user_install_app.py 1970-01-01 00:00:00 +0000
3+++ ubuntu_integration_tests/tests/test_u1_create_user_install_app.py 2014-03-07 10:12:13 +0000
4@@ -0,0 +1,70 @@
5+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
6+#
7+# Copyright 2014 Canonical
8+#
9+# This file is part of ubuntu-integration-tests.
10+#
11+# ubuntu-integration-tests is free software: you can redistribute it and/or
12+# modify it under the terms of the GNU General Public License version 3, as
13+# published by the Free Software Foundation.
14+#
15+# This program is distributed in the hope that it will be useful,
16+# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+# GNU General Public License for more details.
19+#
20+# You should have received a copy of the GNU General Public License
21+# along with this program. If not, see <http://www.gnu.org/licenses/>.
22+
23+import uuid
24+
25+from autopilot import platform
26+from ubuntu_integration_tests import helpers, tests
27+
28+
29+class UbuntuOneIntegrationTestCase(tests.IntegrationTestCase):
30+
31+ def setUp(self):
32+ super(UbuntuOneIntegrationTestCase, self).setUp()
33+
34+ def get_unique_email_address(self):
35+ return 'u1test+{}@canonical.com'.format(uuid.uuid4())
36+
37+ def open_system_settings(self):
38+ raise NotImplementedError('TODO')
39+
40+ def return_to_home_screen(self):
41+ raise NotImplementedError('TODO')
42+
43+ def assert_app_is_running(self, app_name):
44+ raise NotImplementedError('TODO')
45+
46+ def test_create_ubuntuone_user_install_app(self):
47+ # generate unique user info
48+ user_email = self.get_unique_email_address()
49+ user_password = 'password'
50+ user_name = 'user'
51+
52+ # navigate to u1 accounts and create a new user
53+ system_settings = self.open_system_settings()
54+ online_accounts = system_settings.open_online_accounts()
55+ u1_accounts = online_accounts.open_u1_accounts()
56+ u1_accounts.fill_form(user_email, user_password, user_name)
57+ u1_accounts.create_account()
58+
59+ # exit u1 accounts
60+ self.return_to_homescreen()
61+
62+ # navigate to apps scope, navigate to suggested apps and select an app to install
63+ app_scope = self.open_app_scope()
64+ suggested_apps = app_scope.navigate_to_suggested_apps()
65+ selected_app, selected_app_name = suggested_apps.press_first_available_app()
66+
67+ # install app and then launch it
68+ selected_app.press_install()
69+ selected_app.wait_for_install_complete()
70+ selected_app.open_app()
71+
72+ # assert the app is running
73+ self.assert_app_is_running(selected_app_name)
74+

Subscribers

People subscribed via source and target branches