summaryrefslogtreecommitdiff
path: root/features/steps/admin
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-12-19 20:44:58 +0000
committerRémy Coutable <remy@rymai.me>2016-12-19 20:44:58 +0000
commit4298209a7ad0d55caf508e1b853d3457f1801b0a (patch)
tree01ca97e661ead4f0a20c658265689241dda760ba /features/steps/admin
parent46533a7d63570a5de7c9da2ff2f51963c0c9cd5f (diff)
parenta0c48ec62b64f3b836d8af04c46938d6951911ef (diff)
downloadgitlab-ce-4298209a7ad0d55caf508e1b853d3457f1801b0a.tar.gz
Merge branch 'move-admin-appearance-feature-to-rspec' into 'master'
Move Admin Appearance spinach feature to RSpec Part of #23036 See merge request !8063
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/appearance.rb72
1 files changed, 0 insertions, 72 deletions
diff --git a/features/steps/admin/appearance.rb b/features/steps/admin/appearance.rb
deleted file mode 100644
index 0d1be46d11d..00000000000
--- a/features/steps/admin/appearance.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-class Spinach::Features::AdminAppearance < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
-
- step 'submit form with new appearance' do
- fill_in 'appearance_title', with: 'MyCompany'
- fill_in 'appearance_description', with: 'dev server'
- click_button 'Save'
- end
-
- step 'I should be redirected to admin appearance page' do
- expect(current_path).to eq admin_appearances_path
- expect(page).to have_content 'Appearance settings'
- end
-
- step 'I should see newly created appearance' do
- expect(page).to have_field('appearance_title', with: 'MyCompany')
- expect(page).to have_field('appearance_description', with: 'dev server')
- expect(page).to have_content 'Last edit'
- end
-
- step 'I click preview button' do
- click_link "Preview"
- end
-
- step 'application has custom appearance' do
- create(:appearance)
- end
-
- step 'I should see a customized appearance' do
- expect(page).to have_content appearance.title
- expect(page).to have_content appearance.description
- end
-
- step 'I attach a logo' do
- attach_file(:appearance_logo, Rails.root.join('spec', 'fixtures', 'dk.png'))
- click_button 'Save'
- end
-
- step 'I attach header logos' do
- attach_file(:appearance_header_logo, Rails.root.join('spec', 'fixtures', 'dk.png'))
- click_button 'Save'
- end
-
- step 'I should see a logo' do
- expect(page).to have_xpath('//img[@src="/uploads/appearance/logo/1/dk.png"]')
- end
-
- step 'I should see header logos' do
- expect(page).to have_xpath('//img[@src="/uploads/appearance/header_logo/1/dk.png"]')
- end
-
- step 'I remove the logo' do
- click_link 'Remove logo'
- end
-
- step 'I remove the header logos' do
- click_link 'Remove header logo'
- end
-
- step 'I should see logo removed' do
- expect(page).not_to have_xpath('//img[@src="/uploads/appearance/logo/1/gitlab_logo.png"]')
- end
-
- step 'I should see header logos removed' do
- expect(page).not_to have_xpath('//img[@src="/uploads/appearance/header_logo/1/header_logo_light.png"]')
- end
-
- def appearance
- Appearance.last
- end
-end