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
4b71ef59
Commit
4b71ef59
authored
Aug 31, 2020
by
Aishwarya Subramanian
Committed by
Rémy Coutable
Aug 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize factory creation in user view issues spec
parent
b86db507
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
spec/features/issues/user_views_issue_spec.rb
spec/features/issues/user_views_issue_spec.rb
+13
-13
No files found.
spec/features/issues/user_views_issue_spec.rb
View file @
4b71ef59
...
...
@@ -3,12 +3,16 @@
require
"spec_helper"
RSpec
.
describe
"User views issue"
do
let
(
:project
)
{
create
(
:project_empty_repo
,
:public
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
description:
"# Description header"
,
author:
user
)
}
let_it_be
(
:project
)
{
create
(
:project_empty_repo
,
:public
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
,
description:
"# Description header"
,
author:
user
)
}
let_it_be
(
:note
)
{
create
(
:note
,
noteable:
issue
,
project:
project
,
author:
user
)
}
before
do
before
_all
do
project
.
add_developer
(
user
)
end
before
do
sign_in
(
user
)
visit
(
project_issue_path
(
project
,
issue
))
...
...
@@ -37,24 +41,20 @@ RSpec.describe "User views issue" do
context
'when showing status of the author of the issue'
do
it_behaves_like
'showing user status'
do
let
(
:user_with_status
)
{
issue
.
autho
r
}
let
(
:user_with_status
)
{
use
r
}
end
end
context
'when showing status of a user who commented on an issue'
,
:js
do
let!
(
:note
)
{
create
(
:note
,
noteable:
issue
,
project:
project
,
author:
user_with_status
)
}
it_behaves_like
'showing user status'
do
let
(
:user_with_status
)
{
create
(
:user
)
}
let
(
:user_with_status
)
{
user
}
end
end
context
'when status message has an emoji'
,
:js
do
let
(
:message
)
{
'My status with an emoji'
}
let
(
:message_emoji
)
{
'basketball'
}
let!
(
:note
)
{
create
(
:note
,
noteable:
issue
,
project:
project
,
author:
user
)
}
let!
(
:status
)
{
create
(
:user_status
,
user:
user
,
emoji:
'smirk'
,
message:
"
#{
message
}
:
#{
message_emoji
}
:"
)
}
let_it_be
(
:message
)
{
'My status with an emoji'
}
let_it_be
(
:message_emoji
)
{
'basketball'
}
let_it_be
(
:status
)
{
create
(
:user_status
,
user:
user
,
emoji:
'smirk'
,
message:
"
#{
message
}
:
#{
message_emoji
}
:"
)
}
it
'correctly renders the emoji'
do
tooltip_span
=
page
.
first
(
".user-status-emoji[title^='
#{
message
}
']"
)
...
...
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