Commit aec733df authored by Matija Čupić's avatar Matija Čupić

Port changes from FOSS

Ports changes from
https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/29013
parent 33eb5977
......@@ -51,7 +51,8 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
new_file_anchor_data,
readme_anchor_data,
changelog_anchor_data,
contribution_guide_anchor_data
contribution_guide_anchor_data,
gitlab_ci_anchor_data
].compact.reject { |item| item.is_link }
end
......
......@@ -429,5 +429,22 @@ describe ProjectPresenter do
a_string_including('CONTRIBUTING')
)
end
context 'empty repo' do
let(:project) { create(:project, :repository) }
it 'orders the items correctly in an empty project' do
project.add_developer(user)
allow(project).to receive(:auto_devops_enabled?).and_return(false)
buttons = presenter.empty_repo_statistics_buttons
expect(buttons.map(&:label)).to start_with(
a_string_including('New'),
a_string_including('README'),
a_string_including('CHANGELOG'),
a_string_including('CONTRIBUTING'),
a_string_including('CI/CD')
)
end
end
end
end
end
\ No newline at end of file
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