summaryrefslogtreecommitdiff
path: root/spec/features/admin/admin_broadcast_messages_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/admin/admin_broadcast_messages_spec.rb')
-rw-r--r--spec/features/admin/admin_broadcast_messages_spec.rb19
1 files changed, 1 insertions, 18 deletions
diff --git a/spec/features/admin/admin_broadcast_messages_spec.rb b/spec/features/admin/admin_broadcast_messages_spec.rb
index aaa1f08c84f..476dd4469bc 100644
--- a/spec/features/admin/admin_broadcast_messages_spec.rb
+++ b/spec/features/admin/admin_broadcast_messages_spec.rb
@@ -7,12 +7,7 @@ RSpec.describe 'Admin Broadcast Messages' do
admin = create(:admin)
sign_in(admin)
gitlab_enable_admin_mode_sign_in(admin)
- create(
- :broadcast_message,
- :expired,
- message: 'Migration to new server',
- target_access_levels: [Gitlab::Access::DEVELOPER]
- )
+ create(:broadcast_message, :expired, message: 'Migration to new server')
visit admin_broadcast_messages_path
end
@@ -26,13 +21,10 @@ RSpec.describe 'Admin Broadcast Messages' do
fill_in 'broadcast_message_target_path', with: '*/user_onboarded'
fill_in 'broadcast_message_font', with: '#b94a48'
select Date.today.next_year.year, from: 'broadcast_message_ends_at_1i'
- select 'Guest', from: 'broadcast_message_target_access_levels'
- select 'Owner', from: 'broadcast_message_target_access_levels'
click_button 'Add broadcast message'
expect(current_path).to eq admin_broadcast_messages_path
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
- expect(page).to have_content 'Guest, Owner'
expect(page).to have_content '*/user_onboarded'
expect(page).to have_selector 'strong', text: '4:00 CST to 5:00 CST'
expect(page).to have_selector %(div[style="background-color: #f2dede; color: #b94a48"])
@@ -43,14 +35,10 @@ RSpec.describe 'Admin Broadcast Messages' do
fill_in 'broadcast_message_target_path', with: '*/user_onboarded'
select 'Notification', from: 'broadcast_message_broadcast_type'
select Date.today.next_year.year, from: 'broadcast_message_ends_at_1i'
- select 'Reporter', from: 'broadcast_message_target_access_levels'
- select 'Developer', from: 'broadcast_message_target_access_levels'
- select 'Maintainer', from: 'broadcast_message_target_access_levels'
click_button 'Add broadcast message'
expect(current_path).to eq admin_broadcast_messages_path
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
- expect(page).to have_content 'Reporter, Developer, Maintainer'
expect(page).to have_content '*/user_onboarded'
expect(page).to have_content 'Notification'
expect(page).to have_selector 'strong', text: '4:00 CST to 5:00 CST'
@@ -59,15 +47,10 @@ RSpec.describe 'Admin Broadcast Messages' do
it 'edit an existing broadcast message' do
click_link 'Edit'
fill_in 'broadcast_message_message', with: 'Application update RIGHT NOW'
- select 'Reporter', from: 'broadcast_message_target_access_levels'
click_button 'Update broadcast message'
expect(current_path).to eq admin_broadcast_messages_path
expect(page).to have_content 'Application update RIGHT NOW'
-
- page.within('.table-responsive') do
- expect(page).to have_content 'Reporter, Developer'
- end
end
it 'remove an existing broadcast message' do