Commit afc071fe authored by Paul Gascou-Vaillancourt's avatar Paul Gascou-Vaillancourt Committed by mc_rocha

Disable ArkoseLabs feature flag globally in specs

parent 5b6c58a5
...@@ -5,6 +5,10 @@ require 'spec_helper' ...@@ -5,6 +5,10 @@ require 'spec_helper'
RSpec.describe 'ArkoseLabs content security policy' do RSpec.describe 'ArkoseLabs content security policy' do
let(:user) { create(:user) } let(:user) { create(:user) }
before do
stub_feature_flags(arkose_labs_login_challenge: true)
end
it 'has proper Content Security Policy headers' do it 'has proper Content Security Policy headers' do
visit root_path visit root_path
......
...@@ -21,6 +21,10 @@ RSpec.describe API::CaptchaCheck do ...@@ -21,6 +21,10 @@ RSpec.describe API::CaptchaCheck do
end end
context 'when the feature flag arkose_labs_login_challenge is enabled' do context 'when the feature flag arkose_labs_login_challenge is enabled' do
before do
stub_feature_flags(arkose_labs_login_challenge: true)
end
context 'when the username is invalid' do context 'when the username is invalid' do
let(:invalid_username) { 'invalidUsername' } let(:invalid_username) { 'invalidUsername' }
......
...@@ -329,6 +329,10 @@ RSpec.configure do |config| ...@@ -329,6 +329,10 @@ RSpec.configure do |config|
stub_feature_flags(disable_anonymous_search: false) stub_feature_flags(disable_anonymous_search: false)
stub_feature_flags(disable_anonymous_project_search: false) stub_feature_flags(disable_anonymous_project_search: false)
# Specs should not get a CAPTCHA challenge by default, this makes the sign-in flow simpler in
# most cases. We do test the CAPTCHA flow in the appropriate specs.
stub_feature_flags(arkose_labs_login_challenge: false)
allow(Gitlab::GitalyClient).to receive(:can_use_disk?).and_return(enable_rugged) allow(Gitlab::GitalyClient).to receive(:can_use_disk?).and_return(enable_rugged)
else else
unstub_all_feature_flags unstub_all_feature_flags
......
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