From 5392acd247058fbdc29d82dd53e513b4c7986f35 Mon Sep 17 00:00:00 2001 From: Caleb Guanzon Date: Mon, 25 Oct 2021 10:55:09 -0600 Subject: [PATCH] spec: add new conversations media test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes VICE-984 flag=react_inbox unfortunately, in selenium, trying to attach a media file to upload leads to packages/canvas-media/src/ComputerPanel.js erroring out. so this tests stops that the ui for uploading media exists when replying test plan: code review Change-Id: I179d5adf369f7e38c3c9e44874941f21f526eee4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276750 Tested-by: Service Cloud Jenkins Reviewed-by: Omar Soto-Fortuño QA-Review: Omar Soto-Fortuño Product-Review: Omar Soto-Fortuño --- .../conversations_replying_spec.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spec/selenium/conversations/conversations_replying_spec.rb b/spec/selenium/conversations/conversations_replying_spec.rb index 27038bd003a..e893607210a 100644 --- a/spec/selenium/conversations/conversations_replying_spec.rb +++ b/spec/selenium/conversations/conversations_replying_spec.rb @@ -43,6 +43,26 @@ describe "conversations new" do @convo.add_message(@s2, "I need the homework too.") end + context "when react_inbox feature flag is on" do + before do + Account.default.set_feature_flag! :react_inbox, 'on' + end + + it "show record / upload media ui when kaltura is enabled" do + stub_kaltura + get '/conversations' + f("div[data-testid='conversation']").click + f("button[data-testid='reply']").click + # need to wait for background stuff to load not easily caught by wait_for_ajaximations + # rubocop:disable Lint/NoSleep + sleep 1 + # rubocop:enable Lint/NoSleep + f("button[data-testid='media-upload']").click + # make sure upload input exists + expect(f("input[type='file']")).to be_truthy + end + end + context "when react_inbox feature flag is off" do before do Account.default.set_feature_flag! :react_inbox, 'off'