Commit 68e1c920 authored by Kushal Pandya's avatar Kushal Pandya

Add browser and platform flags

- Adds CSS classes to represent browser & platform
- Adds JS flags to `gl` object to represent
browser & platform
parent effd7e72
!!! 5 !!! 5
%html.devise-layout-html{ class: system_message_class } %html.devise-layout-html{ class: system_message_class }
= render "layouts/head" = 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 = header_message
= render "layouts/init_client_detection_flags"
.page-wrap .page-wrap
= render "layouts/header/empty" = render "layouts/header/empty"
.login-page-broadcast .login-page-broadcast
......
!!! 5 !!! 5
%html{ lang: "en", class: system_message_class } %html{ lang: "en", class: system_message_class }
= render "layouts/head" = render "layouts/head"
%body.ui-indigo.login-page.application.navless %body.ui-indigo.login-page.application.navless{ class: "#{client_class_list}" }
= header_message = header_message
= render "layouts/init_client_detection_flags"
= render "layouts/header/empty" = render "layouts/header/empty"
= render "layouts/broadcast" = render "layouts/broadcast"
.container.navless-container .container.navless-container
......
...@@ -624,6 +624,14 @@ describe 'Login' do ...@@ -624,6 +624,14 @@ describe 'Login' do
end end
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 context 'when terms are enforced' do
let(:user) { create(:user) } let(:user) { create(:user) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment