summaryrefslogtreecommitdiff
path: root/spec/features/projects/show/user_sees_readme_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/show/user_sees_readme_spec.rb')
-rw-r--r--spec/features/projects/show/user_sees_readme_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/projects/show/user_sees_readme_spec.rb b/spec/features/projects/show/user_sees_readme_spec.rb
index 250f707948e..6a5b9472be8 100644
--- a/spec/features/projects/show/user_sees_readme_spec.rb
+++ b/spec/features/projects/show/user_sees_readme_spec.rb
@@ -14,4 +14,25 @@ RSpec.describe 'Projects > Show > User sees README' do
expect(page).to have_content 'testme'
end
end
+
+ context 'obeying robots.txt' do
+ before do
+ Gitlab::Testing::RobotsBlockerMiddleware.block_requests!
+ end
+
+ after do
+ Gitlab::Testing::RobotsBlockerMiddleware.allow_requests!
+ end
+
+ # For example, see this regression we had in
+ # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39520
+ it 'does not block the requests necessary to load the project README', :js do
+ visit project_path(project)
+ wait_for_requests
+
+ page.within('.readme-holder') do
+ expect(page).to have_content 'testme'
+ end
+ end
+ end
end