Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-01-01 01:22:40 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-01-13 19:34:59 +0300
commit540ae3c3658d051f852b2c10fa61c557521196e1 (patch)
tree69d1cecf81e4f04b95bec1f869025da8a3f7b65e /features/steps/admin
parentdf496fcaf08b085816a45d31d02f1ea230454b63 (diff)
Update Broadcast Message features
- Removes redundant "Create a broadcast message" scenario that was entirely covered by the "Create a customized broadcast message" scenario. - Adds "Edit an existing broadcast message" scenario - Adds "Remove an existing broadcast message" scenario
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/broadcast_messages.rb30
1 files changed, 22 insertions, 8 deletions
diff --git a/features/steps/admin/broadcast_messages.rb b/features/steps/admin/broadcast_messages.rb
index b59799c2f47..6cacdf4764c 100644
--- a/features/steps/admin/broadcast_messages.rb
+++ b/features/steps/admin/broadcast_messages.rb
@@ -1,9 +1,8 @@
class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
- include SharedAdmin
- step 'application already has admin messages' do
+ step 'application already has a broadcast message' do
FactoryGirl.create(:broadcast_message, :expired, message: "Migration to new server")
end
@@ -11,12 +10,6 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
expect(page).to have_content "Migration to new server"
end
- step 'submit form with new broadcast message' do
- fill_in 'broadcast_message_message', with: 'Application update from 4:00 CST to 5:00 CST'
- select '2018', from: "broadcast_message_ends_at_1i"
- click_button "Add broadcast message"
- end
-
step 'I should be redirected to admin messages page' do
expect(current_path).to eq admin_broadcast_messages_path
end
@@ -37,4 +30,25 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
expect(page).to have_selector %(div[style="background-color: #f2dede; color: #b94a48"])
end
+
+ step 'I edit an existing broadcast message' do
+ click_link 'Edit'
+ end
+
+ step 'I change the broadcast message text' do
+ fill_in 'broadcast_message_message', with: 'Application update RIGHT NOW'
+ click_button 'Update broadcast message'
+ end
+
+ step 'I should see the updated broadcast message' do
+ expect(page).to have_content "Application update RIGHT NOW"
+ end
+
+ step 'I remove an existing broadcast message' do
+ click_link 'Remove'
+ end
+
+ step 'I should not see the removed broadcast message' do
+ expect(page).not_to have_content 'Migration to new server'
+ end
end