Fakultas Ilmu Komputer UI

Commit 88ab8974 authored by Yumna Pratista Tastaftian's avatar Yumna Pratista Tastaftian
Browse files

edited functional test

parent 39a18dc9
Pipeline #28457 passed with stages
in 42 minutes and 9 seconds
......@@ -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>
......
......@@ -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>
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment