1
# Testing Default Install for the Ubiquity Installer
2
# Author: Dan Chapman <daniel@chapman-mail.com>
5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License version 3 as
7
# published by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
from ubiquity_autopilot_tests.tests import UbiquityAutopilotTestCase
17
from testtools.matchers import Equals
18
from autopilot.matchers import Eventually
19
from ubiquity_autopilot_tests.emulators import gtktoplevel
22
class DefaultInstallTestCase(UbiquityAutopilotTestCase):
24
A default install testcase just generally clicks through the installer
25
using all the default values
28
def test_default_install(self, ):
29
#first check we have an emulator instance
30
flavor = self.get_distribution()
31
self.assertIsInstance(self.main_window, gtktoplevel.GtkWindow)
32
self.assertThat(self.main_window.visible, Eventually(Equals(True)))
33
self.welcome_page_tests()
34
self.go_to_next_page()
35
self.preparing_page_tests()
36
self.go_to_next_page()
37
if flavor == 'Edubuntu':
38
self.edubuntu_addon_window_tests(ltsp=True)
39
self.go_to_next_page()
40
self.edubuntu_packages_window_tests()
41
self.go_to_next_page()
42
self.installation_type_page_tests(default=True)
43
self.go_to_next_page(wait=True)
44
self.location_page_tests()
45
self.go_to_next_page()
46
self.keyboard_layout_page_tests()
47
self.go_to_next_page()
48
self.user_info_page_tests('Autopilot', 'password')
49
self.go_to_progress_page()
51
self.progress_page_tests()
52
self.assertThat(lambda: self.app.select_single(
54
name='finished_dialog').visible,
55
Eventually(Equals(True), timeout=180))
56
#XXX: Uncomment if you want to restart after install complete
57
## we need to sleep here to wait for dialog to fully load. It appears
58
## in dbus before its actually visible. As the test has already passed
59
## this doesn't affect outcome
62
#self.keyboard.press_and_release('Enter')