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
c9788bd9
Commit
c9788bd9
authored
May 06, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove jasmine-fixture, use teaspoon fixtures
parent
73440b03
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
491 deletions
+64
-491
spec/javascripts/fixtures/issuable.html.haml
spec/javascripts/fixtures/issuable.html.haml
+2
-0
spec/javascripts/fixtures/issue_note.html.haml
spec/javascripts/fixtures/issue_note.html.haml
+12
-0
spec/javascripts/fixtures/issues_show.html.haml
spec/javascripts/fixtures/issues_show.html.haml
+13
-0
spec/javascripts/fixtures/merge_requests_show.html.haml
spec/javascripts/fixtures/merge_requests_show.html.haml
+13
-0
spec/javascripts/issue_spec.js.coffee
spec/javascripts/issue_spec.js.coffee
+6
-21
spec/javascripts/merge_request_spec.js.coffee
spec/javascripts/merge_request_spec.js.coffee
+8
-21
spec/javascripts/notes_spec.js.coffee
spec/javascripts/notes_spec.js.coffee
+7
-12
spec/javascripts/shortcuts_issuable_spec.js.coffee
spec/javascripts/shortcuts_issuable_spec.js.coffee
+3
-4
vendor/assets/javascripts/jasmine-fixture.js
vendor/assets/javascripts/jasmine-fixture.js
+0
-433
No files found.
spec/javascripts/fixtures/issuable.html.haml
0 → 100644
View file @
c9788bd9
%form
.js-main-target-form
%textarea
#note_note
spec/javascripts/fixtures/issue_note.html.haml
0 → 100644
View file @
c9788bd9
%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_show.html.haml
0 → 100644
View file @
c9788bd9
%a
.btn-close
.issue-details
.description.js-task-list-container
.wiki
%ul
.task-list
%li
.task-list-item
%input
.task-list-item-checkbox
{
type:
'checkbox'
}
Task List Item
%textarea
.js-task-list-field
\- [ ] Task List Item
%form
.js-issue-update
{
action:
'/foo'
}
spec/javascripts/fixtures/merge_requests_show.html.haml
0 → 100644
View file @
c9788bd9
%a
.btn-close
.merge-request-details
.description.js-task-list-container
.wiki
%ul
.task-list
%li
.task-list-item
%input
.task-list-item-checkbox
{
type:
'checkbox'
}
Task List Item
%textarea
.js-task-list-field
\- [ ] Task List Item
%form
.js-merge-request-update
{
action:
'/foo'
}
spec/javascripts/issue_spec.js.coffee
View file @
c9788bd9
#= require jquery
#= require jasmine-fixture
#= require issue
describe
'Issue'
,
->
describe
'task lists'
,
->
selectors
=
{
container
:
'.issue-details .description.js-task-list-container'
item
:
'.wiki ul.task-list li.task-list-item input.task-list-item-checkbox[type=checkbox] {Task List Item}'
textarea
:
'.wiki textarea.js-task-list-field{- [ ] Task List Item}'
form
:
'form.js-issue-update[action="/foo"]'
close
:
'a.btn-close'
}
fixture
.
preload
(
'issues_show.html'
)
beforeEach
->
$container
=
affix
(
selectors
.
container
)
# # These two elements are siblings inside the container
$container
.
find
(
'.js-task-list-container'
).
append
(
affix
(
selectors
.
item
))
$container
.
find
(
'.js-task-list-container'
).
append
(
affix
(
selectors
.
textarea
))
# Task lists don't get initialized unless this button exists. Not ideal.
$container
.
append
(
affix
(
selectors
.
close
))
# This form is used to get the `update` URL. Not ideal.
$container
.
append
(
affix
(
selectors
.
form
))
fixture
.
load
(
'issues_show.html'
)
@
issue
=
new
Issue
()
it
'modifies the Markdown field'
,
->
$
(
'input[type=checkbox]'
).
attr
(
'checked'
,
true
).
trigger
(
'change'
)
expect
(
$
(
'.js-task-list-field'
).
val
()).
toBe
(
'- [x] Task List Item'
)
it
'submits an ajax request on tasklist:changed'
,
->
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
req
)
->
expect
(
req
.
type
).
toBe
(
'PATCH'
)
...
...
spec/javascripts/merge_request_spec.js.coffee
View file @
c9788bd9
#= require jquery
#= require jasmine-fixture
#= require merge_request
window
.
disableButtonIfEmptyField
=
->
null
describe
'MergeRequest'
,
->
describe
'task lists'
,
->
selectors
=
{
container
:
'.merge-request-details .description.js-task-list-container'
item
:
'.wiki ul.task-list li.task-list-item input.task-list-item-checkbox[type=checkbox] {Task List Item}'
textarea
:
'.wiki textarea.js-task-list-field{- [ ] Task List Item}'
form
:
'form.js-merge-request-update[action="/foo"]'
close
:
'a.btn-close'
}
fixture
.
preload
(
'merge_requests_show.html'
)
beforeEach
->
$container
=
affix
(
selectors
.
container
)
# # These two elements are siblings inside the container
$container
.
find
(
'.js-task-list-container'
).
append
(
affix
(
selectors
.
item
))
$container
.
find
(
'.js-task-list-container'
).
append
(
affix
(
selectors
.
textarea
))
# Task lists don't get initialized unless this button exists. Not ideal.
$container
.
append
(
affix
(
selectors
.
close
))
# This form is used to get the `update` URL. Not ideal.
$container
.
append
(
affix
(
selectors
.
form
))
fixture
.
load
(
'merge_requests_show.html'
)
@
merge
=
new
MergeRequest
({})
it
'modifies the Markdown field'
,
->
$
(
'input[type=checkbox]'
).
attr
(
'checked'
,
true
).
trigger
(
'change'
)
expect
(
$
(
'.js-task-list-field'
).
val
()).
toBe
(
'- [x] Task List Item'
)
it
'submits an ajax request on tasklist:changed'
,
->
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
req
)
->
expect
(
req
.
type
).
toBe
(
'PATCH'
)
...
...
spec/javascripts/notes_spec.js.coffee
View file @
c9788bd9
#= require jquery
#= require jasmine-fixture
#= require notes
window
.
gon
=
{}
...
...
@@ -7,21 +5,18 @@ window.disableButtonIfEmptyField = -> null
describe
'Notes'
,
->
describe
'task lists'
,
->
selectors
=
{
container
:
'li.note .js-task-list-container'
item
:
'.note-text ul.task-list li.task-list-item input.task-list-item-checkbox[type=checkbox] {Task List Item}'
textarea
:
'.note-edit-form form textarea.js-task-list-field{- [ ] Task List Item}'
}
fixture
.
preload
(
'issue_note.html'
)
beforeEach
->
$container
=
affix
(
selectors
.
container
)
# These two elements are siblings inside the container
$container
.
find
(
'.js-task-list-container'
).
append
(
affix
(
selectors
.
item
))
$container
.
find
(
'.js-task-list-container'
).
append
(
affix
(
selectors
.
textarea
))
fixture
.
load
(
'issue_note.html'
)
$
(
'form'
).
on
'submit'
,
(
e
)
->
e
.
preventDefault
()
@
notes
=
new
Notes
()
it
'modifies the Markdown field'
,
->
$
(
'input[type=checkbox]'
).
attr
(
'checked'
,
true
).
trigger
(
'change'
)
expect
(
$
(
'.js-task-list-field'
).
val
()).
toBe
(
'- [x] Task List Item'
)
it
'submits the form on tasklist:changed'
,
->
submitted
=
false
$
(
'form'
).
on
'submit'
,
(
e
)
->
submitted
=
true
;
e
.
preventDefault
()
...
...
spec/javascripts/shortcuts_issuable_spec.js.coffee
View file @
c9788bd9
#= require jquery
#= require jasmine-fixture
#= require shortcuts_issuable
describe
'ShortcutsIssuable'
,
->
fixture
.
preload
(
'issuable.html'
)
beforeEach
->
fixture
.
load
(
'issuable.html'
)
@
shortcut
=
new
ShortcutsIssuable
()
describe
'#replyWithSelectedText'
,
->
...
...
@@ -14,7 +14,6 @@ describe 'ShortcutsIssuable', ->
beforeEach
->
@
selector
=
'form.js-main-target-form textarea#note_note'
affix
(
@
selector
)
describe
'with empty selection'
,
->
it
'does nothing'
,
->
...
...
vendor/assets/javascripts/jasmine-fixture.js
deleted
100755 → 0
View file @
73440b03
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