Commit fe12a6d3 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'tmslvnkc/qa/new_test/third_party_offers' into 'master'

Third Party Offers Test

Closes gitlab-org/quality/testcases#118

See merge request gitlab-org/gitlab!21100
parents c8729a1b 261a9a7d
...@@ -191,4 +191,28 @@ describe 'Gcp Cluster', :js do ...@@ -191,4 +191,28 @@ describe 'Gcp Cluster', :js do
expect(page).not_to have_css('.gcp-signup-offer') expect(page).not_to have_css('.gcp-signup-offer')
end end
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 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