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
Jérome Perrin
gitlab-ce
Commits
c4d4f4d8
Commit
c4d4f4d8
authored
Mar 31, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean history after every test that changes history
parent
20b54b13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
spec/javascripts/environments/environment_spec.js
spec/javascripts/environments/environment_spec.js
+4
-0
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+8
-0
spec/javascripts/vue_shared/components/table_pagination_spec.js
...avascripts/vue_shared/components/table_pagination_spec.js
+4
-0
No files found.
spec/javascripts/environments/environment_spec.js
View file @
c4d4f4d8
...
@@ -91,6 +91,10 @@ describe('Environment', () => {
...
@@ -91,6 +91,10 @@ describe('Environment', () => {
});
});
describe
(
'
pagination
'
,
()
=>
{
describe
(
'
pagination
'
,
()
=>
{
afterEach
(()
=>
{
window
.
history
.
pushState
({},
null
,
''
);
});
it
(
'
should render pagination
'
,
(
done
)
=>
{
it
(
'
should render pagination
'
,
(
done
)
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
expect
(
expect
(
...
...
spec/javascripts/lib/utils/common_utils_spec.js
View file @
c4d4f4d8
...
@@ -46,6 +46,10 @@ require('~/lib/utils/common_utils');
...
@@ -46,6 +46,10 @@ require('~/lib/utils/common_utils');
spyOn
(
window
.
document
,
'
getElementById
'
).
and
.
callThrough
();
spyOn
(
window
.
document
,
'
getElementById
'
).
and
.
callThrough
();
});
});
afterEach
(()
=>
{
window
.
history
.
pushState
({},
null
,
''
);
});
function
expectGetElementIdToHaveBeenCalledWith
(
elementId
)
{
function
expectGetElementIdToHaveBeenCalledWith
(
elementId
)
{
expect
(
window
.
document
.
getElementById
).
toHaveBeenCalledWith
(
elementId
);
expect
(
window
.
document
.
getElementById
).
toHaveBeenCalledWith
(
elementId
);
}
}
...
@@ -80,6 +84,10 @@ require('~/lib/utils/common_utils');
...
@@ -80,6 +84,10 @@ require('~/lib/utils/common_utils');
window
.
history
.
pushState
({},
null
,
'
?scope=all&p=2
'
);
window
.
history
.
pushState
({},
null
,
'
?scope=all&p=2
'
);
});
});
afterEach
(()
=>
{
window
.
history
.
pushState
({},
null
,
''
);
});
it
(
'
should return valid parameter
'
,
()
=>
{
it
(
'
should return valid parameter
'
,
()
=>
{
const
value
=
gl
.
utils
.
getParameterByName
(
'
scope
'
);
const
value
=
gl
.
utils
.
getParameterByName
(
'
scope
'
);
expect
(
value
).
toBe
(
'
all
'
);
expect
(
value
).
toBe
(
'
all
'
);
...
...
spec/javascripts/vue_shared/components/table_pagination_spec.js
View file @
c4d4f4d8
...
@@ -124,6 +124,10 @@ describe('Pagination component', () => {
...
@@ -124,6 +124,10 @@ describe('Pagination component', () => {
});
});
describe
(
'
paramHelper
'
,
()
=>
{
describe
(
'
paramHelper
'
,
()
=>
{
afterEach
(()
=>
{
window
.
history
.
pushState
({},
null
,
''
);
});
it
(
'
can parse url parameters correctly
'
,
()
=>
{
it
(
'
can parse url parameters correctly
'
,
()
=>
{
window
.
history
.
pushState
({},
null
,
'
?scope=all&p=2
'
);
window
.
history
.
pushState
({},
null
,
'
?scope=all&p=2
'
);
...
...
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