diff options
author | Mike Greiling <mgreiling@gitlab.com> | 2017-09-07 21:07:40 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-07 21:07:40 +0300 |
commit | 03b14b48a07e3bcab53b273bbeccdba1ef921ac2 (patch) | |
tree | f41b966fa0ea4e2b279be894ba9c59578e94e1fc /spec/features/projects/settings/visibility_settings_spec.rb | |
parent | 21b16c5a168ebd79c6a5bcb9633752ecf4958089 (diff) |
Resolve "Make project and features visibility settings less confusing"
Diffstat (limited to 'spec/features/projects/settings/visibility_settings_spec.rb')
-rw-r--r-- | spec/features/projects/settings/visibility_settings_spec.rb | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/spec/features/projects/settings/visibility_settings_spec.rb b/spec/features/projects/settings/visibility_settings_spec.rb index 1756c7d00fe..37ee6255bd1 100644 --- a/spec/features/projects/settings/visibility_settings_spec.rb +++ b/spec/features/projects/settings/visibility_settings_spec.rb @@ -11,19 +11,19 @@ feature 'Visibility settings', js: true do end scenario 'project visibility select is available' do - visibility_select_container = find('.js-visibility-select') + visibility_select_container = find('.project-visibility-setting') - expect(visibility_select_container.find('.visibility-select').value).to eq project.visibility_level.to_s - expect(visibility_select_container).to have_content 'The project can be accessed without any authentication.' + expect(visibility_select_container.find('select').value).to eq project.visibility_level.to_s + expect(visibility_select_container).to have_content 'The project can be accessed by anyone, regardless of authentication.' end scenario 'project visibility description updates on change' do - visibility_select_container = find('.js-visibility-select') - visibility_select = visibility_select_container.find('.visibility-select') + visibility_select_container = find('.project-visibility-setting') + visibility_select = visibility_select_container.find('select') visibility_select.select('Private') expect(visibility_select.value).to eq '0' - expect(visibility_select_container).to have_content 'Project access must be granted explicitly to each user.' + expect(visibility_select_container).to have_content 'Access must be granted explicitly to each user.' end end @@ -37,11 +37,10 @@ feature 'Visibility settings', js: true do end scenario 'project visibility is locked' do - visibility_select_container = find('.js-visibility-select') + visibility_select_container = find('.project-visibility-setting') - expect(visibility_select_container).not_to have_select '.visibility-select' - expect(visibility_select_container).to have_content 'Public' - expect(visibility_select_container).to have_content 'The project can be accessed without any authentication.' + expect(visibility_select_container).to have_selector 'select[name="project[visibility_level]"]:disabled' + expect(visibility_select_container).to have_content 'The project can be accessed by anyone, regardless of authentication.' end end end |