Commit 4d7dedf7 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '28307-update-projects-edit-feature-spec' into 'master'

Update feature visibility spec for projects edit page

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