* added test for VRFS-2432 notification of steram mix and share dialog
This commit is contained in:
parent
fc4d55ba84
commit
f402f630e1
|
|
@ -101,6 +101,69 @@ describe "Session Recordings", :js => true, :type => :feature, :capybara_feature
|
|||
end
|
||||
end
|
||||
|
||||
describe "mixing after the recording" do
|
||||
before(:each) do
|
||||
|
||||
RecordedTrack.delete_all
|
||||
ClaimedRecording.delete_all
|
||||
MusicSession.delete_all
|
||||
ActiveMusicSession.delete_all
|
||||
QuickMix.delete_all
|
||||
|
||||
start_recording_with(creator, [joiner1], some_genre)
|
||||
|
||||
in_client(joiner1) do
|
||||
stop_recording
|
||||
end
|
||||
|
||||
@users = [creator, joiner1]
|
||||
check_recording_finished_for @users
|
||||
|
||||
@music_session = ActiveMusicSession.first()
|
||||
@recording = @music_session.recordings.first()
|
||||
|
||||
@users.each do |user|
|
||||
name = "#{user.name}'s recording"
|
||||
desc = "#{user.name}'s description"
|
||||
|
||||
in_client(user) do
|
||||
claim_recording(name, desc)
|
||||
claimed_recording = @recording.claimed_recordings.where(:user_id => user.id).first
|
||||
expect(claimed_recording.name).to eq(name)
|
||||
expect(claimed_recording.description).to eq(desc)
|
||||
expect(claimed_recording.is_public).to be_true
|
||||
expect(claimed_recording.genre).to eq(@music_session.genre)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
it "notifications show" do
|
||||
quick_mix = QuickMix.first
|
||||
quick_mix.finish(100, 'abc') # should send out notifications to all people who claimed the recording
|
||||
|
||||
in_client(creator) do
|
||||
find('#notification h2', text: 'Recording Stream Mix Complete')
|
||||
find('#notification #buttons a', text: 'SHARE').trigger(:click)
|
||||
end
|
||||
|
||||
in_client(joiner1) do
|
||||
find('#notification h2', text: 'Recording Stream Mix Complete')
|
||||
find('#notification #buttons a', text: 'SHARE').trigger(:click)
|
||||
find('h1', text: 'share this recording')
|
||||
find('.dialog-inner a.button-orange[layout-action="close"]', text: 'X CLOSE').trigger(:click)
|
||||
|
||||
open_notifications
|
||||
|
||||
notification = Notification.where(target_user_id: joiner1.id, recording_id: @recording.id).first!
|
||||
|
||||
find("li[notification-id='#{notification.id}'] a#btn-notification-action", text: 'SHARE').trigger(:click)
|
||||
find('h1', text: 'share this recording')
|
||||
find('.dialog-inner a.button-orange[layout-action="close"]', text: 'X CLOSE').trigger(:click)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# creates a recording, and stops it, and confirms the 'Finished Recording' dialog shows for both
|
||||
describe "Finished Recording Dialog" do
|
||||
before(:each) do
|
||||
|
|
@ -109,6 +172,7 @@ describe "Session Recordings", :js => true, :type => :feature, :capybara_feature
|
|||
ClaimedRecording.delete_all
|
||||
MusicSession.delete_all
|
||||
ActiveMusicSession.delete_all
|
||||
QuickMix.delete_all
|
||||
|
||||
start_recording_with(creator, [joiner1], some_genre)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue