summaryrefslogtreecommitdiff
path: root/src/leap/gui/tests/test_firstrun_register.py
diff options
context:
space:
mode:
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()