Commit ad3433f9 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'hudecof/show-crowd-login-form-when-signin-disabled' into 'master'

Show Crowd login even when sign-in is disabled

Fixes #13176.

See merge request !2749
parents 5deb4ac1 eb178f6d
Please view this file on the master branch, on stable branches it's out of date.
v 8.6.0 (unreleased)
- Show Crowd login tab when sign in is disabled and Crowd is enabled (Peter Hudec)
v 8.5.0
- Fix duplicate "me" in tooltip of the "thumbsup" awards Emoji (Stan Hu)
......
- page_title "Sign in"
%div
- if signin_enabled? || ldap_enabled?
- if signin_enabled? || ldap_enabled? || crowd_enabled?
= render 'devise/shared/signin_box'
-# Omniauth fits between signin/ldap signin and signup and does not have a surrounding box
......
Feature: Login form
Scenario: I see crowd form
Scenario: I see Crowd form
Given Crowd integration enabled
When I visit sign in page
Then I should see Crowd login form
Scenario: I see Crowd form when sign-in is disabled
Given Crowd integration enabled
And Sign-in is disabled
When I visit sign in page
Then I should see Crowd login form
......@@ -5,18 +5,18 @@ class Spinach::Features::LoginForm < Spinach::FeatureSteps
include SharedUser
include SharedSearch
step 'Sign-in is disabled' do
allow_any_instance_of(ApplicationHelper).to receive(:signin_enabled?).and_return(false)
end
step 'Crowd integration enabled' do
@providers_orig = Gitlab::OAuth::Provider.providers
@omniauth_conf_orig = Gitlab.config.omniauth.enabled
expect(Gitlab::OAuth::Provider).to receive(:providers).and_return([:crowd])
allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_return(root_path)
expect(Gitlab.config.omniauth).to receive(:enabled).and_return(true)
allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_return(root_path)
end
step 'I should see Crowd login form' do
expect(page).to have_selector '#tab-crowd form'
Gitlab::OAuth::Provider.stub(:providers).and_return(@providers_orig)
Gitlab.config.omniauth.stub(:enabled).and_return(@omniauth_conf_orig)
end
step 'I visit sign in page' do
......
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