Unverified Commit 41ea691a authored by Johannes Tomren Røsvik's avatar Johannes Tomren Røsvik
Browse files

Add two way domain tests

parent fbb8ab90
Pipeline #77087 passed with stage
in 1 minute and 17 seconds
......@@ -47,6 +47,8 @@ class AgreelanceSignUp(unittest.TestCase):
print("Pending " + project_name_2)
print("Declined " + project_name_3)
sleep(1)
def login(self, username, password):
driver = self.driver
driver.get(url_login)
......
......@@ -27,6 +27,52 @@ class AgreelanceSignUp(unittest.TestCase):
self.driver = webdriver.Chrome("./bin/chromedriver.exe")
else:
self.driver = webdriver.Chrome("./bin/chromedriver")
def test_two_way_postal_code_city(self):
driver = self.driver
values = self.getNominalValues()
combinations = [
["Oslo", "0378", True],
["Oslo", "7018", False],
["Trondheim", "0378", False],
["Trondheim", "7018", True],
]
for combination in combinations:
values["city"] = combination[0]
values["postal_code"] = combination[1]
self.assertTrue(self.case_tester(combination) == combination[2])
def test_two_way_city_country(self):
driver = self.driver
values = self.getNominalValues()
combinations = [
["Oslo", "Norway", True],
["Oslo", "Sweden", False],
["Stockholm", "Norway", False],
["Stockholm", "Sweden", True],
]
for combination in combinations:
values["city"] = combination[0]
values["country"] = combination[1]
self.assertTrue(self.case_tester(combination) == combination[2])
def test_two_way_password_verify(self):
driver = self.driver
values = self.getNominalValues()
combinations = [
["qwerty123", "Qwerty123", False],
["qwerty123", "qwerty123", True],
]
for combination in combinations:
values["password"] = combination[0]
values["password_confirmation"] = combination[1]
self.assertTrue(self.case_tester(combination) == combination[2])
def test_username(self):
testcases = [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment