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
2955e956
Commit
2955e956
authored
Jun 20, 2017
by
Winnie Hellmann
Committed by
Phil Hughes
Jun 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up Vue warnings in tests
parent
50d4050d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
2 deletions
+33
-2
spec/javascripts/deploy_keys/components/key_spec.js
spec/javascripts/deploy_keys/components/key_spec.js
+1
-0
spec/javascripts/deploy_keys/components/keys_panel_spec.js
spec/javascripts/deploy_keys/components/keys_panel_spec.js
+1
-0
spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js
.../filtered_search/filtered_search_dropdown_manager_spec.js
+4
-0
spec/javascripts/filtered_search/filtered_search_manager_spec.js
...vascripts/filtered_search/filtered_search_manager_spec.js
+2
-0
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+0
-1
spec/javascripts/test_bundle.js
spec/javascripts/test_bundle.js
+25
-1
No files found.
spec/javascripts/deploy_keys/components/key_spec.js
View file @
2955e956
...
@@ -14,6 +14,7 @@ describe('Deploy keys key', () => {
...
@@ -14,6 +14,7 @@ describe('Deploy keys key', () => {
propsData
:
{
propsData
:
{
deployKey
,
deployKey
,
store
,
store
,
endpoint
:
'
https://test.host/dummy/endpoint
'
,
},
},
}).
$mount
();
}).
$mount
();
};
};
...
...
spec/javascripts/deploy_keys/components/keys_panel_spec.js
View file @
2955e956
...
@@ -17,6 +17,7 @@ describe('Deploy keys panel', () => {
...
@@ -17,6 +17,7 @@ describe('Deploy keys panel', () => {
keys
:
data
.
enabled_keys
,
keys
:
data
.
enabled_keys
,
showHelpBox
:
true
,
showHelpBox
:
true
,
store
,
store
,
endpoint
:
'
https://test.host/dummy/endpoint
'
,
},
},
}).
$mount
();
}).
$mount
();
...
...
spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js
View file @
2955e956
...
@@ -4,6 +4,10 @@ import '~/filtered_search/filtered_search_tokenizer';
...
@@ -4,6 +4,10 @@ import '~/filtered_search/filtered_search_tokenizer';
import
'
~/filtered_search/filtered_search_dropdown_manager
'
;
import
'
~/filtered_search/filtered_search_dropdown_manager
'
;
describe
(
'
Filtered Search Dropdown Manager
'
,
()
=>
{
describe
(
'
Filtered Search Dropdown Manager
'
,
()
=>
{
beforeEach
(()
=>
{
spyOn
(
jQuery
,
'
ajax
'
);
});
describe
(
'
addWordToInput
'
,
()
=>
{
describe
(
'
addWordToInput
'
,
()
=>
{
function
getInputValue
()
{
function
getInputValue
()
{
return
document
.
querySelector
(
'
.filtered-search
'
).
value
;
return
document
.
querySelector
(
'
.filtered-search
'
).
value
;
...
...
spec/javascripts/filtered_search/filtered_search_manager_spec.js
View file @
2955e956
import
*
as
recentSearchesStoreSrc
from
'
~/filtered_search/stores/recent_searches_store
'
;
import
*
as
recentSearchesStoreSrc
from
'
~/filtered_search/stores/recent_searches_store
'
;
import
RecentSearchesService
from
'
~/filtered_search/services/recent_searches_service
'
;
import
RecentSearchesService
from
'
~/filtered_search/services/recent_searches_service
'
;
import
RecentSearchesServiceError
from
'
~/filtered_search/services/recent_searches_service_error
'
;
import
RecentSearchesServiceError
from
'
~/filtered_search/services/recent_searches_service_error
'
;
import
RecentSearchesRoot
from
'
~/filtered_search/recent_searches_root
'
;
import
'
~/lib/utils/url_utility
'
;
import
'
~/lib/utils/url_utility
'
;
import
'
~/lib/utils/common_utils
'
;
import
'
~/lib/utils/common_utils
'
;
import
'
~/filtered_search/filtered_search_token_keys
'
;
import
'
~/filtered_search/filtered_search_token_keys
'
;
...
@@ -71,6 +72,7 @@ describe('Filtered Search Manager', () => {
...
@@ -71,6 +72,7 @@ describe('Filtered Search Manager', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
spyOn
(
RecentSearchesService
,
'
isAvailable
'
).
and
.
returnValue
(
isLocalStorageAvailable
);
spyOn
(
RecentSearchesService
,
'
isAvailable
'
).
and
.
returnValue
(
isLocalStorageAvailable
);
spyOn
(
recentSearchesStoreSrc
,
'
default
'
);
spyOn
(
recentSearchesStoreSrc
,
'
default
'
);
spyOn
(
RecentSearchesRoot
.
prototype
,
'
render
'
);
filteredSearchManager
=
new
gl
.
FilteredSearchManager
();
filteredSearchManager
=
new
gl
.
FilteredSearchManager
();
filteredSearchManager
.
setup
();
filteredSearchManager
.
setup
();
...
...
spec/javascripts/issue_show/components/app_spec.js
View file @
2955e956
...
@@ -51,7 +51,6 @@ describe('Issuable output', () => {
...
@@ -51,7 +51,6 @@ describe('Issuable output', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
Vue
.
http
.
interceptors
=
_
.
without
(
Vue
.
http
.
interceptors
,
issueShowInterceptor
);
});
});
it
(
'
should render a title/description/edited and update title/description/edited on update
'
,
(
done
)
=>
{
it
(
'
should render a title/description/edited and update title/description/edited on update
'
,
(
done
)
=>
{
...
...
spec/javascripts/test_bundle.js
View file @
2955e956
/* eslint-disable jasmine/no-global-setup */
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
'
jasmine-jquery
'
;
import
'
jasmine-jquery
'
;
import
'
~/commons
'
;
import
'
~/commons
'
;
import
Vue
from
'
vue
'
;
import
VueResource
from
'
vue-resource
'
;
Vue
.
use
(
VueResource
);
// enable test fixtures
// enable test fixtures
jasmine
.
getFixtures
().
fixturesPath
=
'
/base/spec/javascripts/fixtures
'
;
jasmine
.
getFixtures
().
fixturesPath
=
'
/base/spec/javascripts/fixtures
'
;
jasmine
.
getJSONFixtures
().
fixturesPath
=
'
/base/spec/javascripts/fixtures
'
;
jasmine
.
getJSONFixtures
().
fixturesPath
=
'
/base/spec/javascripts/fixtures
'
;
...
@@ -22,7 +28,25 @@ window.gon = window.gon || {};
...
@@ -22,7 +28,25 @@ window.gon = window.gon || {};
// enough for the socket to continue to communicate.
// enough for the socket to continue to communicate.
// The downside is that it creates a minor performance penalty in the time it takes
// The downside is that it creates a minor performance penalty in the time it takes
// to run our unit tests.
// to run our unit tests.
beforeEach
(
done
=>
done
());
// eslint-disable-line jasmine/no-global-setup
beforeEach
(
done
=>
done
());
beforeAll
(()
=>
{
const
origError
=
console
.
error
;
spyOn
(
console
,
'
error
'
).
and
.
callFake
((
message
)
=>
{
if
(
/^
\[
Vue warn
\]
/
.
test
(
message
))
{
fail
(
message
);
}
else
{
origError
(
message
);
}
});
});
const
builtinVueHttpInterceptors
=
Vue
.
http
.
interceptors
.
slice
();
beforeEach
(()
=>
{
// restore interceptors so we have no remaining ones from previous tests
Vue
.
http
.
interceptors
=
builtinVueHttpInterceptors
.
slice
();
});
// render all of our tests
// render all of our tests
const
testsContext
=
require
.
context
(
'
.
'
,
true
,
/_spec$/
);
const
testsContext
=
require
.
context
(
'
.
'
,
true
,
/_spec$/
);
...
...
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