Commit 2e5ba72d authored by Dallas Reedy's avatar Dallas Reedy

Remove the border from the signub box on the trial registration page

- Add a simple `borderless` option we can pass through as a local
variable to the partial when we render it
- Add tests for that use case

Changelog: changed
EE: true
parent 37840a36
- max_first_name_length = max_last_name_length = 127
- omniauth_providers_placement ||= :bottom
- borderless ||= false
.gl-mb-3.gl-p-4.gl-border-gray-100.gl-border-1.gl-border-solid.gl-rounded-base
.gl-mb-3.gl-p-4{ class: (borderless ? '' : 'gl-border-gray-100 gl-border-1 gl-border-solid gl-rounded-base') }
- if show_omniauth_providers && omniauth_providers_placement == :top
= render 'devise/shared/signup_omniauth_providers_top'
......
......@@ -17,6 +17,7 @@
.signup-page
= render 'devise/shared/signup_box',
borderless: true,
url: trial_registrations_path,
button_text: _('Continue'),
show_omniauth_providers: social_signin_enabled?,
......
......@@ -63,6 +63,22 @@ RSpec.describe 'devise/shared/_signup_box' do
end
end
context 'using the borderless option' do
let(:border_css_classes) { '.gl-border-gray-100.gl-border-1.gl-border-solid.gl-rounded-base' }
it 'renders with a border by default' do
render
expect(rendered).to have_selector(border_css_classes)
end
it 'renders without a border when borderless is truthy' do
render('devise/shared/signup_box', borderless: true)
expect(rendered).not_to have_selector(border_css_classes)
end
end
def stub_devise
allow(view).to receive(:devise_mapping).and_return(Devise.mappings[:user])
allow(view).to receive(:resource).and_return(spy)
......
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