Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-03 11:30:30 +0300
committerGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-03 15:39:00 +0300
commit2b577551177c631d229eca6844520e29478085f8 (patch)
treef427553ed5fc427fc599e7c5cc36de280d342d46 /features/steps/shared
parent554f4684622564fe496acb25cacb2daed3b9f3ac (diff)
Add feature test for emoji-only diff notes
This specs is related to bug described in #3734 (award-emojis).
Diffstat (limited to 'features/steps/shared')
-rw-r--r--features/steps/shared/diff_note.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index 72621911a37..dd466cde28d 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -87,6 +87,17 @@ module SharedDiffNote
end
end
+ step 'I write a diff comment like ":smile:"' do
+ page.within(diff_file_selector) do
+ click_diff_line(sample_commit.line_code)
+
+ page.within("form[rel$='#{sample_commit.line_code}']") do
+ fill_in 'note[note]', with: ':smile:'
+ click_button('Add Comment')
+ end
+ end
+ end
+
step 'I submit the diff comment' do
page.within(diff_file_selector) do
click_button("Add Comment")
@@ -197,6 +208,12 @@ module SharedDiffNote
end
end
+ step 'I should see a diff comment with an emoji image' do
+ page.within("#{diff_file_selector} .note") do
+ expect(page).to have_xpath("//img[@alt=':smile:']")
+ end
+ end
+
step 'I click side-by-side diff button' do
find('#parallel-diff-btn').trigger('click')
end