Commit b21722fa authored by Tomislav Nikic's avatar Tomislav Nikic

Adding a test for third party offers

Adding a third party offers test that checks on a lower level if the
offers are disabled when done so in the settings.
parent 5cc4a92b
......@@ -191,4 +191,29 @@ describe 'Gcp Cluster', :js do
expect(page).not_to have_css('.gcp-signup-offer')
end
end
context 'when third party offers are disabled' do
let(:admin) { create(:admin) }
before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
sign_in(admin)
gitlab_enable_admin_mode_sign_in(admin)
visit integrations_admin_application_settings_path
end
it 'user does not see the offer' do
page.within('.as-third-party-offers') do
click_button 'Expand'
check 'Do not display offers from third parties within GitLab'
click_button 'Save changes'
end
expect(page).to have_content "Application settings saved successfully"
visit project_clusters_path(project)
expect(page).not_to have_css('.gcp-signup-offer')
end
end
end
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