rename: Note→Post/Line (dashboard); Recognition→Note (drama); new-post/my-posts to billboard
- dashboard: Note→Post, Item→Line across models, forms, views, API, urls & tests - new-post (9×3) & my-posts (3×3) applets migrate from dashboard→billboard context; billboard view passes form & recent_posts - drama: Recognition→Note, related_name notes; billboard URL /recognition/→/my-notes/, set-palette at /note/<slug>/set-palette - recognition.js→note.js (module Note, data.note key); recognition-page.js→note-page.js; .recog-*→.note-* - _recognition.scss→_note.scss; BillNotes page header; applet slug billboard-recognition→billboard-notes (My Notes) - NoteSpec.js replaces RecognitionSpec.js; test_recognition.py→test_applet_my_notes.py - 4 migrations applied: dashboard 0004, applets 0011+0012, drama 0005; 683 ITs green Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
44
src/functional_tests/test_applet_my_posts.py
Normal file
44
src/functional_tests/test_applet_my_posts.py
Normal file
@@ -0,0 +1,44 @@
|
||||
from selenium.webdriver.common.by import By
|
||||
|
||||
from .base import FunctionalTest
|
||||
from .post_page import PostPage
|
||||
from .my_posts_page import MyPostsPage
|
||||
|
||||
|
||||
class MyPostsTest(FunctionalTest):
|
||||
|
||||
def test_logged_in_users_posts_are_saved_as_my_posts(self):
|
||||
self.create_pre_authenticated_session("disco@test.io")
|
||||
|
||||
self.browser.get(self.live_server_url + '/billboard/')
|
||||
post_page = PostPage(self)
|
||||
post_page.add_post_line("Reticulate splines")
|
||||
post_page.add_post_line("Regurgitate spines")
|
||||
first_post_url = self.browser.current_url
|
||||
|
||||
MyPostsPage(self).go_to_my_posts_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_post_url)
|
||||
)
|
||||
|
||||
self.browser.get(self.live_server_url + '/billboard/')
|
||||
post_page.add_post_line("Ribbon of death")
|
||||
second_post_url = self.browser.current_url
|
||||
|
||||
MyPostsPage(self).go_to_my_posts_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 Posts"),
|
||||
[],
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user