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
1606835595-practice
Commits
43acb640
Commit
43acb640
authored
Sep 24, 2019
by
Kevin Albert Simanjuntak
Browse files
failed test for multiple table
parent
e98e66bd
Pipeline
#20575
passed with stage
in 5 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
functional_tests.py
View file @
43acb640
...
...
@@ -11,6 +11,11 @@ class NewVisitorTest(unittest.TestCase):
def
tearDown
(
self
):
self
.
browser
.
quit
()
def
check_for_row_in_list_table
(
self
,
row_text
):
table
=
self
.
browser
.
find_element_by_id
(
'id_list_table'
)
rows
=
table
.
find_elements_by_tag_name
(
'tr'
)
self
.
assertIn
(
row_text
,
[
row
.
text
for
row
in
rows
])
# She is invited to enter a to-do item straight away
def
test_can_start_a_list_and_retrieve_it_later
(
self
):
# Edith has heard about a cool new online to-do app. She goes
...
...
@@ -46,10 +51,8 @@ class NewVisitorTest(unittest.TestCase):
inputbox
.
send_keys
(
'Use peacock feathers to make a fly'
)
inputbox
.
send_keys
(
Keys
.
ENTER
)
time
.
sleep
(
1
)
table
=
self
.
browser
.
find_element_by_id
(
'id_list_table'
)
rows
=
table
.
find_elements_by_tag_name
(
'tr'
)
self
.
assertIn
(
'1: Buy peacock feathers'
,
[
row
.
text
for
row
in
rows
])
self
.
assertIn
(
'2: Use peacock feathers to make a fly'
,[
row
.
text
for
row
in
rows
])
self
.
check_for_row_in_list_table
(
'1: Buy peacock feathers'
)
self
.
check_for_row_in_list_table
(
'2: Use peacock feathers to make a fly'
)
if
__name__
==
'__main__'
:
unittest
.
main
(
warnings
=
'ignore'
)
\ No newline at end of file
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