diff --git a/web/app/assets/javascripts/fakeJamClient.js b/web/app/assets/javascripts/fakeJamClient.js index 1157bc981..98468defb 100644 --- a/web/app/assets/javascripts/fakeJamClient.js +++ b/web/app/assets/javascripts/fakeJamClient.js @@ -71,7 +71,7 @@ return ["Built-in Webcam HD"] } function FTUECurrentSelectedVideoDevice() { - return "Built-in Webcam HD" + return {"xy323ss": "Built-in Webcam HD"} } function FTUEGetAvailableEncodeVideoResolutions() { return { @@ -80,6 +80,10 @@ } } + function FTUEGetVideoCaptureDeviceCapabilities() { + return {} + } + function isSessVideoShared() { return videoShared; } @@ -1193,6 +1197,8 @@ this.FTUEGetVideoCaptureDeviceNames = FTUEGetVideoCaptureDeviceNames; this.FTUECurrentSelectedVideoDevice = FTUECurrentSelectedVideoDevice; this.FTUEGetAvailableEncodeVideoResolutions = FTUEGetAvailableEncodeVideoResolutions; + this.FTUEGetVideoCaptureDeviceCapabilities = FTUEGetVideoCaptureDeviceCapabilities; + this.isSessVideoShared = isSessVideoShared; this.SessStopVideoSharing = SessStopVideoSharing; diff --git a/web/spec/features/gear_wizard_spec.rb b/web/spec/features/gear_wizard_spec.rb index 44badf594..fc9b401b6 100644 --- a/web/spec/features/gear_wizard_spec.rb +++ b/web/spec/features/gear_wizard_spec.rb @@ -1,25 +1,25 @@ require 'spec_helper' -describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => true, :slow => true do +describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => true do subject { page } let(:user) { FactoryGirl.create(:user) } before(:each) do + emulate_client LatencyTester.delete_all end before(:all) do - @old_video_available=Rails.application.config.video_available - Rails.application.config.video_available=false + @old_video_available=Rails.application.config.video_available end after(:all) do Rails.application.config.video_available=@old_video_available end - it "success path" do + def walk_wizard(has_video=false) FactoryGirl.create(:latency_tester) fast_signin user, '/client#/account/audio' find("div.account-audio a[data-purpose='add-profile']").trigger(:click) @@ -61,6 +61,12 @@ describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => tru find('.btn-next.button-orange:not(.disabled)').trigger(:click) + # Optional step 6 - configure video + if(has_video) + #find('.ftue-step-title', text: 'Select Video Gear') + find('.btn-next.button-orange:not(.disabled)').trigger(:click) + end + # step 6 - Test Router & Network find('.ftue-step-title', text: 'Test Router & Network') find('.button-orange.start-network-test').trigger(:click) @@ -79,5 +85,15 @@ describe "Gear Wizard", :js => true, :type => :feature, :capybara_feature => tru # and should now be in session find('h2', text: 'my tracks') end + + it "success path" do + Rails.application.config.video_available="none" + walk_wizard(false) + end + + it "success path with video" do + Rails.application.config.video_available="mvp" + walk_wizard(true) + end end