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
fbed2909
Unverified
Commit
fbed2909
authored
Apr 11, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed prepend in favour of clean and appendChild
parent
897d8d54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
spinner.js
app/assets/javascripts/spinner.js
+2
-1
spinner_spec.js
spec/javascripts/spinner_spec.js
+7
-3
No files found.
app/assets/javascripts/spinner.js
View file @
fbed2909
...
...
@@ -6,7 +6,8 @@ class Spinner {
}
start
()
{
this
.
renderable
.
prepend
(
this
.
container
);
this
.
renderable
.
innerHTML
=
''
;
this
.
renderable
.
appendChild
(
this
.
container
);
}
stop
()
{
...
...
spec/javascripts/spinner_spec.js
View file @
fbed2909
...
...
@@ -31,7 +31,7 @@ describe('Spinner', () => {
describe
(
'start'
,
()
=>
{
beforeEach
(()
=>
{
renderable
=
jasmine
.
createSpyObj
(
'renderable'
,
[
'
prepen
d'
]);
renderable
=
jasmine
.
createSpyObj
(
'renderable'
,
[
'
appendChil
d'
]);
container
=
{};
spinner
=
{
...
...
@@ -42,8 +42,12 @@ describe('Spinner', () => {
Spinner
.
prototype
.
start
.
call
(
spinner
);
});
it
(
'should call .prepend'
,
()
=>
{
expect
(
renderable
.
prepend
).
toHaveBeenCalledWith
(
container
);
it
(
'should set .innerHTML to an empty string'
,
()
=>
{
expect
(
renderable
.
innerHTML
).
toEqual
(
''
);
});
it
(
'should call .appendChild'
,
()
=>
{
expect
(
renderable
.
appendChild
).
toHaveBeenCalledWith
(
container
);
});
});
...
...
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