From 5700842ba8ca2f3100395a9fb98c759e78e63d96 Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Wed, 15 Oct 2014 02:21:21 -0500 Subject: Add Markdown preview to more forms Enable Markdown previews when creating and editing issues, merge requests, and milestones, and when editing notes. --- spec/features/notes_on_merge_requests_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/features') diff --git a/spec/features/notes_on_merge_requests_spec.rb b/spec/features/notes_on_merge_requests_spec.rb index 92f3a6c0929..bf3c12012e5 100644 --- a/spec/features/notes_on_merge_requests_spec.rb +++ b/spec/features/notes_on_merge_requests_spec.rb @@ -20,7 +20,7 @@ describe 'Comments' do should have_css(".js-main-target-form", visible: true, count: 1) find(".js-main-target-form input[type=submit]").value.should == "Add Comment" within(".js-main-target-form") { should_not have_link("Cancel") } - within(".js-main-target-form") { should have_css(".js-note-preview-button", visible: false) } + within('.js-main-target-form') { should have_css('.js-md-preview-button', visible: false) } end describe "with text" do @@ -32,7 +32,7 @@ describe 'Comments' do it 'should have enable submit button and preview button' do within(".js-main-target-form") { should_not have_css(".js-comment-button[disabled]") } - within(".js-main-target-form") { should have_css(".js-note-preview-button", visible: true) } + within('.js-main-target-form') { should have_css('.js-md-preview-button', visible: true) } end end end @@ -41,7 +41,7 @@ describe 'Comments' do before do within(".js-main-target-form") do fill_in "note[note]", with: "This is awsome!" - find(".js-note-preview-button").trigger("click") + find('.js-md-preview-button').trigger('click') click_button "Add Comment" end end @@ -49,7 +49,7 @@ describe 'Comments' do it 'should be added and form reset' do should have_content("This is awsome!") within(".js-main-target-form") { should have_no_field("note[note]", with: "This is awesome!") } - within(".js-main-target-form") { should have_css(".js-note-preview", visible: false) } + within('.js-main-target-form') { should have_css('.js-md-preview', visible: false) } within(".js-main-target-form") { should have_css(".js-note-text", visible: true) } end end @@ -172,11 +172,11 @@ describe 'Comments' do # add two separate texts and trigger previews on both within("tr[id='#{line_code}'] + .js-temp-notes-holder") do fill_in "note[note]", with: "One comment on line 7" - find(".js-note-preview-button").trigger("click") + find('.js-md-preview-button').trigger('click') end within("tr[id='#{line_code_2}'] + .js-temp-notes-holder") do fill_in "note[note]", with: "Another comment on line 10" - find(".js-note-preview-button").trigger("click") + find('.js-md-preview-button').trigger('click') end end end -- cgit v1.2.1