Merge lp:~heber013/ubiquity/adding-autopilot-tests-minimal-installation into lp:ubiquity

Proposed by Heber Parrucci
Status: Superseded
Proposed branch: lp:~heber013/ubiquity/adding-autopilot-tests-minimal-installation
Merge into: lp:ubiquity
Prerequisite: lp:~didrocks/ubiquity/minimal-package-list
Diff against target: 172 lines (+131/-0)
3 files modified
autopilot/ubiquity_autopilot_tests/tests/__init__.py (+9/-0)
autopilot/ubiquity_autopilot_tests/tests/test_english_minimal_installation.py (+61/-0)
autopilot/ubiquity_autopilot_tests/tests/test_nonenglish_minimal_installation.py (+61/-0)
To merge this branch: bzr merge lp:~heber013/ubiquity/adding-autopilot-tests-minimal-installation
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement Pending
Review via email: mp+340014@code.launchpad.net

This proposal has been superseded by a proposal from 2018-02-27.

Commit message

Adding autopilot tests for minimal installation option

Description of the change

Adding autopilot tests for minimal installation option

To post a comment you must log in.
6594. By Heber Parrucci

Removing previuos changes of lp:~didrocks/ubiquity/minimal-package-list

6595. By Heber Parrucci

removing old changes of lp:~didrocks/ubiquity/minimal-package-list

6596. By Heber Parrucci

updaing branch to correct one

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/ubiquity_autopilot_tests/tests/__init__.py'
2--- autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-02-05 15:08:56 +0000
3+++ autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-02-27 12:31:57 +0000
4@@ -230,6 +230,7 @@
5 self._check_navigation_buttons()
6
7 def preparing_page_tests(self, updates=False, thirdParty=False,
8+ minimal_installation=False,
9 networkConnection=True, sufficientSpace=True,
10 powerSource=False):
11 """ Runs the tests for the 'Preparing to install' page
12@@ -238,6 +239,7 @@
13
14 :param thirdParty: Boolean, if True selects install third-party
15 software
16+ :param minimal_installation: Boolean, if True selects minimal installation option
17
18 :param networkConnection: Boolean if True checks the network state box
19 is visible and objects are correct, If
20@@ -266,6 +268,7 @@
21
22 objList = [
23 'prepare_foss_disclaimer_license',
24+ 'prepare_minimal_install',
25 'prepare_download_updates',
26 'prepare_nonfree_software'
27 ]
28@@ -283,6 +286,12 @@
29 GtkCheckButton, BuilderName='prepare_nonfree_software')
30 self.pointing_device.click_object(thrdprty_checkbutton)
31
32+ if minimal_installation:
33+ logger.debug("Selecting install Minimal installation")
34+ minimal_installation_checkbutton = preparing_page.select_single(
35+ GtkCheckButton, BuilderName='prepare_minimal_install')
36+ self.pointing_device.click_object(minimal_installation_checkbutton)
37+
38 self._check_page_titles()
39 self._check_navigation_buttons()
40
41
42=== added file 'autopilot/ubiquity_autopilot_tests/tests/test_english_minimal_installation.py'
43--- autopilot/ubiquity_autopilot_tests/tests/test_english_minimal_installation.py 1970-01-01 00:00:00 +0000
44+++ autopilot/ubiquity_autopilot_tests/tests/test_english_minimal_installation.py 2018-02-27 12:31:57 +0000
45@@ -0,0 +1,61 @@
46+# Testing Default Install for the Ubiquity Installer
47+# Author: Heber Parrucci <heber.parrucci@canonical.com>
48+# Copyright (C) 2018
49+#
50+# This program is free software: you can redistribute it and/or modify
51+# it under the terms of the GNU General Public License version 3 as
52+# published by the Free Software Foundation.
53+#
54+# This program is distributed in the hope that it will be useful,
55+# but WITHOUT ANY WARRANTY; without even the implied warranty of
56+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57+# GNU General Public License for more details.
58+#
59+# You should have received a copy of the GNU General Public License
60+# along with this program. If not, see <http://www.gnu.org/licenses/>.
61+from ubiquity_autopilot_tests.tests import UbiquityAutopilotTestCase
62+from testtools.matchers import Equals
63+from autopilot.matchers import Eventually
64+from ubiquity_autopilot_tests.emulators import gtktoplevel
65+
66+
67+class EnglishMinimalInstallationTestCase(UbiquityAutopilotTestCase):
68+ """
69+ Test choosing English and minimal installation option
70+ """
71+
72+ def test_default_install(self, ):
73+ # first check we have an emulator instance
74+ flavor = self.get_distribution()
75+ self.assertIsInstance(self.main_window, gtktoplevel.GtkWindow)
76+ self.assertThat(self.main_window.visible, Eventually(Equals(True)))
77+ self.welcome_page_tests(lang='English')
78+ self.go_to_next_page()
79+ self.keyboard_layout_page_tests()
80+ self.go_to_next_page()
81+ self.preparing_page_tests(minimal_installation=True)
82+ self.go_to_next_page()
83+ if flavor == 'Edubuntu':
84+ self.edubuntu_addon_window_tests(gnome=True)
85+ self.go_to_next_page()
86+ self.edubuntu_packages_window_tests()
87+ self.go_to_next_page()
88+ self.installation_type_page_tests(default=True)
89+ self.go_to_next_page(wait=True)
90+ self.location_page_tests()
91+ self.go_to_next_page()
92+ self.user_info_page_tests('Autopilot', 'password')
93+ self.go_to_progress_page()
94+
95+ self.progress_page_tests()
96+ self.assertThat(lambda: self.app.select_single(
97+ 'GtkDialog',
98+ name='finished_dialog').visible,
99+ Eventually(Equals(True), timeout=180))
100+ # XXX: Uncomment if you want to restart after install complete
101+ # we need to sleep here to wait for dialog to fully load. It appears
102+ # in dbus before its actually visible. As the test has already passed
103+ # this doesn't affect outcome
104+ # time.sleep(5)
105+ #
106+ # self.keyboard.press_and_release('Enter')
107
108=== added file 'autopilot/ubiquity_autopilot_tests/tests/test_nonenglish_minimal_installation.py'
109--- autopilot/ubiquity_autopilot_tests/tests/test_nonenglish_minimal_installation.py 1970-01-01 00:00:00 +0000
110+++ autopilot/ubiquity_autopilot_tests/tests/test_nonenglish_minimal_installation.py 2018-02-27 12:31:57 +0000
111@@ -0,0 +1,61 @@
112+# Testing Default Install for the Ubiquity Installer
113+# Author: Heber Parrucci <heber.parrucci@canonical.com>
114+# Copyright (C) 2018
115+#
116+# This program is free software: you can redistribute it and/or modify
117+# it under the terms of the GNU General Public License version 3 as
118+# published by the Free Software Foundation.
119+#
120+# This program is distributed in the hope that it will be useful,
121+# but WITHOUT ANY WARRANTY; without even the implied warranty of
122+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
123+# GNU General Public License for more details.
124+#
125+# You should have received a copy of the GNU General Public License
126+# along with this program. If not, see <http://www.gnu.org/licenses/>.
127+from ubiquity_autopilot_tests.tests import UbiquityAutopilotTestCase
128+from testtools.matchers import Equals
129+from autopilot.matchers import Eventually
130+from ubiquity_autopilot_tests.emulators import gtktoplevel
131+
132+
133+class NonEnglishMinimalInstallationTestCase(UbiquityAutopilotTestCase):
134+ """
135+ Test choosing Non English and minimal installation option
136+ """
137+
138+ def test_default_install(self, ):
139+ # first check we have an emulator instance
140+ flavor = self.get_distribution()
141+ self.assertIsInstance(self.main_window, gtktoplevel.GtkWindow)
142+ self.assertThat(self.main_window.visible, Eventually(Equals(True)))
143+ self.welcome_page_tests()
144+ self.go_to_next_page()
145+ self.keyboard_layout_page_tests()
146+ self.go_to_next_page()
147+ self.preparing_page_tests(minimal_installation=True)
148+ self.go_to_next_page()
149+ if flavor == 'Edubuntu':
150+ self.edubuntu_addon_window_tests(gnome=True)
151+ self.go_to_next_page()
152+ self.edubuntu_packages_window_tests()
153+ self.go_to_next_page()
154+ self.installation_type_page_tests(default=True)
155+ self.go_to_next_page(wait=True)
156+ self.location_page_tests()
157+ self.go_to_next_page()
158+ self.user_info_page_tests('Autopilot', 'password')
159+ self.go_to_progress_page()
160+
161+ self.progress_page_tests()
162+ self.assertThat(lambda: self.app.select_single(
163+ 'GtkDialog',
164+ name='finished_dialog').visible,
165+ Eventually(Equals(True), timeout=180))
166+ # XXX: Uncomment if you want to restart after install complete
167+ # we need to sleep here to wait for dialog to fully load. It appears
168+ # in dbus before its actually visible. As the test has already passed
169+ # this doesn't affect outcome
170+ # time.sleep(5)
171+ #
172+ # self.keyboard.press_and_release('Enter')

Subscribers

People subscribed via source and target branches

to status/vote changes: