BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a33aacd5
Unverified
Commit
a33aacd5
authored
Apr 06, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further fixes for feature spec
parent
1065ba40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
25 deletions
+30
-25
discussion_comments_spec.rb
spec/features/discussion_comments_spec.rb
+30
-25
No files found.
spec/features/discussion_comments_spec.rb
View file @
a33aacd5
...
...
@@ -12,6 +12,34 @@ shared_examples 'discussion comments' do |resource_name|
expect
(
page
).
to
have_selector
toggle_selector
end
it
'"Comment" will post a comment'
do
find
(
"
#{
form_selector
}
.note-textarea"
).
send_keys
(
'a'
)
find
(
submit_selector
).
click
find
(
'.timeline .timeline-entry'
,
match: :first
)
new_comment
=
all
(
'.timeline .timeline-entry'
).
last
expect
(
new_comment
).
to
have_content
'a'
expect
(
new_comment
).
not_to
have_selector
'.discussion'
end
if
resource_name
=~
/(issue|merge request)/
it
"'Comment & close
#{
resource_name
}
' will post a comment and close the
#{
resource_name
}
"
do
find
(
"
#{
form_selector
}
.note-textarea"
).
send_keys
(
'a'
)
find
(
close_selector
).
click
find
(
'.timeline .timeline-entry'
,
match: :first
)
entries
=
all
(
'.timeline .timeline-entry'
)
close_note
=
entries
.
last
new_comment
=
entries
[
-
2
]
expect
(
close_note
).
to
have_content
'closed'
expect
(
new_comment
).
not_to
have_selector
'.discussion'
end
end
describe
'when the toggle is clicked'
do
before
do
find
(
"
#{
form_selector
}
.note-textarea"
).
send_keys
(
'a'
)
...
...
@@ -50,30 +78,6 @@ shared_examples 'discussion comments' do |resource_name|
expect
(
items
.
last
[
'class'
]).
not_to
match
'droplab-item-selected'
end
it
'"Comment" will post a comment'
do
find
(
submit_selector
).
click
find
(
'.timeline .timeline-entry'
,
match: :first
)
new_comment
=
all
(
'.timeline .timeline-entry'
).
last
expect
(
new_comment
).
to
have_content
'a'
expect
(
new_comment
).
not_to
have_selector
'.discussion'
end
if
resource_name
=~
/(issue|merge request)/
it
"Comment & close' will post a comment and close the
#{
resource_name
}
"
do
find
(
close_selector
).
click
find
(
'.timeline .timeline-entry'
,
match: :first
)
entries
=
all
(
'.timeline .timeline-entry'
)
close_note
=
entries
.
last
new_comment
=
entries
[
-
2
]
expect
(
close_note
).
to
have_content
'closed'
expect
(
new_comment
).
not_to
have_selector
'.discussion'
end
end
it
'closes the menu when clicking the toggle'
do
find
(
toggle_selector
).
click
...
...
@@ -121,7 +125,7 @@ shared_examples 'discussion comments' do |resource_name|
end
if
resource_name
=~
/(issue|merge request)/
it
"'Start discussion & close' will post a discussion and close the
#{
resource_name
}
"
do
it
"'Start discussion & close
#{
resource_name
}
' will post a discussion and close the
#{
resource_name
}
"
do
find
(
close_selector
).
click
find
(
'.timeline .timeline-entry'
,
match: :first
)
...
...
@@ -204,6 +208,7 @@ end
describe
'Discussion Comments'
,
:feature
,
:js
do
include
RepoHelpers
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
...
...
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