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:
authorjurre <jurrestender+github@gmail.com>2016-12-13 19:52:58 +0300
committerjurre <jurrestender+github@gmail.com>2016-12-19 19:43:24 +0300
commitbf6b1078521b6461caeffb3a0ba003c5c5ac2a9e (patch)
tree69afcef73437f7cdeb9d261fe7eb0c3c8843b8e0 /features
parent60f61096e17dee7ebedd94cc5f70703067528bc7 (diff)
Move admin broadcast messages spinach feature to rspec
Diffstat (limited to 'features')
-rw-r--r--features/admin/broadcast_messages.feature33
-rw-r--r--features/steps/admin/broadcast_messages.rb66
2 files changed, 0 insertions, 99 deletions
diff --git a/features/admin/broadcast_messages.feature b/features/admin/broadcast_messages.feature
deleted file mode 100644
index 4f9c651561e..00000000000
--- a/features/admin/broadcast_messages.feature
+++ /dev/null
@@ -1,33 +0,0 @@
-@admin
-Feature: Admin Broadcast Messages
- Background:
- Given I sign in as an admin
- And application already has a broadcast message
- And I visit admin messages page
-
- Scenario: See broadcast messages list
- Then I should see all broadcast messages
-
- Scenario: Create a customized broadcast message
- When submit form with new customized broadcast message
- Then I should be redirected to admin messages page
- And I should see newly created broadcast message
- Then I visit dashboard page
- And I should see a customized broadcast message
-
- Scenario: Edit an existing broadcast message
- When I edit an existing broadcast message
- And I change the broadcast message text
- Then I should be redirected to admin messages page
- And I should see the updated broadcast message
-
- Scenario: Remove an existing broadcast message
- When I remove an existing broadcast message
- Then I should be redirected to admin messages page
- And I should not see the removed broadcast message
-
- @javascript
- Scenario: Live preview a customized broadcast message
- When I visit admin messages page
- And I enter a broadcast message with Markdown
- Then I should see a live preview of the rendered broadcast message
diff --git a/features/steps/admin/broadcast_messages.rb b/features/steps/admin/broadcast_messages.rb
deleted file mode 100644
index af2b4a29313..00000000000
--- a/features/steps/admin/broadcast_messages.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
-
- step 'application already has a broadcast message' do
- FactoryGirl.create(:broadcast_message, :expired, message: "Migration to new server")
- end
-
- step 'I should see all broadcast messages' do
- expect(page).to have_content "Migration to new server"
- end
-
- step 'I should be redirected to admin messages page' do
- expect(current_path).to eq admin_broadcast_messages_path
- end
-
- step 'I should see newly created broadcast message' do
- expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
- 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_color', with: '#f2dede'
- fill_in 'broadcast_message_font', with: '#b94a48'
- select Date.today.next_year.year, from: "broadcast_message_ends_at_1i"
- click_button "Add broadcast message"
- end
-
- 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
-
- 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
-
- 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