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 00:04:07 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-01-13 19:34:58 +0300
commit8086b2bd2ecb0ff647da766c436eda47b7434599 (patch)
tree09d202981c18f3977b36c6af280d688b7a3aaadb /features
parent12903762d15cef256f579b1ddb692a0254cace52 (diff)
Simplify BroadcastMessage factory
Also make the feature tests less brittle.
Diffstat (limited to 'features')
-rw-r--r--features/admin/broadcast_messages.feature2
-rw-r--r--features/steps/admin/broadcast_messages.rb7
2 files changed, 4 insertions, 5 deletions
diff --git a/features/admin/broadcast_messages.feature b/features/admin/broadcast_messages.feature
index b2c3112320a..98d894a4fb6 100644
--- a/features/admin/broadcast_messages.feature
+++ b/features/admin/broadcast_messages.feature
@@ -6,7 +6,7 @@ Feature: Admin Broadcast Messages
And I visit admin messages page
Scenario: See broadcast messages list
- Then I should be all broadcast messages
+ Then I should see all broadcast messages
Scenario: Create a broadcast message
When submit form with new broadcast message
diff --git a/features/steps/admin/broadcast_messages.rb b/features/steps/admin/broadcast_messages.rb
index f6daf852977..b59799c2f47 100644
--- a/features/steps/admin/broadcast_messages.rb
+++ b/features/steps/admin/broadcast_messages.rb
@@ -4,10 +4,10 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
include SharedAdmin
step 'application already has admin messages' do
- FactoryGirl.create(:broadcast_message, message: "Migration to new server")
+ FactoryGirl.create(:broadcast_message, :expired, message: "Migration to new server")
end
- step 'I should be all broadcast messages' do
+ step 'I should see all broadcast messages' do
expect(page).to have_content "Migration to new server"
end
@@ -27,10 +27,9 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
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'
- click_link "Customize colors"
fill_in 'broadcast_message_color', with: '#f2dede'
fill_in 'broadcast_message_font', with: '#b94a48'
- select '2018', from: "broadcast_message_ends_at_1i"
+ select Date.today.next_year.year, from: "broadcast_message_ends_at_1i"
click_button "Add broadcast message"
end