2026-02-17 23:27:54 -05:00
|
|
|
from selenium.webdriver.common.by import By
|
|
|
|
|
|
2026-03-07 00:05:32 -05:00
|
|
|
from apps.lyric.models import User
|
|
|
|
|
|
2026-02-17 23:27:54 -05:00
|
|
|
|
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>
2026-04-22 22:32:34 -04:00
|
|
|
class MyPostsPage:
|
2026-02-17 23:27:54 -05:00
|
|
|
def __init__(self, test):
|
|
|
|
|
self.test = test
|
2026-03-11 13:59:43 -04:00
|
|
|
|
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>
2026-04-22 22:32:34 -04:00
|
|
|
def go_to_my_posts_page(self, email):
|
2026-02-17 23:27:54 -05:00
|
|
|
self.test.browser.get(self.test.live_server_url)
|
2026-03-07 00:05:32 -05:00
|
|
|
user = User.objects.get(email=email)
|
|
|
|
|
self.test.browser.get(
|
|
|
|
|
self.test.live_server_url + f'/dashboard/users/{user.id}/'
|
|
|
|
|
)
|
2026-02-17 23:27:54 -05:00
|
|
|
self.test.wait_for(
|
|
|
|
|
lambda: self.test.assertIn(
|
|
|
|
|
email,
|
2026-03-11 14:50:08 -04:00
|
|
|
self.test.browser.find_element(By.CSS_SELECTOR, ".navbar-identity").text.lower(),
|
2026-02-17 23:27:54 -05:00
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
return self
|