Commit cd4073ca authored by David Piegza's avatar David Piegza

Update feature visibility spec for projects edit page

parent 130fd255
...@@ -21,36 +21,28 @@ feature 'Project edit', feature: true, js: true do ...@@ -21,36 +21,28 @@ feature 'Project edit', feature: true, js: true do
expect(page).to have_selector('.merge-requests-feature', visible: false) expect(page).to have_selector('.merge-requests-feature', visible: false)
end end
it 'hides merge requests section after save' do context 'given project with merge_requests_disabled access level' do
select('Disabled', from: 'project_project_feature_attributes_merge_requests_access_level') let(:project) { create(:project, :merge_requests_disabled) }
expect(page).to have_selector('.merge-requests-feature', visible: false)
click_button 'Save changes'
wait_for_ajax it 'hides merge requests section' do
expect(page).to have_selector('.merge-requests-feature', visible: false)
expect(page).to have_selector('.merge-requests-feature', visible: false) end
end end
end end
context 'builds select' do context 'builds select' do
it 'hides merge requests section' do it 'hides builds select section' do
select('Disabled', from: 'project_project_feature_attributes_builds_access_level') select('Disabled', from: 'project_project_feature_attributes_builds_access_level')
expect(page).to have_selector('.builds-feature', visible: false) expect(page).to have_selector('.builds-feature', visible: false)
end end
it 'hides merge requests section after save' do context 'given project with builds_disabled access level' do
select('Disabled', from: 'project_project_feature_attributes_builds_access_level') let(:project) { create(:project, :builds_disabled) }
expect(page).to have_selector('.builds-feature', visible: false)
click_button 'Save changes' it 'hides builds select section' do
expect(page).to have_selector('.builds-feature', visible: false)
wait_for_ajax end
expect(page).to have_selector('.builds-feature', visible: false)
end end
end end
end end
......
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