add specs
This commit is contained in:
@@ -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) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user