Commit 52a21137 authored by sfang97's avatar sfang97

Change spec to look for right class

parent ad21b195
......@@ -24,7 +24,6 @@
.form-group
= text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input'
.form-actions.clearfix
.float-right
%button.btn.btn-default{ type: "button", "data-dismiss": "modal" }
%button.btn.btn-default.gl-display-flex.gl-justify-content-end{ type: "button", "data-dismiss": "modal" }
= _('Cancel')
= submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true
......@@ -21,7 +21,7 @@
%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)
.js-project-permissions-form
- if show_visibility_confirm_modal?(@project)
- if !show_visibility_confirm_modal?(@project)
= render "visibility_modal"
.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 }
......
......@@ -17,5 +17,5 @@
.form-group
= 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"
......@@ -22,10 +22,10 @@ RSpec.describe 'User changes public project visibility', :js do
click_button 'Save changes'
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
click_button 'Reduce project visibility'
click_button 'Confirm'
end
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