DEV: fix flaky admin_customize_themes spec (#26842)

Because the spec is searching for "5" and checking that only one result is returned, we need to control all names generated by theme fabricator.
This commit is contained in:
Krzysztof Kotlarek 2024-05-02 10:26:07 +10:00 committed by GitHub
parent 07dc6efdc9
commit 3c4a15a35f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
describe "Admin Customize Themes", type: :system do
fab!(:color_scheme)
fab!(:theme)
fab!(:theme) { Fabricate(:theme, name: "Cool theme 1") }
fab!(:admin) { Fabricate(:admin, locale: "en") }
let(:admin_customize_themes_page) { PageObjects::Pages::AdminCustomizeThemes.new }
@ -10,8 +10,8 @@ describe "Admin Customize Themes", type: :system do
before { sign_in(admin) }
describe "when visiting the page to customize themes" do
fab!(:theme_2) { Fabricate(:theme) }
fab!(:theme_3) { Fabricate(:theme) }
fab!(:theme_2) { Fabricate(:theme, name: "Cool theme 2") }
fab!(:theme_3) { Fabricate(:theme, name: "Cool theme 3") }
let(:delete_themes_confirm_modal) { PageObjects::Modals::DeleteThemesConfirm.new }
it "should allow admin to bulk delete inactive themes" do