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
1606828702-practice
Commits
994f17dc
Commit
994f17dc
authored
Dec 23, 2019
by
Rahmania Astrid Mochtar
Browse files
created FT for checking list of todo lists on display
parent
7f3f78e8
Pipeline
#28214
failed with stages
in 32 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
functional_tests/test_simple_list_creation.py
View file @
994f17dc
...
...
@@ -33,6 +33,8 @@ class NewVisitorTest(FunctionalTest):
submitbutton
.
click
()
time
.
sleep
(
1
)
page_text
=
self
.
browser
.
find_element_by_tag_name
(
'body'
).
text
self
.
assertIn
(
'1. Groceries'
,
page_text
)
# There is still a text box inviting her to add another item. She
# enters "Use peacock feathers to make a fly" (Edith is very
# methodical)
...
...
@@ -55,6 +57,9 @@ class NewVisitorTest(FunctionalTest):
inputbox
.
send_keys
(
'Buy peacock feathers'
)
submitbutton
.
click
()
page_text
=
self
.
browser
.
find_element_by_tag_name
(
'body'
).
text
self
.
assertIn
(
'1. Groceries'
,
page_text
)
# She notices that her list has a unique URL
time
.
sleep
(
1
)
edith_list_url
=
self
.
browser
.
current_url
...
...
@@ -80,13 +85,15 @@ class NewVisitorTest(FunctionalTest):
self
.
assertNotIn
(
'Buy peacock feathers'
,
page_text
)
self
.
assertNotIn
(
'make a fly'
,
page_text
)
self
.
assertIn
(
'1. Groceries'
,
page_text
)
# Francis starts a new list by entering a new item. He
# is less interesting than Edith...
listinputbox
=
self
.
browser
.
find_element_by_id
(
'id_new_list'
)
inputbox
=
self
.
browser
.
find_element_by_id
(
'id_new_item'
)
submitbutton
=
self
.
browser
.
find_element_by_id
(
'id_submit'
)
listinputbox
.
send_keys
(
'Groceries'
)
listinputbox
.
send_keys
(
'
Other
Groceries'
)
inputbox
.
send_keys
(
'Buy milk'
)
submitbutton
.
click
()
...
...
@@ -101,4 +108,6 @@ class NewVisitorTest(FunctionalTest):
self
.
assertNotIn
(
'Buy peacock feathers'
,
page_text
)
self
.
assertIn
(
'Buy milk'
,
page_text
)
self
.
assertIn
(
'1. Groceries'
,
page_text
)
self
.
assertIn
(
'2. Other Groceries'
,
page_text
)
# Satisfied, they both go back to slee
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