billboard applets: drop billboard- prefix from partials & ids; Most Recent → Most Recent Scroll; room_scroll → scroll — TDD

- Slug renames (mig 0004): billboard-my-scrolls → my-scrolls; billboard-my-contacts → my-contacts; billboard-most-recent → most-recent-scroll (name → "Most Recent Scroll"); billboard-notes → notes
- Partial filenames lose the `billboard-` token to mirror dashboard/gameboard convention; element ids follow (id_applet_my_scrolls, id_applet_my_contacts, id_applet_most_recent_scroll, id_applet_notes, id_applet_scroll); .applet-billboard-scroll → .applet-scroll
- View fn billboard.views.room_scroll → scroll; template apps/billboard/room_scroll.html → scroll.html (URL name `billboard:scroll` already correct)
- ITs + FTs updated to new identifiers; SCSS selectors retitled

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-05-03 23:22:01 -04:00
parent b1a11504f5
commit 2dc68c41a7
14 changed files with 143 additions and 87 deletions

View File

@@ -105,7 +105,7 @@ class StargazerNoteFromDashboardTest(FunctionalTest):
defaults={"name": "Palettes", "grid_cols": 6, "grid_rows": 6, "context": "dashboard"},
)
Applet.objects.get_or_create(
slug="billboard-notes",
slug="notes",
defaults={"name": "Note", "grid_cols": 4, "grid_rows": 4, "context": "billboard"},
)
self.gamer = User.objects.create(email="stargazer@test.io")
@@ -323,7 +323,7 @@ class StargazerNoteFromSkyPageTest(FunctionalTest):
defaults={"name": "My Sky", "grid_cols": 6, "grid_rows": 6, "context": "dashboard"},
)
Applet.objects.get_or_create(
slug="billboard-notes",
slug="notes",
defaults={"name": "Note", "grid_cols": 4, "grid_rows": 4, "context": "billboard"},
)
self.gamer = User.objects.create(email="stargazer@test.io")
@@ -413,7 +413,7 @@ class NoteEquipTitleTest(FunctionalTest):
super().setUp()
self.browser.set_window_size(800, 1200)
Applet.objects.get_or_create(
slug="billboard-notes",
slug="notes",
defaults={"name": "My Notes", "grid_cols": 4, "grid_rows": 4, "context": "billboard"},
)
self.gamer = User.objects.create(email="stargazer@test.io")

View File

@@ -25,9 +25,9 @@ class BillboardScrollTest(FunctionalTest):
def setUp(self):
super().setUp()
for slug, name, cols, rows in [
("billboard-my-scrolls", "My Scrolls", 4, 3),
("billboard-my-contacts", "Contacts", 4, 3),
("billboard-most-recent", "Most Recent", 8, 6),
("my-scrolls", "My Scrolls", 4, 3),
("my-contacts", "Contacts", 4, 3),
("most-recent-scroll", "Most Recent Scroll", 8, 6),
]:
Applet.objects.get_or_create(
slug=slug,
@@ -193,7 +193,7 @@ class BillscrollPositionTest(FunctionalTest):
class BillboardAppletsTest(FunctionalTest):
"""
FT: billboard page renders three applets in the grid — My Scrolls,
My Contacts, and Most Recent — with a functioning gear menu.
My Contacts, and Most Recent Scroll — with a functioning gear menu.
"""
def setUp(self):
@@ -202,9 +202,9 @@ class BillboardAppletsTest(FunctionalTest):
self.founder = User.objects.create(email="founder@test.io")
self.room = Room.objects.create(name="Arcane Assembly", owner=self.founder)
for slug, name, cols, rows in [
("billboard-my-scrolls", "My Scrolls", 4, 3),
("billboard-my-contacts", "Contacts", 4, 3),
("billboard-most-recent", "Most Recent", 8, 6),
("my-scrolls", "My Scrolls", 4, 3),
("my-contacts", "Contacts", 4, 3),
("most-recent-scroll", "Most Recent Scroll", 8, 6),
]:
Applet.objects.get_or_create(
slug=slug,
@@ -217,10 +217,10 @@ class BillboardAppletsTest(FunctionalTest):
self.browser.get(self.live_server_url + "/billboard/")
# 2. Assert all three applet sections present
self.wait_for(
lambda: self.browser.find_element(By.ID, "id_applet_billboard_my_scrolls")
lambda: self.browser.find_element(By.ID, "id_applet_my_scrolls")
)
self.browser.find_element(By.ID, "id_applet_billboard_my_contacts")
self.browser.find_element(By.ID, "id_applet_billboard_most_recent")
self.browser.find_element(By.ID, "id_applet_my_contacts")
self.browser.find_element(By.ID, "id_applet_most_recent_scroll")
def test_billboard_my_scrolls_lists_rooms(self):
# 1. Log in, navigate to billboard
@@ -230,7 +230,7 @@ class BillboardAppletsTest(FunctionalTest):
self.wait_for(
lambda: self.assertIn(
"Arcane Assembly",
self.browser.find_element(By.ID, "id_applet_billboard_my_scrolls").text,
self.browser.find_element(By.ID, "id_applet_my_scrolls").text,
)
)
@@ -250,7 +250,7 @@ class BillboardAppletsTest(FunctionalTest):
self.wait_for_slow(lambda: self.assertTrue(menu.is_displayed()))
def test_toggling_applets_keeps_content_and_persists_per_applet(self):
# Seed an event so Most Recent renders prose, not the empty fallback
# Seed an event so Most Recent Scroll renders prose, not the empty fallback
record(
self.room, GameEvent.SLOT_FILLED, actor=self.founder,
slot_number=1, token_type="coin",
@@ -260,15 +260,15 @@ class BillboardAppletsTest(FunctionalTest):
self.create_pre_authenticated_session("founder@test.io")
self.browser.get(self.live_server_url + "/billboard/")
# All three applets visible; Most Recent shows event prose, My Scrolls shows the room
# All three applets visible; Most Recent Scroll shows event prose, My Scrolls shows the room
self.wait_for(
lambda: self.browser.find_element(By.ID, "id_applet_billboard_most_recent")
lambda: self.browser.find_element(By.ID, "id_applet_most_recent_scroll")
)
most_recent = self.browser.find_element(By.ID, "id_applet_billboard_most_recent")
self.assertIn("Coin-on-a-String", most_recent.text)
most_recent_scroll = self.browser.find_element(By.ID, "id_applet_most_recent_scroll")
self.assertIn("Coin-on-a-String", most_recent_scroll.text)
self.assertIn(
"Arcane Assembly",
self.browser.find_element(By.ID, "id_applet_billboard_my_scrolls").text,
self.browser.find_element(By.ID, "id_applet_my_scrolls").text,
)
# Open gear, uncheck Contacts, click OK
@@ -278,26 +278,26 @@ class BillboardAppletsTest(FunctionalTest):
lambda: self.browser.find_element(By.ID, "id_billboard_applet_menu")
)
contacts_cb = menu.find_element(
By.CSS_SELECTOR, "input[value='billboard-my-contacts']"
By.CSS_SELECTOR, "input[value='my-contacts']"
)
self.browser.execute_script("arguments[0].click()", contacts_cb)
menu.find_element(By.CSS_SELECTOR, "button[type='submit']").click()
# Contacts is hidden; Most Recent + My Scrolls keep their content (bug #2)
# Contacts is hidden; Most Recent Scroll + My Scrolls keep their content (bug #2)
self.wait_for(
lambda: self.assertEqual(
self.browser.find_elements(By.ID, "id_applet_billboard_my_contacts"),
self.browser.find_elements(By.ID, "id_applet_my_contacts"),
[],
)
)
most_recent = self.browser.find_element(By.ID, "id_applet_billboard_most_recent")
self.assertIn("Coin-on-a-String", most_recent.text)
most_recent_scroll = self.browser.find_element(By.ID, "id_applet_most_recent_scroll")
self.assertIn("Coin-on-a-String", most_recent_scroll.text)
self.assertIn(
"Arcane Assembly",
self.browser.find_element(By.ID, "id_applet_billboard_my_scrolls").text,
self.browser.find_element(By.ID, "id_applet_my_scrolls").text,
)
# Second toggle: hide Most Recent. Contacts must NOT come back (bug #1)
# Second toggle: hide Most Recent Scroll. Contacts must NOT come back (bug #1)
gear = self.browser.find_element(By.CSS_SELECTOR, ".billboard-page .gear-btn")
self.browser.execute_script("arguments[0].click()", gear)
menu = self.wait_for(
@@ -305,38 +305,38 @@ class BillboardAppletsTest(FunctionalTest):
)
# The freshly-rendered menu must reflect DB state (Contacts unchecked)
contacts_cb = menu.find_element(
By.CSS_SELECTOR, "input[value='billboard-my-contacts']"
By.CSS_SELECTOR, "input[value='my-contacts']"
)
self.assertFalse(contacts_cb.is_selected())
most_recent_cb = menu.find_element(
By.CSS_SELECTOR, "input[value='billboard-most-recent']"
most_recent_scroll_cb = menu.find_element(
By.CSS_SELECTOR, "input[value='most-recent-scroll']"
)
self.browser.execute_script("arguments[0].click()", most_recent_cb)
self.browser.execute_script("arguments[0].click()", most_recent_scroll_cb)
menu.find_element(By.CSS_SELECTOR, "button[type='submit']").click()
# Most Recent gone; Contacts still hidden (the stale-form bug would re-show it)
# Most Recent Scroll gone; Contacts still hidden (the stale-form bug would re-show it)
self.wait_for(
lambda: self.assertEqual(
self.browser.find_elements(By.ID, "id_applet_billboard_most_recent"),
self.browser.find_elements(By.ID, "id_applet_most_recent_scroll"),
[],
)
)
self.assertEqual(
self.browser.find_elements(By.ID, "id_applet_billboard_my_contacts"),
self.browser.find_elements(By.ID, "id_applet_my_contacts"),
[],
)
# And after a hard refresh both stay hidden, menu reflects DB
self.browser.refresh()
self.wait_for(
lambda: self.browser.find_element(By.ID, "id_applet_billboard_my_scrolls")
lambda: self.browser.find_element(By.ID, "id_applet_my_scrolls")
)
self.assertEqual(
self.browser.find_elements(By.ID, "id_applet_billboard_my_contacts"),
self.browser.find_elements(By.ID, "id_applet_my_contacts"),
[],
)
self.assertEqual(
self.browser.find_elements(By.ID, "id_applet_billboard_most_recent"),
self.browser.find_elements(By.ID, "id_applet_most_recent_scroll"),
[],
)
@@ -365,7 +365,7 @@ class BillscrollAppletsTest(FunctionalTest):
)
# 2. The full-width applet section is present
self.wait_for(
lambda: self.browser.find_element(By.ID, "id_applet_billboard_scroll")
lambda: self.browser.find_element(By.ID, "id_applet_scroll")
)
def test_billscroll_applet_contains_drama_events(self):

View File

@@ -56,7 +56,7 @@ INVITEE_EMAIL = "invitee@test.io"
def _applets():
for slug, name, ctx in [
("my-posts", "My Posts", "billboard"),
("billboard-my-scrolls", "My Scrolls","billboard"),
("my-scrolls", "My Scrolls","billboard"),
]:
Applet.objects.get_or_create(slug=slug, defaults={"name": name, "context": ctx})