From a5c0b87d25791ace239688958ce21deb0e01e91e Mon Sep 17 00:00:00 2001 From: Krzysztof Kotlarek Date: Fri, 21 Jul 2023 12:45:18 +1000 Subject: [PATCH] FIX: wrong collapsible parameter in sidebar API (#22729) Bug introduced here https://github.com/discourse/discourse/pull/22534/files#diff-a53b5ae4b732d8bd06143ca91d1b5e96ab8cc1d6283f223d53bd8dae0f536d3eR9 https://github.com/discourse/discourse/pull/22534/files#diff-b145895f327646d995f2231c305745bf0c61108087bfc001b598d9fcfdbd828fR15 We are passing @collapsable and not @collapsableSections --- .../discourse/app/components/sidebar/api-sections.hbs | 2 +- .../discourse/tests/acceptance/sidebar-plugin-api-test.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/sidebar/api-sections.hbs b/app/assets/javascripts/discourse/app/components/sidebar/api-sections.hbs index a431fc454bf..1f67151ea5f 100644 --- a/app/assets/javascripts/discourse/app/components/sidebar/api-sections.hbs +++ b/app/assets/javascripts/discourse/app/components/sidebar/api-sections.hbs @@ -6,7 +6,7 @@ @headerActionsIcon={{customSection.actionsIcon}} @headerActions={{customSection.actions}} @willDestroy={{customSection.willDestroy}} - @collapsable={{@collapsableSections}} + @collapsable={{@collapsable}} @displaySection={{customSection.displaySection}} > diff --git a/app/assets/javascripts/discourse/tests/acceptance/sidebar-plugin-api-test.js b/app/assets/javascripts/discourse/tests/acceptance/sidebar-plugin-api-test.js index c19e1731b52..e8f57db178f 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/sidebar-plugin-api-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/sidebar-plugin-api-test.js @@ -251,6 +251,12 @@ acceptance("Sidebar - Plugin API", function (needs) { "displays header with correct text" ); + assert + .dom( + ".sidebar-section[data-section-name='test-chat-channels'] .sidebar-section-header-caret" + ) + .exists(); + await click( ".sidebar-section[data-section-name='test-chat-channels'] .sidebar-section-header-dropdown summary" );