created new FT file at functional_tests.test_my_lists, where the first test model focuses on the integrity of cookie sessions; much of FT login/logout logic offloaded to helper functions in .base;logout django templating added to base.html
This commit is contained in:
@@ -43,3 +43,17 @@ class FunctionalTest(StaticLiveServerTestCase):
|
||||
|
||||
def get_item_input_box(self):
|
||||
return self.browser.find_element(By.ID, "id_text")
|
||||
|
||||
def wait_to_be_logged_in(self, email):
|
||||
self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, "#id_logout"),
|
||||
)
|
||||
navbar = self.browser.find_element(By.CSS_SELECTOR, ".navbar")
|
||||
self.assertIn(email, navbar.text)
|
||||
|
||||
def wait_to_be_logged_out(self, email):
|
||||
self.wait_for(
|
||||
lambda: self.browser.find_element(By.CSS_SELECTOR, "input[name=email]"),
|
||||
)
|
||||
navbar = self.browser.find_element(By.CSS_SELECTOR, ".navbar")
|
||||
self.assertNotIn(email, navbar.text)
|
||||
|
||||
Reference in New Issue
Block a user