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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
4676ba1f
Commit
4676ba1f
authored
Dec 02, 2015
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for award-emoji being added as regular comment
parent
a527f5c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
features/project/issues/award_emoji.feature
features/project/issues/award_emoji.feature
+5
-1
features/steps/project/issues/award_emoji.rb
features/steps/project/issues/award_emoji.rb
+19
-12
No files found.
features/project/issues/award_emoji.feature
View file @
4676ba1f
...
...
@@ -11,4 +11,8 @@ Feature: Award Emoji
And
I click to emoji in the picker
Then
I have award added
And
I can remove it by clicking to icon
\ No newline at end of file
@javascript
Scenario
:
I
add award emoji using regular comment
Given
I leave comment with a single emoji
Then
I have award added
features/steps/project/issues/award_emoji.rb
View file @
4676ba1f
...
...
@@ -9,33 +9,40 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
end
step
'I click to emoji-picker'
do
page
.
within
".awards-controls"
do
page
.
find
(
".add-award"
).
click
page
.
within
'.awards-controls'
do
page
.
find
(
'.add-award'
).
click
end
end
step
'I click to emoji in the picker'
do
page
.
within
".awards-menu"
do
page
.
first
(
"img"
).
click
page
.
within
'.awards-menu'
do
page
.
first
(
'img'
).
click
end
end
step
'I can remove it by clicking to icon'
do
page
.
within
".awards"
do
page
.
first
(
".award"
).
click
expect
(
page
).
to_not
have_selector
".award"
page
.
within
'.awards'
do
page
.
first
(
'.award'
).
click
expect
(
page
).
to_not
have_selector
'.award'
end
end
step
'I have award added'
do
page
.
within
".awards"
do
expect
(
page
).
to
have_selector
".award"
expect
(
page
.
find
(
".award .counter"
)).
to
have_content
"1"
page
.
within
'.awards'
do
expect
(
page
).
to
have_selector
'.award'
expect
(
page
.
find
(
'.award .counter'
)).
to
have_content
'1'
end
end
step
'project "Shop" has issue "Bugfix"'
do
@project
=
Project
.
find_by
(
name:
"Shop"
)
@issue
=
create
(
:issue
,
title:
"Bugfix"
,
project:
project
)
@project
=
Project
.
find_by
(
name:
'Shop'
)
@issue
=
create
(
:issue
,
title:
'Bugfix'
,
project:
project
)
end
step
'I leave comment with a single emoji'
do
page
.
within
(
'.js-main-target-form'
)
do
fill_in
'note[note]'
,
with:
':smile:'
click_button
'Add Comment'
end
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