created functional_tests.my_lists_page to contain helpers for viewing shared lists; refactored several other FTs to passing

This commit is contained in:
Disco DeDisco
2026-02-17 23:27:54 -05:00
parent e32c6bbfd6
commit a85e0597d7
4 changed files with 40 additions and 13 deletions

View File

@@ -2,6 +2,7 @@ from selenium.webdriver.common.by import By
from .base import FunctionalTest
from .list_page import ListPage
from .my_lists_page import MyListsPage
class MyListsTest(FunctionalTest):
@@ -15,14 +16,7 @@ class MyListsTest(FunctionalTest):
list_page.add_list_item("Regurgitate spines")
first_list_url = self.browser.current_url
self.browser.find_element(By.LINK_TEXT, "My lists").click()
self.wait_for(
lambda: self.assertIn(
"discoman@example.com",
self.browser.find_element(By.CSS_SELECTOR, "h2").text,
)
)
MyListsPage(self).go_to_my_lists_page("discoman@example.com")
self.wait_for(
lambda: self.browser.find_element(By.LINK_TEXT, "Reticulate splines")
@@ -40,10 +34,7 @@ class MyListsTest(FunctionalTest):
self.wait_for(
lambda: self.browser.find_element(By.LINK_TEXT, "Ribbon of death")
)
self.browser.find_element(By.LINK_TEXT, "Ribbon of death").click()
self.wait_for(
lambda: self.assertEqual(self.browser.current_url, second_list_url)
)
MyListsPage(self).go_to_my_lists_page("discoman@example.com")
self.browser.find_element(By.CSS_SELECTOR, "#id_logout").click()
self.wait_for(