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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
91905ae3
Commit
91905ae3
authored
Apr 05, 2016
by
Arinde Eniola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write test to prevent reoccurence of issue
parent
b95c9217
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
spec/features/issues/award_emoji_spec.rb
spec/features/issues/award_emoji_spec.rb
+64
-0
No files found.
spec/features/issues/award_emoji_spec.rb
0 → 100644
View file @
91905ae3
require
'rails_helper'
describe
'Awards Emoji'
,
feature:
true
do
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:user
)
{
create
(
:user
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
describe
'Click award emoji from issue#show'
do
let!
(
:issue
)
do
create
(
:issue
,
author:
@user
,
assignee:
@user
,
project:
project
)
end
before
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
end
it
'should increment the thumbsdown emoji'
,
js:
true
do
find
(
'[data-emoji="thumbsdown"]'
).
click
sleep
2
expect
(
thumbsdown_emoji
).
to
have_text
(
"1"
)
end
context
'click the thumbsup emoji'
do
it
'should increment the thumbsup emoji'
,
js:
true
do
find
(
'[data-emoji="thumbsup"]'
).
click
sleep
2
expect
(
thumbsup_emoji
).
to
have_text
(
"1"
)
end
it
'should decrement the thumbsdown emoji'
,
js:
true
do
expect
(
thumbsdown_emoji
).
to
have_text
(
"0"
)
end
end
context
'click the thumbsdown emoji'
do
it
'should increment the thumbsdown emoji'
,
js:
true
do
find
(
'[data-emoji="thumbsdown"]'
).
click
sleep
2
expect
(
thumbsdown_emoji
).
to
have_text
(
"1"
)
end
it
'should decrement the thumbsup emoji'
,
js:
true
do
expect
(
thumbsup_emoji
).
to
have_text
(
"0"
)
end
end
end
def
thumbsup_emoji
page
.
all
(
'span.js-counter'
).
first
end
def
thumbsdown_emoji
page
.
all
(
'span.js-counter'
).
last
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