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:
Krzysztof Kotlarek 2024-11-06 13:39:52 +11:00 committed by GitHub
parent 8cb8ad763a
commit 973b599e11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions

View File

@ -19,7 +19,7 @@
@type="checkbox"
@checked={{category.selected}}
/>
<span>{{category.displayName}}</span>
<span>{{category.name}}</span>
</label>
{{/each}}
</fieldset>

View File

@ -121,4 +121,11 @@ describe "Admin Site Texts Page", type: :system do
expect(site_texts_page).to have_translation_value("Some overridden value")
expect(TranslationOverride.exists?(translation_key: "js.skip_to_main_content")).to eq(true)
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

View File

@ -48,6 +48,10 @@ module PageObjects
find(".site-text-value").fill_in(with: value)
find(".save-changes").click
end
def click_replace_text_button
find(".reseed button").click
end
end
end
end