my-buds async add: insert new row before .applet-list-buffer, not after — keeps spacer last
`_appendBudEntry` queried `.bud-entry-buffer` (a class that doesn't exist — the shell renders `.applet-list-buffer`), so the lookup missed and the row fell through to appendChild, landing BELOW the trailing spacer <li> and leaving a visible gap between the list and the new bud. Query the real class so the new row inserts before the spacer. FT now asserts the buffer stays last-child. Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,13 @@ class MyBudsPageTest(FunctionalTest):
|
||||
|
||||
sel = f".bud-entry[data-bud-id='{self.alice.id}']"
|
||||
row = self.wait_for(lambda: self.browser.find_element(By.CSS_SELECTOR, sel))
|
||||
# The trailing `.applet-list-buffer` spacer must stay LAST — the new
|
||||
# row goes BEFORE it, not after (regression: querying the wrong buffer
|
||||
# class dropped the row below the spacer).
|
||||
last = self.browser.find_element(
|
||||
By.CSS_SELECTOR, "#id_buds_list > li:last-child"
|
||||
)
|
||||
self.assertIn("applet-list-buffer", (last.get_attribute("class") or "").split())
|
||||
# Carries both classes (styling + tooltip-lock both key on these).
|
||||
cls = (row.get_attribute("class") or "").split()
|
||||
self.assertIn("applet-list-entry", cls)
|
||||
|
||||
Reference in New Issue
Block a user