Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
2bf3846a
Commit
2bf3846a
authored
Apr 11, 2018
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add matcher for emoji
parent
c39e3f22
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
spec/features/admin/admin_broadcast_messages_spec.rb
spec/features/admin/admin_broadcast_messages_spec.rb
+1
-1
spec/features/groups/show_spec.rb
spec/features/groups/show_spec.rb
+1
-1
spec/features/projects/awards/user_interacts_with_awards_in_issue_spec.rb
...ojects/awards/user_interacts_with_awards_in_issue_spec.rb
+3
-3
spec/support/matchers/have_emoji.rb
spec/support/matchers/have_emoji.rb
+5
-0
No files found.
spec/features/admin/admin_broadcast_messages_spec.rb
View file @
2bf3846a
...
...
@@ -45,7 +45,7 @@ feature 'Admin Broadcast Messages' do
page
.
within
(
'.broadcast-message-preview'
)
do
expect
(
page
).
to
have_selector
(
'strong'
,
text:
'Markdown'
)
expect
(
page
).
to
have_
selector
(
'gl-emoji[data-name="tada"]
'
)
expect
(
page
).
to
have_
emoji
(
'tada
'
)
end
end
end
spec/features/groups/show_spec.rb
View file @
2bf3846a
...
...
@@ -98,7 +98,7 @@ feature 'Group show page' do
it
'shows the project info'
do
expect
(
page
).
to
have_content
(
project
.
title
)
expect
(
page
).
to
have_
selector
(
'gl-emoji[data-name="smile"]
'
)
expect
(
page
).
to
have_
emoji
(
'smile
'
)
end
end
end
spec/features/projects/awards/user_interacts_with_awards_in_issue_spec.rb
View file @
2bf3846a
...
...
@@ -99,7 +99,7 @@ describe 'User interacts with awards in an issue', :js do
click_button
(
'Comment'
)
end
expect
(
page
).
to
have_
selector
(
'gl-emoji[data-name="smile"]
'
)
expect
(
page
).
to
have_
emoji
(
'smile
'
)
end
context
'when a project is archived'
do
...
...
@@ -118,7 +118,7 @@ describe 'User interacts with awards in an issue', :js do
it
'shows the award on the note'
do
page
.
within
(
'.note-awards'
)
do
expect
(
page
).
to
have_
selector
(
'gl-emoji[data-name="100"]
'
)
expect
(
page
).
to
have_
emoji
(
'100
'
)
end
end
...
...
@@ -141,7 +141,7 @@ describe 'User interacts with awards in an issue', :js do
wait_for_requests
page
.
within
(
'.note-awards'
)
do
expect
(
page
).
to
have_
selector
(
'gl-emoji[data-name="8ball"]
'
)
expect
(
page
).
to
have_
emoji
(
'8ball
'
)
end
expect
(
note
.
reload
.
award_emoji
.
size
).
to
eq
(
2
)
end
...
...
spec/support/matchers/have_emoji.rb
0 → 100644
View file @
2bf3846a
RSpec
::
Matchers
.
define
:have_emoji
do
|
emoji_name
|
match
do
|
actual
|
expect
(
actual
).
to
have_selector
(
"gl-emoji[data-name='
#{
emoji_name
}
']"
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment