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
iv
gitlab-ce
Commits
46d35cdb
Commit
46d35cdb
authored
Feb 13, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spinach tests for award emoji
parent
7ffcc5a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
features/project/issues/award_emoji.feature
features/project/issues/award_emoji.feature
+10
-1
features/steps/project/issues/award_emoji.rb
features/steps/project/issues/award_emoji.rb
+26
-0
No files found.
features/project/issues/award_emoji.feature
View file @
46d35cdb
...
@@ -7,7 +7,16 @@ Feature: Award Emoji
...
@@ -7,7 +7,16 @@ Feature: Award Emoji
And
I visit
"Bugfix"
issue page
And
I visit
"Bugfix"
issue page
@javascript
@javascript
Scenario
:
I
add and remove award in the issue
Scenario
:
I
repeatedly add and remove thumbsup award in the issue
Given
I click the thumbsup award Emoji
Then
I have award added
Given
I click the thumbsup award Emoji
Then
I have no awards added
Given
I click the thumbsup award Emoji
Then
I have award added
@javascript
Scenario
:
I
add and remove custom award in the issue
Given
I click to emoji-picker
Given
I click to emoji-picker
Then
The search field is focused
Then
The search field is focused
And
I click to emoji in the picker
And
I click to emoji in the picker
...
...
features/steps/project/issues/award_emoji.rb
View file @
46d35cdb
...
@@ -8,6 +8,15 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
...
@@ -8,6 +8,15 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
visit
namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
visit
namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
end
end
step
'I click the thumbsup award Emoji'
do
page
.
within
'.awards'
do
thumbsup
=
page
.
find
(
'.award .emoji-1F44D'
)
thumbsup
.
click
thumbsup
.
hover
sleep
0.3
end
end
step
'I click to emoji-picker'
do
step
'I click to emoji-picker'
do
page
.
within
'.awards-controls'
do
page
.
within
'.awards-controls'
do
page
.
find
(
'.add-award'
).
click
page
.
find
(
'.add-award'
).
click
...
@@ -40,6 +49,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
...
@@ -40,6 +49,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
page
.
within
'.awards'
do
page
.
within
'.awards'
do
expect
(
page
).
to
have_selector
'.award'
expect
(
page
).
to
have_selector
'.award'
expect
(
page
.
find
(
'.award.active .counter'
)).
to
have_content
'1'
expect
(
page
.
find
(
'.award.active .counter'
)).
to
have_content
'1'
expect
(
page
.
find
(
'.award.active'
)[
'data-original-title'
]).
to
eq
(
'me'
)
end
end
step
'I have no awards added'
do
page
.
within
'.awards'
do
expect
(
page
).
to
have_selector
'.award'
expect
(
page
.
all
(
'.award'
).
size
).
to
eq
(
2
)
# Check tooltip data
page
.
all
(
'.award'
).
each
do
|
element
|
expect
(
element
[
'title'
]).
to
eq
(
""
)
end
page
.
all
(
'.award .counter'
).
each
do
|
element
|
expect
(
element
).
to
have_content
'0'
end
end
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