Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-18 21:11:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-18 21:11:13 +0300
commit0c5ecdea894cbb702c890143533f651d48a60080 (patch)
tree03a00890584543bd099159f780e4a03c01c4b780 /spec/features/callouts
parent71b7a9d5b24f62e725896e37c67d550ae80ba525 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/callouts')
-rw-r--r--spec/features/callouts/security_newsletter_callout_spec.rb57
1 files changed, 0 insertions, 57 deletions
diff --git a/spec/features/callouts/security_newsletter_callout_spec.rb b/spec/features/callouts/security_newsletter_callout_spec.rb
deleted file mode 100644
index b17bb372456..00000000000
--- a/spec/features/callouts/security_newsletter_callout_spec.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe 'Security newsletter callout', :js do
- let_it_be(:admin) { create(:admin) }
- let_it_be(:non_admin) { create(:user) }
-
- shared_examples 'hidden callout' do
- it 'does not display callout' do
- expect(page).not_to have_content 'Sign up for the GitLab Security Newsletter to get notified for security updates.'
- end
- end
-
- context 'when an admin is logged in' do
- before do
- sign_in(admin)
- gitlab_enable_admin_mode_sign_in(admin)
-
- visit admin_root_path
- end
-
- it 'displays callout' do
- expect(page).to have_content 'Sign up for the GitLab Security Newsletter to get notified for security updates.'
- expect(page).to have_link 'Sign up for the GitLab newsletter', href: 'https://about.gitlab.com/company/preference-center/'
- end
-
- context 'when link is clicked' do
- before do
- find_link('Sign up for the GitLab newsletter').click
-
- visit admin_root_path
- end
-
- it_behaves_like 'hidden callout'
- end
-
- context 'when callout is dismissed' do
- before do
- find('[data-testid="close-security-newsletter-callout"]').click
-
- visit admin_root_path
- end
-
- it_behaves_like 'hidden callout'
- end
- end
-
- context 'when a non-admin is logged in' do
- before do
- sign_in(non_admin)
- visit admin_root_path
- end
-
- it_behaves_like 'hidden callout'
- end
-end