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
51e82323
Unverified
Commit
51e82323
authored
Mar 23, 2020
by
Johannes Tomren Røsvik
Browse files
Fix small screen fix
parent
e5ed9f20
Pipeline
#76831
passed with stage
in 1 minute and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test_darkmode.py
View file @
51e82323
...
...
@@ -35,15 +35,18 @@ class AgreelanceDarkMode(unittest.TestCase):
def
test_dark_mode_clicked
(
self
):
driver
=
self
.
driver
driver
.
get
(
url
)
# Try to open navbar in case the screen is small
try
:
toggler
=
driver
.
find_element_by_class_name
(
"navbar-toggler"
)
toggler
.
click
()
time
.
sleep
(
1
)
finally
:
darkmode_click
=
driver
.
find_element_by_class_name
(
"custom-control-label"
)
darkmode_click
.
click
()
time
.
sleep
(
1
)
except
Exception
:
pass
darkmode_click
=
driver
.
find_element_by_class_name
(
"custom-control-label"
)
darkmode_click
.
click
()
time
.
sleep
(
1
)
self
.
assertEqual
(
driver
.
find_element_by_tag_name
(
"body"
).
value_of_css_property
(
"background-color"
),
"rgba(0, 0, 0, 1)"
)
...
...
@@ -52,4 +55,4 @@ class AgreelanceDarkMode(unittest.TestCase):
self
.
driver
.
close
()
if
__name__
==
"__main__"
:
unittest
.
main
()
\ No newline at end of file
unittest
.
main
()
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