46 lines
1.5 KiB
Ruby
46 lines
1.5 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe "Session Recording", :js => true, :type => :feature, :capybara_feature => true do
|
|
subject { page }
|
|
|
|
before(:all) do
|
|
#Capybara.javascript_driver = :poltergeist
|
|
#Capybara.current_driver = Capybara.javascript_driver
|
|
#Capybara.default_max_wait_time = 30 # these tests are SLOOOOOW
|
|
end
|
|
|
|
let(:creator) { FactoryGirl.create(:user) }
|
|
|
|
before(:each) do
|
|
ActiveMusicSession.delete_all
|
|
end
|
|
|
|
it "video checkbox is diabled if video session is not started" do
|
|
creator.subscription_plan_code = SubscriptionDefinitions::JAM_PLATINUM
|
|
creator.subscription_trial_ends_at = 1.day.ago
|
|
creator.admin_override_plan_code = SubscriptionDefinitions::JAM_PLATINUM
|
|
creator.admin_override_ends_at = 1.day.from_now
|
|
creator.save!
|
|
|
|
create_new_session(creator: creator, include_video: true) do
|
|
expect(page.find("input#recording-input-both")).not_to be_checked
|
|
# page.find('.btnCancel').click
|
|
# video_window = page.window_opened_by do
|
|
# page.find('.in-session-controls a.session-video-btn').click
|
|
# end
|
|
# sleep 1
|
|
# within_window(video_window) do
|
|
# click_link "JOIN ROOM"
|
|
# end
|
|
# sleep 1
|
|
end
|
|
end
|
|
|
|
it "start/stop recording", focus: true do
|
|
create_new_session(creator: creator) do
|
|
page.find('.recording-left .form-actions a', text: 'START RECORDING').click
|
|
page.find('.in-session-controls a.session-record-btn', text: 'STOP RECORDING').click
|
|
page.find('.in-session-controls a.session-record-btn', text: 'RECORD')
|
|
end
|
|
end
|
|
end |