Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
f48298a5
Commit
f48298a5
authored
Dec 03, 2015
by
Sean Hammond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove $document global from tests
parent
99e96b4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
annotation-test.js
h/static/scripts/directive/test/annotation-test.js
+11
-4
No files found.
h/static/scripts/directive/test/annotation-test.js
View file @
f48298a5
...
...
@@ -15,6 +15,15 @@ function compileService() {
return
$compile
;
}
/** Return Angular's $document service. */
function
documentService
()
{
var
$document
;
inject
(
function
(
_$document_
)
{
$document
=
_$document_
;
});
return
$document
;
}
describe
(
'annotation.js'
,
function
()
{
describe
(
'extractDocumentMetadata()'
,
function
()
{
...
...
@@ -289,7 +298,6 @@ describe('annotation.js', function() {
});
describe
(
'AnnotationController'
,
function
()
{
var
$document
;
var
$element
;
var
$q
;
var
$rootScope
;
...
...
@@ -439,9 +447,8 @@ describe('annotation.js', function() {
beforeEach
(
inject
(
function
(
_$
document_
,
_$
q_
,
_$rootScope_
,
_$timeout_
,
function
(
_$q_
,
_$rootScope_
,
_$timeout_
,
_$window_
)
{
$document
=
_$document_
;
$window
=
_$window_
;
$q
=
_$q_
;
$timeout
=
_$timeout_
;
...
...
@@ -836,7 +843,7 @@ describe('annotation.js', function() {
dialog
.
find
(
'button'
).
click
();
isolateScope
.
$digest
();
assert
.
ok
(
dialog
.
hasClass
(
'open'
));
$document
.
click
();
documentService
()
.
click
();
assert
.
notOk
(
dialog
.
hasClass
(
'open'
));
});
});
...
...
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