diff --git a/ruby/lib/jam_ruby/tasks/db/migrate.rake b/ruby/lib/jam_ruby/tasks/db/migrate.rake index 7301e28cb..e92cd1c34 100644 --- a/ruby/lib/jam_ruby/tasks/db/migrate.rake +++ b/ruby/lib/jam_ruby/tasks/db/migrate.rake @@ -24,7 +24,7 @@ namespace :db do version = version.to_i end end - + ActiveRecord::Base.establish_connection(db_config) migrate_dir = JamRuby::RakeUtil.migrations_path ActiveRecord::Migrator.migrate(migrate_dir, version) diff --git a/web/app/assets/javascripts/react-components/SessionVideoBtn.js.jsx.coffee b/web/app/assets/javascripts/react-components/SessionVideoBtn.js.jsx.coffee index 6ba078ad6..f81075152 100644 --- a/web/app/assets/javascripts/react-components/SessionVideoBtn.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/SessionVideoBtn.js.jsx.coffee @@ -32,7 +32,7 @@ SessionActions = @SessionActions buttons: buttons}) render: () -> - ` + ` VIDEO ` diff --git a/web/spec/features/session_video_spec.rb b/web/spec/features/session_video_spec.rb new file mode 100644 index 000000000..c4092b5f5 --- /dev/null +++ b/web/spec/features/session_video_spec.rb @@ -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 \ No newline at end of file