summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-09-02 08:28:11 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-09-02 08:28:11 +0000
commitd6de7c65500b73f2e7f899e0c0a224aafca3d4d1 (patch)
tree03ee038197aacb21da809276b8f37b92e68cdc50
parent86cdf212fd6957c9b37fb076a4d95cc6e1e5e9ba (diff)
parent68e1c9206bc45719a7239dc98485764416ff2dad (diff)
downloadgitlab-ce-d6de7c65500b73f2e7f899e0c0a224aafca3d4d1.tar.gz
Merge branch '50013-add-browser-platform-flags-sign-in-pages' into 'master'
Add CSS & JS global flags to represent browser and platform on login pages See merge request gitlab-org/gitlab-ce!32521
-rw-r--r--app/views/layouts/devise.html.haml3
-rw-r--r--app/views/layouts/devise_empty.html.haml3
-rw-r--r--spec/features/users/login_spec.rb8
3 files changed, 12 insertions, 2 deletions
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index e9a4a068599..d36e08f44a4 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -1,8 +1,9 @@
!!! 5
%html.devise-layout-html{ class: system_message_class }
= render "layouts/head"
- %body.ui-indigo.login-page.application.navless{ data: { page: body_data_page, qa_selector: 'login_page' } }
+ %body.ui-indigo.login-page.application.navless{ class: "#{client_class_list}", data: { page: body_data_page, qa_selector: 'login_page' } }
= header_message
+ = render "layouts/init_client_detection_flags"
.page-wrap
= render "layouts/header/empty"
.login-page-broadcast
diff --git a/app/views/layouts/devise_empty.html.haml b/app/views/layouts/devise_empty.html.haml
index 6c9c8aa4431..ff2b00ea376 100644
--- a/app/views/layouts/devise_empty.html.haml
+++ b/app/views/layouts/devise_empty.html.haml
@@ -1,8 +1,9 @@
!!! 5
%html{ lang: "en", class: system_message_class }
= render "layouts/head"
- %body.ui-indigo.login-page.application.navless
+ %body.ui-indigo.login-page.application.navless{ class: "#{client_class_list}" }
= header_message
+ = render "layouts/init_client_detection_flags"
= render "layouts/header/empty"
= render "layouts/broadcast"
.container.navless-container
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb
index 8e4db2ca840..d1f3b3f4076 100644
--- a/spec/features/users/login_spec.rb
+++ b/spec/features/users/login_spec.rb
@@ -624,6 +624,14 @@ describe 'Login' do
end
end
+ describe 'Client helper classes and flags' do
+ it 'adds client browser and platform classes to page body' do
+ visit root_path
+ expect(find('body')[:class]).to include('gl-browser-generic')
+ expect(find('body')[:class]).to include('gl-platform-other')
+ end
+ end
+
context 'when terms are enforced' do
let(:user) { create(:user) }