diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index 5be001e0a226c64cd8c93e2f3e692d3f088e09e7..a41ee67a8412b542153a854fd2a83054b4adfdbd 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -203,8 +203,7 @@ class Notes form.find(".js-errors").remove() # reset text and preview - previewContainer = form.find(".note-edit-and-preview") - previewContainer.removeClass "on" if previewContainer.is(".on") + form.find(".js-note-write-button").click() form.find(".js-note-text").val("").trigger "input" ### @@ -254,7 +253,7 @@ class Notes form.removeClass "js-new-note-form" # setup preview buttons - form.find(".js-note-edit-button, .js-note-preview-button").tooltip placement: "left" + form.find(".js-note-write-button, .js-note-preview-button").tooltip placement: "left" previewButton = form.find(".js-note-preview-button") form.find(".js-note-text").on "input", -> if $(this).val().trim() isnt "" diff --git a/spec/features/notes_on_merge_requests_spec.rb b/spec/features/notes_on_merge_requests_spec.rb index 45aebf128c299fac579108463df3a962df8b4eb6..7f1da3cffdf79ba456fe2ed9766fe6ed2a8dfa52 100644 --- a/spec/features/notes_on_merge_requests_spec.rb +++ b/spec/features/notes_on_merge_requests_spec.rb @@ -44,7 +44,7 @@ describe "On a merge request", js: true, feature: true do it 'should have text and visible edit button' do within(".js-main-target-form") { should have_css(".js-note-preview", text: "This is awesome", visible: true) } within(".js-main-target-form") { should have_css(".js-note-preview-button", visible: false) } - within(".js-main-target-form") { should have_css(".js-note-edit-button", visible: true) } + within(".js-main-target-form") { should have_css(".js-note-write-button", visible: true) } end end end diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index f6ab47ed91ba90f2bdf22946bf1957f681117ea3..eb8422df599d30010ef8e218e8ba5c17e26dfb89 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -190,17 +190,6 @@ describe "Internal Project Access", feature: true do it { should be_denied_for :visitor } end - describe "GET /:project_path/branches/recent" do - subject { recent_project_branches_path(project) } - - it { should be_allowed_for master } - it { should be_allowed_for reporter } - it { should be_allowed_for :admin } - it { should be_allowed_for guest } - it { should be_allowed_for :user } - it { should be_denied_for :visitor } - end - describe "GET /:project_path/branches" do subject { project_branches_path(project) } diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index 8a0fcb8e9fffae71633dc58da2ed2b3ed2bf2467..186ad35046976862f80826f5568123e9fd6472a6 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -168,17 +168,6 @@ describe "Private Project Access", feature: true do it { should be_denied_for :visitor } end - describe "GET /:project_path/branches/recent" do - subject { recent_project_branches_path(project) } - - it { should be_allowed_for master } - it { should be_allowed_for reporter } - it { should be_allowed_for :admin } - it { should be_denied_for guest } - it { should be_denied_for :user } - it { should be_denied_for :visitor } - end - describe "GET /:project_path/branches" do subject { project_branches_path(project) } diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index eb511bfefe02b8ecf01b8acde6b6eda72da0c7e5..f5d1cf7b971cf4d33b2665495ee946aec486b96f 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -195,17 +195,6 @@ describe "Public Project Access", feature: true do it { should be_denied_for :visitor } end - describe "GET /:project_path/branches/recent" do - subject { recent_project_branches_path(project) } - - it { should be_allowed_for master } - it { should be_allowed_for reporter } - it { should be_allowed_for :admin } - it { should be_allowed_for guest } - it { should be_allowed_for :user } - it { should be_allowed_for :visitor } - end - describe "GET /:project_path/branches" do subject { project_branches_path(project) }