summaryrefslogtreecommitdiff
path: root/features/steps/admin
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-03 23:01:04 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-02-06 14:30:07 -0500
commit89b3ddd609063d93f39a02279f0f3e23b8b6b364 (patch)
tree4f36de052a6bbcfed2b884c860363037663601e7 /features/steps/admin
parent26f3cc41fc41f2901cc560aaecf1fe49cadda7ca (diff)
downloadgitlab-ce-89b3ddd609063d93f39a02279f0f3e23b8b6b364.tar.gz
Allow limited Markdown in Broadcast Messagesrs-broadcast-markdown
Closes #11853
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/broadcast_messages.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/features/steps/admin/broadcast_messages.rb b/features/steps/admin/broadcast_messages.rb
index 6cacdf4764c..af2b4a29313 100644
--- a/features/steps/admin/broadcast_messages.rb
+++ b/features/steps/admin/broadcast_messages.rb
@@ -19,7 +19,7 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
end
step 'submit form with new customized broadcast message' do
- fill_in 'broadcast_message_message', with: 'Application update from 4:00 CST to 5:00 CST'
+ fill_in 'broadcast_message_message', with: 'Application update from **4:00 CST to 5:00 CST**'
fill_in 'broadcast_message_color', with: '#f2dede'
fill_in 'broadcast_message_font', with: '#b94a48'
select Date.today.next_year.year, from: "broadcast_message_ends_at_1i"
@@ -28,6 +28,7 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
step 'I should see a customized broadcast message' do
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
+ 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"])
end
@@ -51,4 +52,15 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
step 'I should not see the removed broadcast message' do
expect(page).not_to have_content 'Migration to new server'
end
+
+ step 'I enter a broadcast message with Markdown' do
+ fill_in 'broadcast_message_message', with: "Live **Markdown** previews. :tada:"
+ end
+
+ step 'I should see a live preview of the rendered broadcast message' do
+ page.within('.broadcast-message-preview') do
+ expect(page).to have_selector('strong', text: 'Markdown')
+ expect(page).to have_selector('img.emoji')
+ end
+ end
end