Commit 2929df3f authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Add feature test for emoji-only diff notes

This specs is related to bug described in #3734 (award-emojis).
parent 400090bad442
......@@ -14,6 +14,12 @@
Then I should see a diff comment saying "Typo, please fix"
@javascript
Scenario: I can add a diff comment with a single emoji
Given I open a diff comment form
And I write a diff comment like ":smile:"
Then I should see a diff comment with an emoji image
@javascript
Scenario: I get a temporary form for the first comment on a diff line
Given I open a diff comment form
Then I should see a temporary diff comment form
......
......@@ -87,6 +87,17 @@
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 @@
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
......
Supports Markdown
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