session_video_spec
This commit is contained in:
parent
dcbf52a88b
commit
cf4f5c89e0
|
|
@ -24,7 +24,7 @@ namespace :db do
|
||||||
version = version.to_i
|
version = version.to_i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveRecord::Base.establish_connection(db_config)
|
ActiveRecord::Base.establish_connection(db_config)
|
||||||
migrate_dir = JamRuby::RakeUtil.migrations_path
|
migrate_dir = JamRuby::RakeUtil.migrations_path
|
||||||
ActiveRecord::Migrator.migrate(migrate_dir, version)
|
ActiveRecord::Migrator.migrate(migrate_dir, version)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ SessionActions = @SessionActions
|
||||||
buttons: buttons})
|
buttons: buttons})
|
||||||
|
|
||||||
render: () ->
|
render: () ->
|
||||||
`<a className="session-share button-grey-toggle left" onClick={this.sessionWebCam}>
|
`<a className="session-share session-video-btn button-grey-toggle left" onClick={this.sessionWebCam}>
|
||||||
<img src="/assets/content/icon_video.png" align="texttop" height="14" width="14"/>
|
<img src="/assets/content/icon_video.png" align="texttop" height="14" width="14"/>
|
||||||
VIDEO
|
VIDEO
|
||||||
</a>`
|
</a>`
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
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
|
||||||
Loading…
Reference in New Issue