Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Johannes Tomren Røsvik
Agreelance
Commits
41ea691a
Unverified
Commit
41ea691a
authored
Mar 24, 2020
by
Johannes Tomren Røsvik
Browse files
Add two way domain tests
parent
fbb8ab90
Pipeline
#77087
passed with stage
in 1 minute and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test_accept_offers.py
View file @
41ea691a
...
...
@@ -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
)
...
...
tests/test_signup.py
View file @
41ea691a
...
...
@@ -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
=
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment