diff --git a/spec/system/create_channel_spec.rb b/spec/system/create_channel_spec.rb index eba78c9..80689b3 100644 --- a/spec/system/create_channel_spec.rb +++ b/spec/system/create_channel_spec.rb @@ -32,23 +32,23 @@ RSpec.describe "Create channel", type: :system do expect(find(".channel-info")).to have_content("bloop") end - it "shows error in chanel modal" do + it "shows the error in the channel modal" do DiscourseChatIntegration::Rule.create!( channel: chan1, filter: "watch", category_id: category.id, ) - visit("/admin/plugins/chat-integration/dummy") - provider.set_raise_exception( DiscourseChatIntegration::ProviderError.new info: { error_key: "hello" } ) manager.trigger_notifications(first_post.id) + + visit("/admin/plugins/chat-integration/dummy") + expect(find(".error-message")).to have_content( I18n.t("js.chat_integration.channels_with_errors"), ) - find(".channel-title").find("button").click expect(page).to have_content "{\n \"error_key\": \"hello\"\n}" end