summaryrefslogtreecommitdiff
path: root/spec/features/admin
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-04-02 14:26:59 +0000
committerAlexandru Croitor <acroitor@gitlab.com>2019-02-21 17:55:51 +0200
commit28e1739a3fd8c93e4805fe0053faf820cec4e1bc (patch)
treee4f8e3e45155c2410d2e5fb9e3f02be4175acf37 /spec/features/admin
parentc8bf9f78f3e481cb7e74384fa45b46b864fa523a (diff)
downloadgitlab-ce-28e1739a3fd8c93e4805fe0053faf820cec4e1bc.tar.gz
Port EE System Header And Footer feature to CE
remove EE specific code remove EE licence checks move migration from EE to CE folder structure move specs from EE to CE folder structure remove EE specific flag specs
Diffstat (limited to 'spec/features/admin')
-rw-r--r--spec/features/admin/admin_appearance_spec.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/features/admin/admin_appearance_spec.rb b/spec/features/admin/admin_appearance_spec.rb
index 57215c0d1e9..83cd686818c 100644
--- a/spec/features/admin/admin_appearance_spec.rb
+++ b/spec/features/admin/admin_appearance_spec.rb
@@ -39,6 +39,38 @@ describe 'Admin Appearance' do
expect_custom_new_project_appearance(appearance)
end
+ context 'Custom system header and footer' do
+ before do
+ sign_in(create(:admin))
+ end
+
+ context 'when system header and footer messages are empty' do
+ it 'shows custom system header and footer fields' do
+ visit admin_appearances_path
+
+ expect(page).to have_field('appearance_header_message', with: '')
+ expect(page).to have_field('appearance_footer_message', with: '')
+ expect(page).to have_field('appearance_message_background_color')
+ expect(page).to have_field('appearance_message_font_color')
+ end
+ end
+
+ context 'when system header and footer messages are not empty' do
+ before do
+ appearance.update(header_message: 'Foo', footer_message: 'Bar')
+ end
+
+ it 'shows custom system header and footer fields' do
+ visit admin_appearances_path
+
+ expect(page).to have_field('appearance_header_message', with: appearance.header_message)
+ expect(page).to have_field('appearance_footer_message', with: appearance.footer_message)
+ expect(page).to have_field('appearance_message_background_color')
+ expect(page).to have_field('appearance_message_font_color')
+ end
+ end
+ end
+
it 'Custom sign-in page' do
visit new_user_session_path