add specs
This commit is contained in:
@@ -151,6 +151,41 @@ feature 'User managing broadcasts' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'broadcast recordings are shown in correct layout', js: true do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||
create(:broadcast_recording, broadcast: broadcast, asset_uid: "asset_uid_1")
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
expect(page).to have_selector("li.media")
|
||||
expect(page).to have_selector("div.play-thumbnail")
|
||||
expect(page).to have_selector("div.media-body")
|
||||
expect(page).to have_selector("div.play-btn")
|
||||
end
|
||||
|
||||
scenario 'active playing media has highlighted background (live take or recording)', js: true do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||
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("#live-take.playing-highlight")
|
||||
expect(page).to have_selector(".play-btn-svg", count: 2, visible: false)
|
||||
|
||||
first("[data-behavior='play_recording']").click
|
||||
|
||||
expect(page).not_to have_selector("#live-take.playing-highlight")
|
||||
expect(page).to have_selector("li.media.playing-highlight", count: 1)
|
||||
expect(page).to have_selector("li.media", count: 2)
|
||||
|
||||
first("[data-behavior='play_stream']").click
|
||||
|
||||
expect(page).to have_selector("#live-take.playing-highlight")
|
||||
expect(page).to have_selector("li.media", count: 2)
|
||||
expect(page).not_to have_selector("li.media.playing-highlight")
|
||||
end
|
||||
|
||||
context 'When the user is associate' do
|
||||
let(:current_user) { create(:user, :associate) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user