DEV: disambiguate system spec find to prevent flakyness (#22698)
This commit is contained in:
parent
90f395a118
commit
9650bf9d08
|
@ -24,7 +24,7 @@ createWidget("summary-skeleton", {
|
||||||
h("span", {}, [
|
h("span", {}, [
|
||||||
iconNode("magic", { class: "rotate-center" }),
|
iconNode("magic", { class: "rotate-center" }),
|
||||||
h(
|
h(
|
||||||
"p.placeholder-generating-summary-text",
|
"div.placeholder-generating-summary-text",
|
||||||
{},
|
{},
|
||||||
I18n.t("summary.in_progress")
|
I18n.t("summary.in_progress")
|
||||||
),
|
),
|
||||||
|
@ -51,7 +51,11 @@ export default createWidget("summary-box", {
|
||||||
const html = [];
|
const html = [];
|
||||||
|
|
||||||
if (attrs.summary) {
|
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(
|
html.push(
|
||||||
h("div.summarized-on", {}, [
|
h("div.summarized-on", {}, [
|
||||||
new RenderGlimmer(
|
new RenderGlimmer(
|
||||||
|
|
|
@ -25,7 +25,7 @@ RSpec.describe "Topic summarization", type: :system, js: true do
|
||||||
|
|
||||||
find(".topic-strategy-summarization").click
|
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)
|
expect(summary).to eq(expected_summary)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue