~ubuntuone-control-tower/ubuntuone-windows-installer/trunk

« back to all changes in this revision

Viewing changes to ubuntuone_installer/gui/qt/tests/test_gui.py

Fixed: When logging in with an no-yet-validated account, there is no useful message (LP: #851885).

Show diffs side-by-side

added added

removed removed

Lines of Context:
347
347
        folders_page.on_check_settings_button_clicked()
348
348
        self.assertEqual(self.ui.currentId(), self.ui.preferences_page_id)
349
349
 
 
350
    def test_current_user_sign_in_page_clenaup(self):
 
351
        """Check CurrentUserSignIn cleanupPage method."""
 
352
        current_signin_page = self.ui.page(self.ui.current_user_page_id)
 
353
 
 
354
        # Show the current id page
 
355
        self.ui.setStartId(self.ui.current_user_page_id)
 
356
        self.ui.restart()
 
357
        self.ui.show()
 
358
        self.addCleanup(self.ui.hide)
 
359
 
 
360
        self.ui._next_id = self.ui.SUCCESS_PAGE
 
361
        current_signin_page.cleanupPage()
 
362
        self.assertEqual(self.ui._next_id, None)
 
363
 
 
364
    def test_registration_incomplete(self):
 
365
        """Check the registration_incomplete slot."""
 
366
        self.ui.setStartId(self.ui.current_user_page_id)
 
367
        self.ui.restart()
 
368
        self.ui.show()
 
369
        self.addCleanup(self.ui.hide)
 
370
 
 
371
        self.ui.registration_incomplete()
 
372
        self.assertEqual(self.ui.currentId(),
 
373
            self.ui.email_verification_page_id)
 
374
        self.assertEqual(self.ui._next_id, self.ui.SUCCESS_PAGE)
 
375
 
350
376
    def test_critical(self):
351
377
        """Show a critical popup, but first hide the overlay."""
352
378
        self.assertEqual(self.ui.overlay.hide_counter, 1)
628
654
 
629
655
    currentIdChanged = FakeSignal()
630
656
    loginSuccess = FakeSignal()
 
657
    registrationIncomplete = FakeSignal()
631
658
    registrationSuccess = FakeSignal()
632
659
    userCancellation = FakeSignal()
633
660
    shown = False