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
c4244ba4
Commit
c4244ba4
authored
Nov 22, 2016
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace static fixture for notes_spec (!7683)
parent
8146ad81
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
45 deletions
+21
-45
comments-fixture.yml
changelogs/unreleased/comments-fixture.yml
+4
-0
comments.html.haml
spec/javascripts/fixtures/comments.html.haml
+0
-22
issue_note.html.haml
spec/javascripts/fixtures/issue_note.html.haml
+0
-12
issues.rb
spec/javascripts/fixtures/issues.rb
+6
-1
notes_spec.js
spec/javascripts/notes_spec.js
+11
-10
No files found.
changelogs/unreleased/comments-fixture.yml
0 → 100644
View file @
c4244ba4
---
title
:
Replace static fixture for notes_spec
merge_request
:
7683
author
:
winniehell
spec/javascripts/fixtures/comments.html.haml
deleted
100644 → 0
View file @
8146ad81
.flash-container.timeline-content
.timeline-icon.hidden-xs.hidden-sm
%a
.author_link
%img
.timeline-content.timeline-content-form
%form
.new-note.js-quick-submit.common-note-form.gfm-form.js-main-target-form
.md-area
.md-header
.md-write-holder
.zen-backdrop.div-dropzone-wrapper
.div-dropzone-wrapper
.div-dropzone.dz-clickable
%textarea
.note-textarea.js-note-text.js-gfm-input.js-autosize.markdown-area
.note-form-actions.clearfix
%input
.btn.btn-nr.btn-create.append-right-10.comment-btn.js-comment-button
{
type:
'submit'
}
%a
.btn.btn-nr.btn-reopen.btn-comment.js-note-target-reopen
Reopen issue
%a
.btn.btn-nr.btn-close.btn-comment.js-note-target-close
Close issue
%a
.btn.btn-cancel.js-note-discard
Discard draft
\ No newline at end of file
spec/javascripts/fixtures/issue_note.html.haml
deleted
100644 → 0
View file @
8146ad81
%ul
%li
.note
.js-task-list-container
.note-text
%ul
.task-list
%li
.task-list-item
%input
.task-list-item-checkbox
{
type:
'checkbox'
}
Task List Item
.note-edit-form
%form
%textarea
.js-task-list-field
\- [ ] Task List Item
spec/javascripts/fixtures/issues.rb
View file @
c4244ba4
...
...
@@ -26,8 +26,13 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller
end
it
'issues/issue-with-task-list.html.raw'
do
|
example
|
issue
=
create
(
:issue
,
project:
project
,
description:
'- [ ] Task List Item'
)
render_issue
(
example
.
description
,
issue
)
end
it
'issues/issue_with_comment.html.raw'
do
|
example
|
issue
=
create
(
:issue
,
project:
project
)
issue
.
update
(
description:
'- [ ] Task List Item'
)
create
(
:note
,
project:
project
,
noteable:
issue
,
note:
'- [ ] Task List Item'
).
save
render_issue
(
example
.
description
,
issue
)
end
...
...
spec/javascripts/notes_spec.js
View file @
c4244ba4
...
...
@@ -6,17 +6,21 @@
(
function
()
{
window
.
gon
||
(
window
.
gon
=
{});
window
.
disableButtonIfEmptyField
=
function
()
{
return
null
;
};
window
.
gl
=
window
.
gl
||
{};
gl
.
utils
=
gl
.
utils
||
{};
describe
(
'Notes'
,
function
()
{
describe
(
'task lists'
,
function
()
{
fixture
.
preload
(
'issue_note.html'
);
var
commentsTemplate
=
'issues/issue_with_comment.raw'
;
fixture
.
preload
(
commentsTemplate
);
beforeEach
(
function
()
{
fixture
.
load
(
commentsTemplate
);
gl
.
utils
.
disableButtonIfEmptyField
=
_
.
noop
;
window
.
project_uploads_path
=
'http://test.host/uploads'
;
});
describe
(
'task lists'
,
function
()
{
beforeEach
(
function
()
{
fixture
.
load
(
'issue_note.html'
);
$
(
'form'
).
on
(
'submit'
,
function
(
e
)
{
e
.
preventDefault
();
});
...
...
@@ -41,12 +45,9 @@
});
describe
(
'comments'
,
function
()
{
var
commentsTemplate
=
'comments.html'
;
var
textarea
=
'.js-note-text'
;
fixture
.
preload
(
commentsTemplate
);
beforeEach
(
function
()
{
fixture
.
load
(
commentsTemplate
);
this
.
notes
=
new
Notes
();
this
.
autoSizeSpy
=
spyOnEvent
(
$
(
textarea
),
'autosize:update'
);
...
...
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