A platform for community discussion. Free, open, simple.
DEV: ensures channel has been created (#30445)
Joffrey JAFFEUX3198326cda24
diff --git a/plugins/chat/spec/system/create_channel_spec.rb b/plugins/chat/spec/system/create_channel_spec.rbindex 0b10a181321..8a592ddd47e 100644--- a/plugins/chat/spec/system/create_channel_spec.rb+++ b/plugins/chat/spec/system/create_channel_spec.rb@@ -273,12 +273,14 @@ RSpec.describe "Create channel", type: :system dochat_page.visit_browsechat_page.new_channel_button.clickchannel_modal.select_category(category_1)+expect(channel_modal).to have_name_prefilled(category_1.name)channel_modal.fill_description("All kind of cute cats")channel_modal.click_primary_button- expect(page).to have_content(category_1.name)+ expect(channel_modal).to be_closed+created_channel = Chat::Channel.find_by(chatable_id: category_1.id)expect(page).to have_current_path(chat.channel_path(created_channel.slug, created_channel.id),diff --git a/plugins/chat/spec/system/page_objects/modals/chat_channel_create.rb b/plugins/chat/spec/system/page_objects/modals/chat_channel_create.rbindex 228760729cb..28e335d9db0 100644--- a/plugins/chat/spec/system/page_objects/modals/chat_channel_create.rb+++ b/plugins/chat/spec/system/page_objects/modals/chat_channel_create.rb@@ -39,6 +39,10 @@ module PageObjectsdef has_name_prefilled?(name)has_field?("name", with: name)end++ def closed?+ has_no_selector?(".chat-modal-create-channel")+ endendendend