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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8089a2fe
Commit
8089a2fe
authored
Nov 30, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address maintainer feedback
- use getParameterByName - remove redundant `async` declarations
parent
2e32932e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
app/assets/javascripts/integrations/overrides/components/integration_overrides.vue
...tegrations/overrides/components/integration_overrides.vue
+2
-3
spec/frontend/integrations/overrides/components/integration_overrides_spec.js
...ations/overrides/components/integration_overrides_spec.js
+2
-2
No files found.
app/assets/javascripts/integrations/overrides/components/integration_overrides.vue
View file @
8089a2fe
...
...
@@ -6,7 +6,7 @@ import { DEFAULT_PER_PAGE } from '~/api';
import
{
fetchOverrides
}
from
'
~/integrations/overrides/api
'
;
import
{
parseIntPagination
,
normalizeHeaders
}
from
'
~/lib/utils/common_utils
'
;
import
{
truncateNamespace
}
from
'
~/lib/utils/text_utility
'
;
import
{
queryToObject
}
from
'
~/lib/utils/url_utility
'
;
import
{
getParameterByName
}
from
'
~/lib/utils/url_utility
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
import
ProjectAvatar
from
'
~/vue_shared/components/project_avatar.vue
'
;
import
UrlSync
from
'
~/vue_shared/components/url_sync.vue
'
;
...
...
@@ -61,8 +61,7 @@ export default {
},
methods
:
{
getInitialPage
()
{
const
{
page
}
=
queryToObject
(
window
.
location
.
search
);
return
page
??
DEFAULT_PAGE
;
return
getParameterByName
(
'
page
'
)
??
DEFAULT_PAGE
;
},
loadOverrides
(
page
)
{
this
.
isLoading
=
true
;
...
...
spec/frontend/integrations/overrides/components/integration_overrides_spec.js
View file @
8089a2fe
...
...
@@ -171,13 +171,13 @@ describe('IntegrationOverrides', () => {
await
findPagination
().
vm
.
$emit
(
'
input
'
,
mockPage
);
});
it
(
'
performs GET request with correct params
'
,
async
()
=>
{
it
(
'
performs GET request with correct params
'
,
()
=>
{
expect
(
axios
.
get
).
toHaveBeenCalledWith
(
defaultProps
.
overridesPath
,
{
params
:
{
page
:
mockPage
,
per_page
:
DEFAULT_PER_PAGE
},
});
});
it
(
'
updates `page` URL parameter
'
,
async
()
=>
{
it
(
'
updates `page` URL parameter
'
,
()
=>
{
expect
(
window
.
location
.
search
).
toBe
(
`?page=
${
mockPage
}
`
);
});
});
...
...
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