A platform for community discussion. Free, open, simple.
DEV: Fix draft spec (#34544)
Martin Brennane0218d3528b9
diff --git a/spec/system/composer/drafts_spec.rb b/spec/system/composer/drafts_spec.rbindex 1ed1b832e66..1aa8e547147 100644--- a/spec/system/composer/drafts_spec.rb+++ b/spec/system/composer/drafts_spec.rb@@ -42,15 +42,16 @@ describe "Composer - Drafts", type: :system doendend- context "when only title is specified" do+ context "when only title is specified and it is too short" doit "does not save the draft or show a toast" dovisit "/new-topic"expect(composer).to be_opened- composer.fill_title("this is a test topic")+ composer.fill_title("test")composer.close+ expect(composer).to be_closed- expect(toasts).to have_no_message(I18n.t("js.composer.draft_saved"))+ expect(toasts).to have_no_messageexpect(Draft.where(user: current_user).count).to eq(0)endenddiff --git a/spec/system/page_objects/components/toasts.rb b/spec/system/page_objects/components/toasts.rbindex aa13ccf96b9..40bb9dc7e3c 100644--- a/spec/system/page_objects/components/toasts.rb+++ b/spec/system/page_objects/components/toasts.rb@@ -27,8 +27,8 @@ module PageObjectshas_css?(".fk-d-default-toast.-error", text: message)end- def has_no_message?(message)- has_no_css?(".fk-d-default-toast", text: message)+ def has_no_message?+ has_no_css?(".fk-d-default-toast__message")endendend