Commit 52a21137 authored by sfang97's avatar sfang97

Change spec to look for right class

parent ad21b195
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
.form-group .form-group
= text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' = text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input'
.form-actions.clearfix .form-actions.clearfix
.float-right %button.btn.btn-default.gl-display-flex.gl-justify-content-end{ type: "button", "data-dismiss": "modal" }
%button.btn.btn-default{ type: "button", "data-dismiss": "modal" } = _('Cancel')
= _('Cancel') = submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true
= submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
%input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' } %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
%template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project) %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project)
.js-project-permissions-form .js-project-permissions-form
- if show_visibility_confirm_modal?(@project) - if !show_visibility_confirm_modal?(@project)
= render "visibility_modal" = render "visibility_modal"
.gl-display-flex.gl-justify-content-end .gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level }
......
...@@ -17,5 +17,5 @@ ...@@ -17,5 +17,5 @@
.form-group .form-group
= text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' = text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input'
.form-actions .form-actions.gl-display-flex.gl-justify-content-end
= submit_tag _('Confirm'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button" = submit_tag _('Confirm'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button"
...@@ -22,10 +22,10 @@ RSpec.describe 'User changes public project visibility', :js do ...@@ -22,10 +22,10 @@ RSpec.describe 'User changes public project visibility', :js do
click_button 'Save changes' click_button 'Save changes'
end end
find('.js-confirm-danger-input').send_keys(project.path_with_namespace) find('.js-confirm-danger-input').send_keys(project.name)
page.within '.modal' do page.within '.modal' do
click_button 'Reduce project visibility' click_button 'Confirm'
end end
expect(page).to have_text("Project '#{project.name}' was successfully updated") expect(page).to have_text("Project '#{project.name}' was successfully updated")
......
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