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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
1bb9aeb5
Commit
1bb9aeb5
authored
May 24, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs. Fix note form reset after submit
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
7c6a58a7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
37 deletions
+3
-37
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+2
-3
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+1
-1
spec/features/security/project/internal_access_spec.rb
spec/features/security/project/internal_access_spec.rb
+0
-11
spec/features/security/project/private_access_spec.rb
spec/features/security/project/private_access_spec.rb
+0
-11
spec/features/security/project/public_access_spec.rb
spec/features/security/project/public_access_spec.rb
+0
-11
No files found.
app/assets/javascripts/notes.js.coffee
View file @
1bb9aeb5
...
...
@@ -203,8 +203,7 @@ class Notes
form
.
find
(
".js-errors"
).
remove
()
# reset text and preview
previewContainer
=
form
.
find
(
".note-edit-and-preview"
)
previewContainer
.
removeClass
"on"
if
previewContainer
.
is
(
".on"
)
form
.
find
(
".js-note-write-button"
).
click
()
form
.
find
(
".js-note-text"
).
val
(
""
).
trigger
"input"
###
...
...
@@ -254,7 +253,7 @@ class Notes
form
.
removeClass
"js-new-note-form"
# setup preview buttons
form
.
find
(
".js-note-
edit
-button, .js-note-preview-button"
).
tooltip
placement
:
"left"
form
.
find
(
".js-note-
write
-button, .js-note-preview-button"
).
tooltip
placement
:
"left"
previewButton
=
form
.
find
(
".js-note-preview-button"
)
form
.
find
(
".js-note-text"
).
on
"input"
,
->
if
$
(
this
).
val
().
trim
()
isnt
""
...
...
spec/features/notes_on_merge_requests_spec.rb
View file @
1bb9aeb5
...
...
@@ -44,7 +44,7 @@ describe "On a merge request", js: true, feature: true do
it
'should have text and visible edit button'
do
within
(
".js-main-target-form"
)
{
should
have_css
(
".js-note-preview"
,
text:
"This is awesome"
,
visible:
true
)
}
within
(
".js-main-target-form"
)
{
should
have_css
(
".js-note-preview-button"
,
visible:
false
)
}
within
(
".js-main-target-form"
)
{
should
have_css
(
".js-note-
edit
-button"
,
visible:
true
)
}
within
(
".js-main-target-form"
)
{
should
have_css
(
".js-note-
write
-button"
,
visible:
true
)
}
end
end
end
...
...
spec/features/security/project/internal_access_spec.rb
View file @
1bb9aeb5
...
...
@@ -190,17 +190,6 @@ describe "Internal Project Access", feature: true do
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /:project_path/branches/recent"
do
subject
{
recent_project_branches_path
(
project
)
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_allowed_for
guest
}
it
{
should
be_allowed_for
:user
}
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /:project_path/branches"
do
subject
{
project_branches_path
(
project
)
}
...
...
spec/features/security/project/private_access_spec.rb
View file @
1bb9aeb5
...
...
@@ -168,17 +168,6 @@ describe "Private Project Access", feature: true do
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /:project_path/branches/recent"
do
subject
{
recent_project_branches_path
(
project
)
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_denied_for
guest
}
it
{
should
be_denied_for
:user
}
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /:project_path/branches"
do
subject
{
project_branches_path
(
project
)
}
...
...
spec/features/security/project/public_access_spec.rb
View file @
1bb9aeb5
...
...
@@ -195,17 +195,6 @@ describe "Public Project Access", feature: true do
it
{
should
be_denied_for
:visitor
}
end
describe
"GET /:project_path/branches/recent"
do
subject
{
recent_project_branches_path
(
project
)
}
it
{
should
be_allowed_for
master
}
it
{
should
be_allowed_for
reporter
}
it
{
should
be_allowed_for
:admin
}
it
{
should
be_allowed_for
guest
}
it
{
should
be_allowed_for
:user
}
it
{
should
be_allowed_for
:visitor
}
end
describe
"GET /:project_path/branches"
do
subject
{
project_branches_path
(
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