From 779f46c5babcc1b99ad1ff654ecc24e9f34724b6 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Sat, 3 Jan 2026 18:35:58 -0500 Subject: [PATCH] commenced FTs for layout & styling --- functional_tests/tests.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/functional_tests/tests.py b/functional_tests/tests.py index 9114a75..5359941 100644 --- a/functional_tests/tests.py +++ b/functional_tests/tests.py @@ -80,3 +80,25 @@ class NewVisitorTest(LiveServerTestCase): page_text = self.browser.find_element(By.TAG_NAME, 'body').text self.assertNotIn('Buy peacock feathers', page_text) self.assertIn('Buy milk', page_text) + + def test_layout_and_styling(self): + self.browser.get(self.live_server_url) + + self.browser.set_window_size(1024, 768) + + inputbox = self.browser.find_element(By.ID, 'id-new-item') + self.assertAlmostEqual( + inputbox.location['x'] + inputbox.size['width'] / 2, + 512, + delta=10, + ) + + inputbox.send_keys('testing') + inputbox.send_keys(Keys.ENTER) + self.wait_for_row_in_list_table('1. testing') + inputbox = self.browser.find_element(By.ID, 'id-new-item') + self.assertAlmostEqual( + inputbox.location['x'] + inputbox.size['width'] / 2, + 512, + delta=10, + )