A platform for community discussion. Free, open, simple.
FIX: flaky system admin flags specs (#28873)
Krzysztof Kotlarek560b01f0cf79
diff --git a/spec/system/admin_flags_spec.rb b/spec/system/admin_flags_spec.rbindex f826946a30b..6e43e8bd44e 100644--- a/spec/system/admin_flags_spec.rb+++ b/spec/system/admin_flags_spec.rb@@ -134,7 +134,7 @@ describe "Admin Flags Page", type: :system do# deleteadmin_flags_page.visit.click_delete_flag("custom_tasteless").confirm_delete- expect(admin_flags_page).to have_no_flag("tasteless")+ expect(admin_flags_page).to have_no_flag("custom_tasteless")expect(admin_flags_page).to have_add_flag_button_enabled@@ -157,6 +157,16 @@ describe "Admin Flags Page", type: :system do.select_applies_to("Post").click_save+ expect(admin_flags_page).to have_flags(+ "Send @%{username} a message",+ "Off-Topic",+ "Inappropriate",+ "Spam",+ "Illegal",+ "Something Else",+ "Inappropriate",+ )+topic_page.visit_topic(post.topic).open_flag_topic_modalexpect(flag_modal).to have_choices(@@ -166,7 +176,7 @@ describe "Admin Flags Page", type: :system do"Inappropriate",)- Flag.system.where(name: "illegal").update!(enabled: true)+ Flag.system.where(name: "inappropriate").update!(enabled: true)admin_flags_page.visit.click_delete_flag("custom_inappropriate").confirm_deleteend