Upstream sync

This commit is contained in:
Senad Uka
2020-07-03 10:23:03 +02:00
parent d6a3542308
commit 2dea0f29b9
32 changed files with 860 additions and 72 deletions

View File

@@ -12,6 +12,13 @@ feature 'User managing broadcasts' do
allow(MuxLiveStream).to receive(:new).and_return(double(id: 'id', key: 'key', playback_id: 'playback_id'))
end
scenario "splash page is shown if there are no existing streams" do
visit project_broadcasts_path(project)
expect(page).to have_content schedule_demo
expect(page).to have_content create_stream
end
scenario 'creating and deleting a broadcast', js: true do
visit new_project_broadcast_path(project)
@@ -131,6 +138,29 @@ feature 'User managing broadcasts' do
end
end
end
context 'When the user is associate' do
let(:current_user) { create(:user, :associate) }
it 'does not show button to create new live stream' do
visit project_broadcasts_path(project)
expect(page).to have_content schedule_demo
expect(page).not_to have_content create_stream
end
end
context 'When the user is account manager' do
let(:current_user) { create(:user, :account_manager) }
it 'does show button to create new live stream' do
visit project_broadcasts_path(project)
expect(page).to have_content schedule_demo
expect(page).to have_content create_stream
end
end
end
private
@@ -151,4 +181,12 @@ feature 'User managing broadcasts' do
def switch_view_dropdown
'Switch View'
end
def schedule_demo
t 'broadcasts.splash.actions.book_demo'
end
def create_stream
t 'broadcasts.splash.actions.create_stream'
end
end