Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1506757352-practice
Commits
a3f040e4
Commit
a3f040e4
authored
Oct 09, 2019
by
Syahrul Ardiansyah
Browse files
first steps of FT for layout + styling
parent
1dc51d9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
functional_tests/tests.py
View file @
a3f040e4
...
...
@@ -102,3 +102,27 @@ class NewVisitorTest(LiveServerTestCase):
# that the site has generated a unique URL for her -- there is some
# explanatory text to that effect.
self
.
fail
(
'Finish the test!'
)
def
test_layout_and_styling
(
self
):
# Edith goes to the home page
self
.
browser
.
get
(
self
.
live_server_url
)
self
.
browser
.
set_window_size
(
1024
,
768
)
# She notices the input box is nicely centered
inputbox
=
self
.
browser
.
find_element_by_id
(
'id_new_item'
)
self
.
assertAlmostEqual
(
inputbox
.
location
[
'x'
]
+
inputbox
.
size
[
'width'
]
/
2
,
512
,
delta
=
10
)
# She starts a new list and sees the input is nicely
# centered there too
inputbox
.
send_keys
(
'testing'
)
inputbox
.
send_keys
(
Keys
.
ENTER
)
self
.
wait_for_row_in_list_table
(
'1: testing'
)
inputbox
=
self
.
browser
.
find_element_by_id
(
'id_new_item'
)
self
.
assertAlmostEqual
(
inputbox
.
location
[
'x'
]
+
inputbox
.
size
[
'width'
]
/
2
,
512
,
delta
=
10
)
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