diff --git a/app/assets/javascripts/discourse/app/widgets/summary-box.js b/app/assets/javascripts/discourse/app/widgets/summary-box.js index 8718e2b15ae..89e79d2670a 100644 --- a/app/assets/javascripts/discourse/app/widgets/summary-box.js +++ b/app/assets/javascripts/discourse/app/widgets/summary-box.js @@ -24,7 +24,7 @@ createWidget("summary-skeleton", { h("span", {}, [ iconNode("magic", { class: "rotate-center" }), h( - "p.placeholder-generating-summary-text", + "div.placeholder-generating-summary-text", {}, I18n.t("summary.in_progress") ), @@ -51,7 +51,11 @@ export default createWidget("summary-box", { const html = []; if (attrs.summary) { - html.push(new RawHtml({ html: `
${attrs.summary}
` })); + html.push( + new RawHtml({ + html: `
${attrs.summary}
`, + }) + ); html.push( h("div.summarized-on", {}, [ new RenderGlimmer( diff --git a/spec/system/topic_summarization_spec.rb b/spec/system/topic_summarization_spec.rb index f7407484b4c..368e3b1d92e 100644 --- a/spec/system/topic_summarization_spec.rb +++ b/spec/system/topic_summarization_spec.rb @@ -25,7 +25,7 @@ RSpec.describe "Topic summarization", type: :system, js: true do find(".topic-strategy-summarization").click - summary = find(".summary-box p").text + summary = find(".summary-box .generated-summary p").text expect(summary).to eq(expected_summary) end