forked from Decide-Part-Rota/decide
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from Decide-Part-Rota/Rota3-004
Rota3 004
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,4 +233,72 @@ def test_simpleIncorrectAgeRegister(self): | |
|
||
print(self.live_server_url) | ||
|
||
self.assertEqual(self.driver.title, 'Register') | ||
|
||
def test_simpleIncorrectSexRegister(self): | ||
self.driver.get(f'{self.live_server_url}/authentication/registerForm/') | ||
self.driver.find_element(By.ID,'id_username').send_keys("test1") | ||
self.driver.find_element(By.ID,'id_password1').send_keys("complexpassword") | ||
self.driver.find_element(By.ID,'id_password2').send_keys("complexpassword") | ||
self.driver.find_element(By.ID,'id_email').send_keys("[email protected]") | ||
# Probar un register con sexo invalida | ||
self.driver.find_element(By.ID,'id_sex').send_keys("Helicoptero") | ||
self.driver.find_element(By.ID,'id_age').send_keys("0") | ||
self.driver.find_element(By.ID,'id_status').send_keys("Soltero") | ||
self.driver.find_element(By.ID,'id_country').send_keys("Andorra") | ||
self.driver.find_element(By.ID,'id_button').send_keys(Keys.ENTER) | ||
|
||
print(self.live_server_url) | ||
|
||
self.assertEqual(self.driver.title, 'Register') | ||
|
||
def test_simpleIncorrectStatusRegister(self): | ||
self.driver.get(f'{self.live_server_url}/authentication/registerForm/') | ||
self.driver.find_element(By.ID,'id_username').send_keys("test1") | ||
self.driver.find_element(By.ID,'id_password1').send_keys("complexpassword") | ||
self.driver.find_element(By.ID,'id_password2').send_keys("complexpassword") | ||
self.driver.find_element(By.ID,'id_email').send_keys("[email protected]") | ||
self.driver.find_element(By.ID,'id_sex').send_keys("Mujer") | ||
self.driver.find_element(By.ID,'id_age').send_keys("0") | ||
# Probar un register con estado invalida | ||
self.driver.find_element(By.ID,'id_status').send_keys("Con novia") | ||
self.driver.find_element(By.ID,'id_country').send_keys("Andorra") | ||
self.driver.find_element(By.ID,'id_button').send_keys(Keys.ENTER) | ||
|
||
print(self.live_server_url) | ||
|
||
self.assertEqual(self.driver.title, 'Register') | ||
|
||
def test_simpleIncorrectCountryRegister(self): | ||
self.driver.get(f'{self.live_server_url}/authentication/registerForm/') | ||
self.driver.find_element(By.ID,'id_username').send_keys("test1") | ||
self.driver.find_element(By.ID,'id_password1').send_keys("complexpassword") | ||
self.driver.find_element(By.ID,'id_password2').send_keys("complexpassword") | ||
self.driver.find_element(By.ID,'id_email').send_keys("[email protected]") | ||
self.driver.find_element(By.ID,'id_sex').send_keys("Mujer") | ||
self.driver.find_element(By.ID,'id_age').send_keys("0") | ||
self.driver.find_element(By.ID,'id_status').send_keys("Con novia") | ||
# Probar un register con sexo invalida | ||
self.driver.find_element(By.ID,'id_country').send_keys("Sevilla") | ||
self.driver.find_element(By.ID,'id_button').send_keys(Keys.ENTER) | ||
|
||
print(self.live_server_url) | ||
|
||
self.assertEqual(self.driver.title, 'Register') | ||
|
||
def test_simpleIncorrectMailRegister(self): | ||
self.driver.get(f'{self.live_server_url}/authentication/registerForm/') | ||
self.driver.find_element(By.ID,'id_username').send_keys("test1") | ||
self.driver.find_element(By.ID,'id_password1').send_keys("complexpassword") | ||
self.driver.find_element(By.ID,'id_password2').send_keys("complexpassword") | ||
# Probar un register con mail invalido | ||
self.driver.find_element(By.ID,'id_email').send_keys("miEmail") | ||
self.driver.find_element(By.ID,'id_sex').send_keys("Mujer") | ||
self.driver.find_element(By.ID,'id_age').send_keys("0") | ||
self.driver.find_element(By.ID,'id_status').send_keys("Con novia") | ||
self.driver.find_element(By.ID,'id_country').send_keys("Sevilla") | ||
self.driver.find_element(By.ID,'id_button').send_keys(Keys.ENTER) | ||
|
||
print(self.live_server_url) | ||
|
||
self.assertEqual(self.driver.title, 'Register') |