summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-03-24 19:10:57 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-03-24 21:19:34 -0500
commitf7d69a74a805f52fe10b42459ede587965ec1926 (patch)
treeddd8c826b03a74e944d5b04aa48fc2cfe3a0847a
parent34870e169d80654911101208bb062182bc40f106 (diff)
downloadgitlab-ce-f7d69a74a805f52fe10b42459ede587965ec1926.tar.gz
Fix up emoji tests that should have failed :/
Some discussion, https://gitlab.slack.com/archives/C0GQHHPGW/p1490398531185144 -> MR to fix failing emoji test: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10230
-rw-r--r--features/steps/project/issues/award_emoji.rb2
-rw-r--r--features/steps/shared/diff_note.rb4
-rw-r--r--features/steps/shared/markdown.rb2
-rw-r--r--features/steps/shared/note.rb2
-rw-r--r--spec/features/admin/admin_broadcast_messages_spec.rb2
5 files changed, 6 insertions, 6 deletions
diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb
index 1762d5bdf95..e55dc2913c3 100644
--- a/features/steps/project/issues/award_emoji.rb
+++ b/features/steps/project/issues/award_emoji.rb
@@ -45,7 +45,7 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
end
step 'I have new comment with emoji added' do
- expect(page).to have_selector ".emoji[title=':smile:']"
+ expect(page).to have_selector 'gl-emoji[data-name="smile"]'
end
step 'I have award added' do
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index 11fa85ed2fe..071aa2e3eff 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -196,7 +196,7 @@ module SharedDiffNote
step 'The diff comment preview tab should display rendered Markdown' do
page.within(diff_file_selector) do
find('.js-md-preview-button').click
- expect(find('.js-md-preview')).to have_css('img.emoji', visible: true)
+ expect(find('.js-md-preview')).to have_css('gl-emoji', visible: true)
end
end
@@ -210,7 +210,7 @@ module SharedDiffNote
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:']")
+ expect(page).to have_xpath("//gl-emoji[@data-name='smile']")
end
end
diff --git a/features/steps/shared/markdown.rb b/features/steps/shared/markdown.rb
index a036d9b884f..875d27d9383 100644
--- a/features/steps/shared/markdown.rb
+++ b/features/steps/shared/markdown.rb
@@ -40,7 +40,7 @@ module SharedMarkdown
step 'The Markdown preview tab should display rendered Markdown' do
page.within('.gfm-form') do
find('.js-md-preview-button').click
- expect(find('.js-md-preview')).to have_css('img.emoji', visible: true)
+ expect(find('.js-md-preview')).to have_css('gl-emoji', visible: true)
end
end
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
index 1870f6bc0c3..fd925e0d447 100644
--- a/features/steps/shared/note.rb
+++ b/features/steps/shared/note.rb
@@ -95,7 +95,7 @@ module SharedNote
step 'The comment preview tab should be display rendered Markdown' do
page.within(".js-main-target-form") do
find('.js-md-preview-button').click
- expect(find('.js-md-preview')).to have_css('img.emoji', visible: true)
+ expect(find('.js-md-preview')).to have_css('gl-emoji', visible: true)
end
end
diff --git a/spec/features/admin/admin_broadcast_messages_spec.rb b/spec/features/admin/admin_broadcast_messages_spec.rb
index bc957ec72e1..d6c63f66a9b 100644
--- a/spec/features/admin/admin_broadcast_messages_spec.rb
+++ b/spec/features/admin/admin_broadcast_messages_spec.rb
@@ -45,7 +45,7 @@ feature 'Admin Broadcast Messages', feature: true do
page.within('.broadcast-message-preview') do
expect(page).to have_selector('strong', text: 'Markdown')
- expect(page).to have_selector('img.emoji')
+ expect(page).to have_selector('gl-emoji[data-name="tada"]')
end
end
end