Fix builds tab visibility
This commit is contained in:
parent
696f09c7bf
commit
cabc2a7160
3 changed files with 22 additions and 1 deletions
|
@ -43,6 +43,7 @@ Please view this file on the master branch, on stable branches it's out of date.
|
|||
- Fix applying labels for GitHub-imported MRs !7139
|
||||
- Fix importing MR comments from GitHub !7139
|
||||
- Modify GitHub importer to be retryable !7003
|
||||
- Fix builds tab visibility
|
||||
- Fix and improve `Sortable.highest_label_priority`
|
||||
- Fixed sticky merge request tabs when sidebar is pinned
|
||||
|
||||
|
|
|
@ -174,10 +174,14 @@ module ProjectsHelper
|
|||
nav_tabs << :merge_requests
|
||||
end
|
||||
|
||||
if can?(current_user, :read_build, project)
|
||||
if can?(current_user, :read_pipeline, project)
|
||||
nav_tabs << :pipelines
|
||||
end
|
||||
|
||||
if can?(current_user, :read_build, project)
|
||||
nav_tabs << :builds
|
||||
end
|
||||
|
||||
if Gitlab.config.registry.enabled && can?(current_user, :read_container_image, project)
|
||||
nav_tabs << :container_registry
|
||||
end
|
||||
|
|
|
@ -41,6 +41,22 @@ describe 'Edit Project Settings', feature: true do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "pipelines subtabs" do
|
||||
it "shows builds when enabled" do
|
||||
visit namespace_project_pipelines_path(project.namespace, project)
|
||||
|
||||
expect(page).to have_selector(".shortcuts-builds")
|
||||
end
|
||||
|
||||
it "hides builds when disabled" do
|
||||
allow(Ability).to receive(:allowed?).with(member, :read_builds, project).and_return(false)
|
||||
|
||||
visit namespace_project_pipelines_path(project.namespace, project)
|
||||
|
||||
expect(page).not_to have_selector(".shortcuts-builds")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'project features visibility pages' do
|
||||
|
|
Loading…
Reference in a new issue