renamed List to Note everywhere thru-out project in preparation for complete overhaul of applet capabilities
This commit is contained in:
44
src/functional_tests/test_my_notes.py
Normal file
44
src/functional_tests/test_my_notes.py
Normal file
@@ -0,0 +1,44 @@
|
||||
from selenium.webdriver.common.by import By
|
||||
|
||||
from .base import FunctionalTest
|
||||
from .note_page import NotePage
|
||||
from .my_notes_page import MyNotesPage
|
||||
|
||||
|
||||
class MyNotesTest(FunctionalTest):
|
||||
|
||||
def test_logged_in_users_notes_are_saved_as_my_notes(self):
|
||||
self.create_pre_authenticated_session("disco@test.io")
|
||||
|
||||
self.browser.get(self.live_server_url)
|
||||
note_page = NotePage(self)
|
||||
note_page.add_note_item("Reticulate splines")
|
||||
note_page.add_note_item("Regurgitate spines")
|
||||
first_note_url = self.browser.current_url
|
||||
|
||||
MyNotesPage(self).go_to_my_notes_page("disco@test.io")
|
||||
|
||||
self.wait_for(
|
||||
lambda: self.browser.find_element(By.LINK_TEXT, "Reticulate splines")
|
||||
)
|
||||
self.browser.find_element(By.LINK_TEXT, "Reticulate splines").click()
|
||||
self.wait_for(
|
||||
lambda: self.assertEqual(self.browser.current_url, first_note_url)
|
||||
)
|
||||
|
||||
self.browser.get(self.live_server_url)
|
||||
note_page.add_note_item("Ribbon of death")
|
||||
second_note_url = self.browser.current_url
|
||||
|
||||
MyNotesPage(self).go_to_my_notes_page("disco@test.io")
|
||||
self.wait_for(
|
||||
lambda: self.browser.find_element(By.LINK_TEXT, "Ribbon of death")
|
||||
)
|
||||
|
||||
self.browser.find_element(By.CSS_SELECTOR, "#id_logout").click()
|
||||
self.wait_for(
|
||||
lambda: self.assertEqual(
|
||||
self.browser.find_elements(By.LINK_TEXT, "My notes"),
|
||||
[],
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user