diff --git a/src/functional_tests/test_my_buds.py b/src/functional_tests/test_my_buds.py index 06978e1..759c202 100644 --- a/src/functional_tests/test_my_buds.py +++ b/src/functional_tests/test_my_buds.py @@ -55,6 +55,12 @@ class MyBudsPageTest(FunctionalTest): self.wait_for(lambda: self.assertIn( self.alice, list(self.gamer.buds.all()) )) + # "No buds yet" empty-state row dismisses async as the first bud lands + # (shell partial renders w. .applet-list-entry--empty, not .bud-entry--empty) + self.wait_for(lambda: self.assertEqual( + self.browser.find_elements(By.CSS_SELECTOR, ".applet-list-entry--empty"), + [], + )) def test_no_autocomplete_suggestions_on_my_buds_page(self): """The bud-autocomplete pool is request.user.buds — surfacing buds diff --git a/src/templates/apps/billboard/_partials/_bud_add_panel.html b/src/templates/apps/billboard/_partials/_bud_add_panel.html index cb4aade..2abbd68 100644 --- a/src/templates/apps/billboard/_partials/_bud_add_panel.html +++ b/src/templates/apps/billboard/_partials/_bud_add_panel.html @@ -35,8 +35,10 @@ // Skip if already in DOM (server-side dedup ensures M2M idempotence; // this guards a fast double-click that races the post-add refresh). if (list.querySelector('[data-bud-id="' + bud.id + '"]')) return; - // Drop the empty-state row if present - var empty = list.querySelector('.bud-entry--empty'); + // Drop the empty-state row if present — _applet-list-shell renders + // it w. `.applet-list-entry--empty` (NOT `.bud-entry--empty`); the + // shell sets the family-agnostic class. + var empty = list.querySelector('.applet-list-entry--empty'); if (empty) empty.remove(); var li = document.createElement('li');