From 1ddabe44480a81fa4203313d806937191229525a Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Tue, 30 Dec 2025 22:19:42 -0500 Subject: [PATCH] changed _ naming convention in el ids to -; expanded home.html to include head w. title, body w. h1, input & table for testing purposes; functional_tests updated to accomodate above changes & for more specific error handling during tests --- functional_tests.py | 9 ++++++--- templates/apps/dashboard/home.html | 11 ++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/functional_tests.py b/functional_tests.py index ef9a45e..5598e15 100644 --- a/functional_tests.py +++ b/functional_tests.py @@ -17,7 +17,7 @@ class NewVisitorTest(unittest.TestCase): header_text = self.browser.find_element(By.TAG_NAME, 'h1').text self.assertIn('To-Do', header_text) - inputbox = self.browser.find_element(By.ID, 'id_new_item') + inputbox = self.browser.find_element(By.ID, 'id-new-item') self.assertEqual(inputbox.get_attribute('placeholder'), 'Enter a to-do item') inputbox.send_keys('Buy peacock feathers') @@ -25,9 +25,12 @@ class NewVisitorTest(unittest.TestCase): inputbox.send_keys(Keys.ENTER) time.sleep(1) - table = self.browser.find_element(By.ID, 'id_list_table') + table = self.browser.find_element(By.ID, 'id-list-table') rows = table.find_elements(By.TAG_NAME, 'tr') - self.assertTrue(any(row.text == '1: Buy peacock feathers' for row in rows)) + self.assertTrue( + any(row.text == '1: Buy peacock feathers' for row in rows), + 'New to-do item did not appear in table', + ) self.fail("Finish the test!") diff --git a/templates/apps/dashboard/home.html b/templates/apps/dashboard/home.html index 94d4105..259e5ae 100644 --- a/templates/apps/dashboard/home.html +++ b/templates/apps/dashboard/home.html @@ -1,3 +1,12 @@ - To-Do lists + + To-Do lists + + +

Your To-Do List

+ + + +
+ \ No newline at end of file