Fakultas Ilmu Komputer UI

Commit 43acb640 authored by Kevin Albert Simanjuntak's avatar Kevin Albert Simanjuntak
Browse files

failed test for multiple table

parent e98e66bd
Pipeline #20575 passed with stage
in 5 minutes and 14 seconds
......@@ -11,6 +11,11 @@ class NewVisitorTest(unittest.TestCase):
def tearDown(self):
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')
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__':
\ No newline at end of file
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