37 lines
1.6 KiB
Ruby
37 lines
1.6 KiB
Ruby
require 'spec_helper'
|
|
describe "Music session video button", :js => true, :type => :feature, :capybara_feature => true do
|
|
subject { page }
|
|
let(:user) { FactoryGirl.create(:user, subscription_plan_code: 'jamsubplatinum') }
|
|
let(:connection) { FactoryGirl.create(:connection, :user => user, addr: "1.1.1.1") }
|
|
let(:music_session) {
|
|
ms = FactoryGirl.create(:active_music_session, :creator => user, :musician_access => true)
|
|
ms.save!
|
|
ms
|
|
}
|
|
before(:each) do
|
|
MusicSession.delete_all
|
|
ActiveMusicSession.delete_all
|
|
Rails.application.config.allow_force_native_client = true
|
|
@url = "/client#/session/#{music_session.id}"
|
|
|
|
end
|
|
it "finds video link" do
|
|
fast_signin(user, @url)
|
|
# give the web page a little time to connect; sometimes in firefox this needs some time to connect
|
|
page.should_not have_selector('span.disconnected-msg', text: 'DISCONNECTED FROM SERVER')
|
|
#sleep 5
|
|
find(".session-video-btn").click()
|
|
save_screenshot("video_button1.png")
|
|
|
|
# this should open a new window/tab to a different site, as configured by the new
|
|
# Rails.configuration.video_conferencing_host parameter.
|
|
|
|
# We only need to verify that secondary window opens up. We should probably also test that a new TempToken record
|
|
# was created as a result of clicking the video button .I wouldn't bother testing anything else in this particular
|
|
# test.
|
|
#
|
|
# It's true that this secondary window (in staging/production) will load a site that will then in turn call the
|
|
# new controller token auth method.. but we can test the correctness of the new controller method in a much
|
|
# simpler web/spec/controller spec
|
|
end
|
|
end |