diff options
author | kali <kali@leap.se> | 2012-12-10 17:07:12 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-12-12 04:27:52 +0900 |
commit | 5a335cd560846fbcfa74f013c170a3bd32c7b85b (patch) | |
tree | e3117035e18c455d138901f1790f29a817cd5dc5 /src/leap/gui/tests/test_firstrun_register.py | |
parent | f40bfa7b674418f9903e826d20ad943efcc47807 (diff) |
login tests
Diffstat (limited to 'src/leap/gui/tests/test_firstrun_register.py')
-rw-r--r-- | src/leap/gui/tests/test_firstrun_register.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/leap/gui/tests/test_firstrun_register.py b/src/leap/gui/tests/test_firstrun_register.py index be38e87c..3447fe9d 100644 --- a/src/leap/gui/tests/test_firstrun_register.py +++ b/src/leap/gui/tests/test_firstrun_register.py @@ -220,5 +220,25 @@ class RegisterUserPageUITestCase(qunittest.TestCase): self.page.paintEvent(None) self.page.populateErrors.assert_called_with() + def test_validation_ready(self): + f_username = self.page.userNameLineEdit + f_password = self.page.userPasswordLineEdit + f_passwor2 = self.page.userPassword2LineEdit + + self.fill_field(f_username, "testuser") + self.fill_field(f_password, "testpassword") + self.fill_field(f_passwor2, "testpassword") + + self.page.done = True + self.page.on_checks_validation_ready() + self.assertFalse(f_username.isEnabled()) + self.assertFalse(f_password.isEnabled()) + self.assertFalse(f_passwor2.isEnabled()) + + self.assertEqual(self.page.validationMsg.text(), + "Registration succeeded!") + self.assertEqual(self.page.do_confirm_next, True) + + if __name__ == "__main__": unittest.main() |