summaryrefslogtreecommitdiff
path: root/src/leap/gui/tests/test_firstrun_register.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-10 17:07:12 +0900
committerkali <kali@leap.se>2012-12-12 04:27:52 +0900
commit5a335cd560846fbcfa74f013c170a3bd32c7b85b (patch)
treee3117035e18c455d138901f1790f29a817cd5dc5 /src/leap/gui/tests/test_firstrun_register.py
parentf40bfa7b674418f9903e826d20ad943efcc47807 (diff)
login tests
Diffstat (limited to 'src/leap/gui/tests/test_firstrun_register.py')
-rw-r--r--src/leap/gui/tests/test_firstrun_register.py20
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()