DEV: disambiguate system spec find to prevent flakyness (#22698)

This commit is contained in:
Roman Rizzi 2023-07-19 15:57:23 -03:00 committed by GitHub
parent 90f395a118
commit 9650bf9d08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -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: `<div>${attrs.summary}</div>` }));
html.push(
new RawHtml({
html: `<div class="generated-summary">${attrs.summary}</div>`,
})
);
html.push(
h("div.summarized-on", {}, [
new RenderGlimmer(

View File

@ -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