fix stale test assertions after note-page interaction changes — TDD
Some checks failed
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline failed

- NoteEquipTitleViewTest.test_doff_returns_200: assert greeting + title fields now returned by doff_title view
- NoteEquipTitleTest FT: click note item to lock before reading DON/DOFF text — opacity:0 by default makes .text return empty

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-04-28 02:00:22 -04:00
parent e78bbb873b
commit d79380faa5
2 changed files with 6 additions and 1 deletions

View File

@@ -310,7 +310,10 @@ class NoteEquipTitleViewTest(TestCase):
def test_doff_returns_200(self):
response = self.client.post("/billboard/note/stargazer/doff")
self.assertEqual(response.status_code, 200)
self.assertEqual(response.json(), {"ok": True})
data = response.json()
self.assertTrue(data["ok"])
self.assertEqual(data["greeting"], "Welcome,")
self.assertEqual(data["title"], "Earthman")
def test_don_requires_login(self):
self.client.logout()

View File

@@ -431,6 +431,8 @@ class NoteEquipTitleTest(FunctionalTest):
note_item = self.wait_for(
lambda: self.browser.find_element(By.CSS_SELECTOR, ".note-item")
)
# Click the note to lock it — makes DON/DOFF opacity:1 and interactable
note_item.click()
don_btn = note_item.find_element(By.CSS_SELECTOR, ".btn-equip")
doff_btn = note_item.find_element(By.CSS_SELECTOR, ".btn-unequip")