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
1606836976-practice
Commits
f8c62aad
Commit
f8c62aad
authored
Oct 10, 2019
by
Yumna Pratista
Browse files
first step of ch8
parent
feb02269
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
app_homepage/__pycache__/urls.cpython-37.pyc
View file @
f8c62aad
No preview for this file type
app_homepage/templates/app/home.html
View file @
f8c62aad
...
...
@@ -2,9 +2,11 @@
<title>
To-Do lists
</title>
</head>
<body>
<h1>
Start a new To-Do list
</h1>
<form
method=
"POST"
action=
"/lists/new"
>
>
<input
name=
"item_text"
id=
"id_new_item"
placeholder=
"Enter a to-do item"
/>
<h1>
Start a new To-Do list
</h1>
<form
method=
"POST"
action=
"/lists/new"
>
<p
style=
"text-align: center;"
>
<input
name=
"item_text"
id=
"id_new_item"
placeholder=
"Enter a to-do item"
/>
</p>
{% csrf_token %}
</form>
</form>
</body>
\ No newline at end of file
functional_tests/__pycache__/tests.cpython-37.pyc
View file @
f8c62aad
No preview for this file type
functional_tests/tests.py
View file @
f8c62aad
...
...
@@ -133,7 +133,22 @@ class NewVisitorTest(LiveServerTestCase):
self
.
assertNotIn
(
'Buy peacock feathers'
,
page_text
)
self
.
assertIn
(
'Buy milk'
,
page_text
)
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'
)
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
)
# if __name__ == '__main__': #
# unittest.main(warnings='ignore') #
\ No newline at end of file
geckodriver.log
View file @
f8c62aad
This diff is collapsed.
Click to expand it.
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