debian-mirror-gitlab/spec/features/projects/show/user_sees_readme_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
977 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-10-15 14:42:47 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Projects > Show > User sees README' do
2020-04-08 14:13:33 +05:30
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :repository, :public) }
2018-10-15 14:42:47 +05:30
it 'shows 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
2020-11-24 15:15:51 +05:30
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
2018-10-15 14:42:47 +05:30
end