A platform for community discussion. Free, open, simple.
DEV: Restore chat composer specs (#39292)
Jarek Radosz0da8803eb691
diff --git a/plugins/chat/spec/system/chat_composer_spec.rb b/plugins/chat/spec/system/chat_composer_spec.rbindex f853699a57b..27b71f0b09c 100644--- a/plugins/chat/spec/system/chat_composer_spec.rb+++ b/plugins/chat/spec/system/chat_composer_spec.rb@@ -18,11 +18,10 @@ RSpec.describe "Chat composer" doendcontext "when adding an emoji through the picker" do- xit "adds the emoji to the composer" do+ it "adds the emoji to the composer" dochat_page.visit_channel(channel_1)- channel_page.open_action_menu- channel_page.click_action_button("emoji")- find("[data-emoji='grimacing']").click(wait: 0.5)+ channel_page.composer.open_emoji_picker+ find(".emoji-picker [data-emoji='grimacing']").clickexpect(channel_page.composer).to have_value(":grimacing:")end@@ -60,33 +59,33 @@ RSpec.describe "Chat composer" doendcontext "when opening emoji picker through more button of the autocomplete" do- xit "prefills the emoji picker filter input" do+ it "prefills the emoji picker filter input" dochat_page.visit_channel(channel_1)- find(".chat-composer__input").fill_in(with: ":gri")+ find(".chat-composer__input").send_keys(":gri")click_link(I18n.t("js.composer.more_emoji"))- expect(find(".emoji-picker .filter-input")).to have_value("gri")+ expect(find(".emoji-picker .filter-input").value).to eq("gri")end- xit "filters with the prefilled input" do+ it "filters with the prefilled input" dochat_page.visit_channel(channel_1)- find(".chat-composer__input").fill_in(with: ":fr")+ find(".chat-composer__input").send_keys(":fr")click_link(I18n.t("js.composer.more_emoji"))- expect(page).to have_selector(".emoji-picker [data-emoji='fr']")- expect(page).to have_no_selector(".emoji-picker [data-emoji='grinning']")+ expect(page).to have_selector(".emoji-picker [data-emoji='france']")+ expect(page).to have_no_selector(".emoji-picker [data-emoji='grinning_face']")end- xit "replaces the partially typed emoji with the selected" do+ it "replaces the partially typed emoji with the selected" dochat_page.visit_channel(channel_1)- find(".chat-composer__input").fill_in(with: "hey :gri")+ find(".chat-composer__input").send_keys("hey :gri")click_link(I18n.t("js.composer.more_emoji"))- find("[data-emoji='grimacing']").click(wait: 0.5)+ find(".emoji-picker [data-emoji='grimacing']").click- expect(channel_page.composer).to have_value("hey :grimacing:")+ expect(channel_page.composer).to have_value("hey :grimacing: ")endend