add_list_item() helper added to functional_tests.base; further propagated into .test_layout_and_styling, .test_list_item_validation, .test_my_lists & .test_simple_list_creation; all FTs passing locally (tho js-dependent FT still require nginx to serve scripts properly in docker or on server)

This commit is contained in:
Disco DeDisco
2026-02-07 19:44:47 -05:00
parent 10ba5b84e4
commit 58b526f434
5 changed files with 59 additions and 31 deletions

View File

@@ -22,19 +22,14 @@ class NewVisitorTest(FunctionalTest):
inputbox.send_keys(Keys.ENTER)
self.wait_for_row_in_list_table('1. Buy peacock feathers')
inputbox = self.get_item_input_box()
inputbox.send_keys('Use peacock feathers to make a fly')
inputbox.send_keys(Keys.ENTER)
self.add_list_item("Use peacock feathers to make a fly")
self.wait_for_row_in_list_table('2. Use peacock feathers to make a fly')
self.wait_for_row_in_list_table('1. Buy peacock feathers')
def test_multiple_users_can_start_lists_at_different_urls(self):
self.browser.get(self.live_server_url)
inputbox = self.get_item_input_box()
inputbox.send_keys('Buy peacock feathers')
inputbox.send_keys(Keys.ENTER)
self.wait_for_row_in_list_table('1. Buy peacock feathers')
self.add_list_item("Buy peacock feathers")
edith_dash_url = self.browser.current_url
self.assertRegex(edith_dash_url, '/apps/dashboard/.+')
@@ -45,10 +40,7 @@ class NewVisitorTest(FunctionalTest):
page_text = self.browser.find_element(By.TAG_NAME, 'body').text
self.assertNotIn('Buy peacock feathers', page_text)
inputbox = self.get_item_input_box()
inputbox.send_keys('Buy milk')
inputbox.send_keys(Keys.ENTER)
self.wait_for_row_in_list_table('1. Buy milk')
self.add_list_item("Buy milk")
francis_dash_url = self.browser.current_url
self.assertRegex(francis_dash_url, '/apps/dashboard/.+')