Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
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
88ab8974
Commit
88ab8974
authored
Dec 23, 2019
by
Yumna Pratista Tastaftian
Browse files
edited functional test
parent
39a18dc9
Pipeline
#28457
passed with stages
in 42 minutes and 9 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app_homepage/templates/app/list.html
View file @
88ab8974
...
...
@@ -6,6 +6,7 @@
{% block table %}
{% if list %}
<a
class=
"btn-secondary"
id=
"reset-button"
href=
"{% url 'delete_list' %}"
>
Reset all list
</a>
<table
id=
"id_list_table"
class=
"table"
>
{% for item in list.item_set.all %}
<tr><td>
{{ forloop.counter }}: {{ item.text }}
</td></tr>
...
...
app_homepage/templates/base.html
View file @
88ab8974
...
...
@@ -63,10 +63,9 @@
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6 col-md-offset-3 has-error"
>
{% block table %}
<div
class=
"row"
>
<div
class=
"col-md-6 col-md-offset-3 has-error"
>
{% block table %}
{% endblock %}
</div>
</div>
...
...
functional_tests/test_list_item_validation.py
View file @
88ab8974
...
...
@@ -7,7 +7,14 @@ import time
MAX_WAIT
=
10
class
ItemValidationTest
(
FunctionalTest
):
def
test_deleted_all
(
self
):
self
.
browser
.
get
(
self
.
live_server_url
)
self
.
browser
.
find_element_by_id
(
'id_new_item'
).
send_keys
(
'Make tea'
)
self
.
browser
.
find_element_by_id
(
'id_new_item'
).
send_keys
(
Keys
.
ENTER
)
self
.
wait_for_row_in_list_table
(
'1: Make tea'
)
self
.
browser
.
find_element_by_id
(
'reset-button'
).
send_keys
(
Keys
.
ENTER
)
def
test_cannot_add_empty_list_items
(
self
):
# Edith goes to the home page and accidentally tries to submit
# an empty list item. She hits Enter on the empty input box
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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