Commit c48818a3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add specs and changelog for packages fix

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 56bcc27b
---
title: Don't show packages tab and settings for starter license
merge_request: 8270
author:
type: fixed
...@@ -14,11 +14,29 @@ describe 'Projects > Settings > Packages', :js do ...@@ -14,11 +14,29 @@ describe 'Projects > Settings > Packages', :js do
allow(Gitlab.config.packages).to receive(:enabled).and_return(true) allow(Gitlab.config.packages).to receive(:enabled).and_return(true)
end end
it 'displays the packages toggle button' do context 'allowed by license' do
visit edit_project_path(project) before do
stub_licensed_features(packages: true)
end
it 'displays the packages toggle button' do
visit edit_project_path(project)
expect(page).to have_content('Packages')
expect(page).to have_selector('input[name="project[packages_enabled]"] + button', visible: true)
end
end
context 'not allowed by license' do
before do
stub_licensed_features(packages: false)
end
it 'does not show up in UI' do
visit edit_project_path(project)
expect(page).to have_content('Packages') expect(page).not_to have_content('Packages')
expect(page).to have_selector('input[name="project[packages_enabled]"] + button', visible: true) end
end end
end end
......
...@@ -177,7 +177,7 @@ describe 'Edit Project Settings' do ...@@ -177,7 +177,7 @@ describe 'Edit Project Settings' do
click_button "Save changes" click_button "Save changes"
end end
expect(find(".sharing-permissions")).to have_selector(".project-feature-toggle.is-disabled", count: 3) expect(find(".sharing-permissions")).to have_selector(".project-feature-toggle.is-disabled", count: 2)
end end
it "shows empty features project homepage" do it "shows empty features project homepage" do
......
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