diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-10-19 14:35:33 +0300 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.m.gray@gmail.com> | 2018-10-19 14:35:33 +0300 |
commit | 1af6ddffed5028b9e1f63e2d5760982a7b2ca473 (patch) | |
tree | 162d4ca9bf20993d99c692cf40b75c9d26d0069f /spec | |
parent | cdfc2378e5e30ac87479ef839dbc20f3bdaf1af0 (diff) |
Change markdown header tab anchor links to buttons
Diffstat (limited to 'spec')
7 files changed, 20 insertions, 20 deletions
diff --git a/spec/features/groups/milestone_spec.rb b/spec/features/groups/milestone_spec.rb index 80df0618a6a..e8ca6a6714f 100644 --- a/spec/features/groups/milestone_spec.rb +++ b/spec/features/groups/milestone_spec.rb @@ -23,17 +23,17 @@ describe 'Group milestones' do description.native.send_keys('') - click_link('Preview') + click_button('Preview') preview = find('.js-md-preview') expect(preview).to have_content('Nothing to preview.') - click_link('Write') + click_button('Write') description.native.send_keys(':+1: Nice') - click_link('Preview') + click_button('Preview') expect(preview).to have_css('gl-emoji') expect(find('#milestone_description', visible: false)).not_to be_visible diff --git a/spec/features/issues/user_creates_issue_spec.rb b/spec/features/issues/user_creates_issue_spec.rb index 5e8662100c5..687a6f1eafc 100644 --- a/spec/features/issues/user_creates_issue_spec.rb +++ b/spec/features/issues/user_creates_issue_spec.rb @@ -47,15 +47,15 @@ describe "User creates issue" do textarea = first(".gfm-form textarea") page.within(form) do - click_link("Preview") + click_button("Preview") preview = find(".js-md-preview") # this element is findable only when the "Preview" link is clicked. expect(preview).to have_content("Nothing to preview.") - click_link("Write") + click_button("Write") fill_in("Description", with: "Bug fixed :smile:") - click_link("Preview") + click_button("Preview") expect(preview).to have_css("gl-emoji") expect(textarea).not_to be_visible diff --git a/spec/features/issues/user_edits_issue_spec.rb b/spec/features/issues/user_edits_issue_spec.rb index 1d9c3abc20f..60b88ef4bdf 100644 --- a/spec/features/issues/user_edits_issue_spec.rb +++ b/spec/features/issues/user_edits_issue_spec.rb @@ -17,9 +17,9 @@ describe "User edits issue", :js do page.within(form) do fill_in("Description", with: "Bug fixed :smile:") - click_link("Preview") + click_button("Preview") end - expect(form).to have_link("Write") + expect(form).to have_button("Write") end end diff --git a/spec/features/merge_request/user_views_open_merge_request_spec.rb b/spec/features/merge_request/user_views_open_merge_request_spec.rb index 6ac495aa03d..71022c6bb08 100644 --- a/spec/features/merge_request/user_views_open_merge_request_spec.rb +++ b/spec/features/merge_request/user_views_open_merge_request_spec.rb @@ -41,7 +41,7 @@ describe 'User views an open merge request' do find('.gfm-form').fill_in(:merge_request_description, with: '') page.within('.gfm-form') do - click_link('Preview') + click_button('Preview') expect(find('.js-md-preview')).to have_content('Nothing to preview.') end @@ -51,12 +51,12 @@ describe 'User views an open merge request' do find('.gfm-form').fill_in(:merge_request_description, with: ':+1: Nice') page.within('.gfm-form') do - click_link('Preview') + click_button('Preview') expect(find('.js-md-preview')).to have_css('gl-emoji') end - expect(find('.gfm-form')).to have_css('.js-md-preview').and have_link('Write') + expect(find('.gfm-form')).to have_css('.js-md-preview').and have_button('Write') expect(find('#merge_request_description', visible: false)).not_to be_visible end end diff --git a/spec/features/projects/commit/comments/user_adds_comment_spec.rb b/spec/features/projects/commit/comments/user_adds_comment_spec.rb index 6397df086a7..29442a58ea4 100644 --- a/spec/features/projects/commit/comments/user_adds_comment_spec.rb +++ b/spec/features/projects/commit/comments/user_adds_comment_spec.rb @@ -28,19 +28,19 @@ describe "User adds a comment on a commit", :js do fill_in("note[note]", with: "#{comment_text} #{emoji}") # Check on `Preview` tab - click_link("Preview") + click_button("Preview") expect(find(".js-md-preview")).to have_content(comment_text).and have_css("gl-emoji") expect(page).not_to have_css(".js-note-text") # Check on the `Write` tab - click_link("Write") + click_button("Write") expect(page).to have_field("note[note]", with: "#{comment_text} #{emoji}") # Submit comment from the `Preview` tab to get rid of a separate `it` block # which would specially tests if everything gets cleared from the note form. - click_link("Preview") + click_button("Preview") click_button("Comment") end @@ -88,13 +88,13 @@ describe "User adds a comment on a commit", :js do # Test Preview feature for both forms. page.within("form[data-line-code='#{sample_commit.line_code}']") do - click_link("Preview") + click_button("Preview") end page.within("form[data-line-code='#{sample_commit.del_line_code}']") do fill_in("note[note]", with: another_comment_text) - click_link("Preview") + click_button("Preview") end expect(page).to have_css(".js-md-preview", visible: true, count: 2) diff --git a/spec/features/projects/commit/user_comments_on_commit_spec.rb b/spec/features/projects/commit/user_comments_on_commit_spec.rb index 6397a8ad845..73ce8d2b996 100644 --- a/spec/features/projects/commit/user_comments_on_commit_spec.rb +++ b/spec/features/projects/commit/user_comments_on_commit_spec.rb @@ -25,19 +25,19 @@ describe "User comments on commit", :js do fill_in("note[note]", with: "#{comment_text} #{emoji_code}") # Check on `Preview` tab - click_link("Preview") + click_button("Preview") expect(find(".js-md-preview")).to have_content(comment_text).and have_css("gl-emoji") expect(page).not_to have_css(".js-note-text") # Check on `Write` tab - click_link("Write") + click_button("Write") expect(page).to have_field("note[note]", with: "#{comment_text} #{emoji_code}") # Submit comment from the `Preview` tab to get rid of a separate `it` block # which would specially tests if everything gets cleared from the note form. - click_link("Preview") + click_button("Preview") click_button("Comment") end diff --git a/spec/javascripts/vue_shared/components/markdown/header_spec.js b/spec/javascripts/vue_shared/components/markdown/header_spec.js index 6c4bc3602c1..59613faa49f 100644 --- a/spec/javascripts/vue_shared/components/markdown/header_spec.js +++ b/spec/javascripts/vue_shared/components/markdown/header_spec.js @@ -76,7 +76,7 @@ describe('Markdown field header component', () => { }); it('blurs preview link after click', done => { - const link = vm.$el.querySelector('li:nth-child(2) a'); + const link = vm.$el.querySelector('li:nth-child(2) button'); spyOn(HTMLElement.prototype, 'blur'); link.click(); |