spec: add new conversations media test

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 <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
This commit is contained in:
Caleb Guanzon 2021-10-25 10:55:09 -06:00
parent 8cea9a7a6f
commit 5392acd247
1 changed files with 20 additions and 0 deletions

View File

@ -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'