FIX: correctly display category name in replace text modal (#29612)
Bug introduced in this PR https://github.com/discourse/discourse/pull/23232 The previous modal was using `category.name` https://github.com/discourse/discourse/pull/23232/files#diff-bfae353a2f3457780e5c281b6a165261cfe552dd9dd791f3859e52d60e22be7fL20
This commit is contained in:
parent
8cb8ad763a
commit
973b599e11
|
@ -19,7 +19,7 @@
|
||||||
@type="checkbox"
|
@type="checkbox"
|
||||||
@checked={{category.selected}}
|
@checked={{category.selected}}
|
||||||
/>
|
/>
|
||||||
<span>{{category.displayName}}</span>
|
<span>{{category.name}}</span>
|
||||||
</label>
|
</label>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -121,4 +121,11 @@ describe "Admin Site Texts Page", type: :system do
|
||||||
expect(site_texts_page).to have_translation_value("Some overridden value")
|
expect(site_texts_page).to have_translation_value("Some overridden value")
|
||||||
expect(TranslationOverride.exists?(translation_key: "js.skip_to_main_content")).to eq(true)
|
expect(TranslationOverride.exists?(translation_key: "js.skip_to_main_content")).to eq(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "properly display category names in replace text modal" do
|
||||||
|
site_texts_page.visit
|
||||||
|
site_texts_page.click_replace_text_button
|
||||||
|
|
||||||
|
expect(page.all(".modal label span").map(&:text)).to eq(["Uncategorized"])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -48,6 +48,10 @@ module PageObjects
|
||||||
find(".site-text-value").fill_in(with: value)
|
find(".site-text-value").fill_in(with: value)
|
||||||
find(".save-changes").click
|
find(".save-changes").click
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def click_replace_text_button
|
||||||
|
find(".reseed button").click
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue