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
a740f0bc
Commit
a740f0bc
authored
8 years ago
by
Alfredo Sumaran
Committed by
Jacob Schatz
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for autocomplete on a Issue
parent
42848f26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
spec/features/participants_autocomplete_spec.rb
spec/features/participants_autocomplete_spec.rb
+53
-0
No files found.
spec/features/participants_autocomplete_spec.rb
0 → 100644
View file @
a740f0bc
require
'spec_helper'
feature
'Member autocomplete'
,
feature:
true
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:participant
)
{
create
(
:user
)
}
let
(
:author
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
author:
author
,
project:
project
)
}
before
do
login_as
user
end
describe
'On a Issue'
,
js:
true
do
before
do
create
(
:note
,
note:
'ultralight beam'
,
noteable:
issue
,
author:
participant
)
visit_issue
(
project
,
issue
)
end
describe
'adding a new note'
do
describe
'when typing @'
do
before
do
sleep
1
page
.
within
(
'.new-note'
)
do
sleep
1
find
(
'#note_note'
).
native
.
send_keys
(
'@'
)
end
end
it
'suggestions are displayed'
do
expect
(
page
).
to
have_selector
(
'.atwho-view'
,
visible:
true
)
end
it
'author is a suggestion'
do
page
.
within
(
'.atwho-view'
,
visible:
true
)
do
expect
(
page
).
to
have_content
(
author
.
username
)
end
end
it
'participant is a suggestion'
do
page
.
within
(
'.atwho-view'
,
visible:
true
)
do
expect
(
page
).
to
have_content
(
participant
.
username
)
end
end
end
end
end
def
visit_issue
(
project
,
issue
)
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
end
end
This diff is collapsed.
Click to expand it.
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