add specs

This commit is contained in:
Bilal
2020-09-16 14:44:35 +03:00
parent 51d56dc9ac
commit a47c69f36d

View File

@@ -204,12 +204,31 @@ feature 'User managing broadcasts' do
visit project_broadcast_path(project, broadcast)
expect(page).not_to have_selector('#broadcast_video')
expect(page).to have_selector('#raw-video-embed')
expect(page).to have_selector('#director_broadcast_video')
expect(page).to have_selector('#director_mode_switch')
end
scenario 'playing recordings is possible in director mode', js: true do
broadcast = create(:broadcast, :with_stream, :with_files, project: project, director_mode_video_embed: 'director_mode')
create(:broadcast_recording, broadcast: broadcast, asset_uid: "asset_uid_1")
create(:broadcast_recording, broadcast: broadcast, asset_uid: "asset_uid_2")
visit project_broadcast_path(project, broadcast)
expect(page).to have_selector('#raw-video-embed')
expect(page).to have_selector('#broadcast_video')
broadcast_video_div = find('#broadcast_video')
expect(broadcast_video_div.all('*').length).to eq 0
first("[data-behavior='play_recording']").click
expect(page).not_to have_selector('#raw-video-embed')
expect(broadcast_video_div.all('*').length).to be > 2
end
context 'When the user is associate' do
let(:current_user) { create(:user, :associate) }