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
Léo-Paul Géneau
gitlab-ce
Commits
18b42911
Commit
18b42911
authored
Apr 13, 2016
by
Alfredo Sumaran
Committed by
Jacob Schatz
Apr 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for autocomplete on a Commit
parent
a53e912b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
spec/features/participants_autocomplete_spec.rb
spec/features/participants_autocomplete_spec.rb
+22
-0
No files found.
spec/features/participants_autocomplete_spec.rb
View file @
18b42911
...
@@ -7,6 +7,7 @@ feature 'Member autocomplete', feature: true do
...
@@ -7,6 +7,7 @@ feature 'Member autocomplete', feature: true do
let
(
:author
)
{
create
(
:user
)
}
let
(
:author
)
{
create
(
:user
)
}
before
do
before
do
allow_any_instance_of
(
Commit
).
to
receive
(
:author
).
and_return
(
author
)
login_as
user
login_as
user
end
end
...
@@ -58,6 +59,23 @@ feature 'Member autocomplete', feature: true do
...
@@ -58,6 +59,23 @@ feature 'Member autocomplete', feature: true do
end
end
end
end
context
'adding a new note on a Commit '
,
js:
true
do
let
(
:commit
)
{
project
.
commit
}
before
do
allow
(
commit
).
to
receive
(
:author
).
and_return
(
author
)
create
(
:note_on_commit
,
author:
participant
,
project:
project
,
commit_id:
project
.
repository
.
commit
.
id
,
note:
'No More Parties in LA'
)
visit_commit
(
project
,
commit
)
end
context
'when typing @'
do
include_examples
"open suggestions"
before
do
open_member_suggestions
end
end
end
def
open_member_suggestions
def
open_member_suggestions
sleep
1
sleep
1
page
.
within
(
'.new-note'
)
do
page
.
within
(
'.new-note'
)
do
...
@@ -73,4 +91,8 @@ feature 'Member autocomplete', feature: true do
...
@@ -73,4 +91,8 @@ feature 'Member autocomplete', feature: true do
def
visit_merge_request
(
project
,
merge
)
def
visit_merge_request
(
project
,
merge
)
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge
)
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge
)
end
end
def
visit_commit
(
project
,
commit
)
visit
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
)
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