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
a7e76a61
Commit
a7e76a61
authored
Mar 01, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated award emoji tests
parent
5e145918
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
app/assets/javascripts/awards_handler.coffee
app/assets/javascripts/awards_handler.coffee
+1
-1
features/steps/project/issues/award_emoji.rb
features/steps/project/issues/award_emoji.rb
+13
-13
No files found.
app/assets/javascripts/awards_handler.coffee
View file @
a7e76a61
...
@@ -82,7 +82,7 @@ class @AwardsHandler
...
@@ -82,7 +82,7 @@ class @AwardsHandler
award_block
=
@
findEmojiIcon
(
emoji
).
parent
()
award_block
=
@
findEmojiIcon
(
emoji
).
parent
()
authors
=
award_block
.
attr
(
"data-original-title"
).
split
(
", "
)
authors
=
award_block
.
attr
(
"data-original-title"
).
split
(
", "
)
authors
.
splice
(
authors
.
indexOf
(
"me"
),
1
)
authors
.
splice
(
authors
.
indexOf
(
"me"
),
1
)
award_block
.
closest
(
".
award
"
).
attr
(
"data-original-title"
,
authors
.
join
(
", "
))
award_block
.
closest
(
".
js-emoji-btn
"
).
attr
(
"data-original-title"
,
authors
.
join
(
", "
))
@
resetTooltip
(
award_block
)
@
resetTooltip
(
award_block
)
addMeToAuthorList
:
(
emoji
)
->
addMeToAuthorList
:
(
emoji
)
->
...
...
features/steps/project/issues/award_emoji.rb
View file @
a7e76a61
...
@@ -10,7 +10,7 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
...
@@ -10,7 +10,7 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
step
'I click the thumbsup award Emoji'
do
step
'I click the thumbsup award Emoji'
do
page
.
within
'.awards'
do
page
.
within
'.awards'
do
thumbsup
=
page
.
fi
nd
(
'.award .emoji-1F44D
'
)
thumbsup
=
page
.
fi
rst
(
'.award-control
'
)
thumbsup
.
click
thumbsup
.
click
thumbsup
.
hover
thumbsup
.
hover
sleep
0.3
sleep
0.3
...
@@ -18,23 +18,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
...
@@ -18,23 +18,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
end
end
step
'I click to emoji-picker'
do
step
'I click to emoji-picker'
do
page
.
within
'.awards
-controls
'
do
page
.
within
'.awards'
do
page
.
find
(
'.add-award'
).
click
page
.
find
(
'.
js-
add-award'
).
click
end
end
end
end
step
'I click to emoji in the picker'
do
step
'I click to emoji in the picker'
do
page
.
within
'.emoji-menu-content'
do
page
.
within
'.emoji-menu-content'
do
page
.
first
(
'.
emoji-ico
n'
).
click
page
.
first
(
'.
js-emoji-bt
n'
).
click
end
end
end
end
step
'I can remove it by clicking to icon'
do
step
'I can remove it by clicking to icon'
do
page
.
within
'.awards'
do
page
.
within
'.awards'
do
expect
do
expect
do
page
.
find
(
'.
award
.active'
).
click
page
.
find
(
'.
js-emoji-btn
.active'
).
click
sleep
0.3
sleep
0.3
end
.
to
change
{
page
.
all
(
".award"
).
size
}.
from
(
3
).
to
(
2
)
end
.
to
change
{
page
.
all
(
".award
-control.js-emoji-btn
"
).
size
}.
from
(
3
).
to
(
2
)
end
end
end
end
...
@@ -49,23 +49,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
...
@@ -49,23 +49,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
sleep
0.2
sleep
0.2
page
.
within
'.awards'
do
page
.
within
'.awards'
do
expect
(
page
).
to
have_selector
'.
award
'
expect
(
page
).
to
have_selector
'.
js-emoji-btn
'
expect
(
page
.
find
(
'.
award.active .
counter'
)).
to
have_content
'1'
expect
(
page
.
find
(
'.
js-emoji-btn.active .js-
counter'
)).
to
have_content
'1'
expect
(
page
.
find
(
'.
award
.active'
)[
'data-original-title'
]).
to
eq
(
'me'
)
expect
(
page
.
find
(
'.
js-emoji-btn
.active'
)[
'data-original-title'
]).
to
eq
(
'me'
)
end
end
end
end
step
'I have no awards added'
do
step
'I have no awards added'
do
page
.
within
'.awards'
do
page
.
within
'.awards'
do
expect
(
page
).
to
have_selector
'.award'
expect
(
page
).
to
have_selector
'.award
-control.js-emoji-btn
'
expect
(
page
.
all
(
'.award'
).
size
).
to
eq
(
2
)
expect
(
page
.
all
(
'.award
-control.js-emoji-btn
'
).
size
).
to
eq
(
2
)
# Check tooltip data
# Check tooltip data
page
.
all
(
'.award'
).
each
do
|
element
|
page
.
all
(
'.award
-control.js-emoji-btn
'
).
each
do
|
element
|
expect
(
element
[
'title'
]).
to
eq
(
""
)
expect
(
element
[
'title'
]).
to
eq
(
""
)
end
end
page
.
all
(
'.award
.
counter'
).
each
do
|
element
|
page
.
all
(
'.award
-control .js-
counter'
).
each
do
|
element
|
expect
(
element
).
to
have_content
'0'
expect
(
element
).
to
have_content
'0'
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