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
4d7c2987
Commit
4d7c2987
authored
Dec 18, 2019
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renames function with better name
parent
569f27ff
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
app/assets/javascripts/error_tracking/components/error_tracking_list.vue
...scripts/error_tracking/components/error_tracking_list.vue
+3
-3
app/assets/javascripts/error_tracking/store/list/actions.js
app/assets/javascripts/error_tracking/store/list/actions.js
+1
-1
spec/frontend/error_tracking/components/error_tracking_list_spec.js
...end/error_tracking/components/error_tracking_list_spec.js
+5
-5
spec/frontend/error_tracking/store/list/actions_spec.js
spec/frontend/error_tracking/store/list/actions_spec.js
+2
-2
No files found.
app/assets/javascripts/error_tracking/components/error_tracking_list.vue
View file @
4d7c2987
...
...
@@ -143,7 +143,7 @@ export default {
'
clearRecentSearches
'
,
'
loadRecentSearches
'
,
'
setIndexPath
'
,
'
fetchResults
'
,
'
fetch
Paginated
Results
'
,
]),
setSearchText
(
text
)
{
this
.
errorSearchQuery
=
text
;
...
...
@@ -154,10 +154,10 @@ export default {
},
goToNextPage
()
{
this
.
pageValue
=
this
.
$options
.
NEXT_PAGE
;
this
.
fetchResults
(
this
.
pagination
.
next
.
cursor
);
this
.
fetch
Paginated
Results
(
this
.
pagination
.
next
.
cursor
);
},
goToPrevPage
()
{
this
.
fetchResults
(
this
.
pagination
.
previous
.
cursor
);
this
.
fetch
Paginated
Results
(
this
.
pagination
.
previous
.
cursor
);
},
goToPage
(
page
)
{
window
.
scrollTo
(
0
,
0
);
...
...
app/assets/javascripts/error_tracking/store/list/actions.js
View file @
4d7c2987
...
...
@@ -93,7 +93,7 @@ export const setEndpoint = ({ commit }, endpoint) => {
commit
(
types
.
SET_ENDPOINT
,
endpoint
);
};
export
const
fetchResults
=
({
commit
,
dispatch
},
cursor
)
=>
{
export
const
fetch
Paginated
Results
=
({
commit
,
dispatch
},
cursor
)
=>
{
commit
(
types
.
SET_CURSOR
,
cursor
);
dispatch
(
'
stopPolling
'
);
dispatch
(
'
startPolling
'
);
...
...
spec/frontend/error_tracking/components/error_tracking_list_spec.js
View file @
4d7c2987
...
...
@@ -71,7 +71,7 @@ describe('ErrorTrackingList', () => {
setEndpoint
:
jest
.
fn
(),
searchByQuery
:
jest
.
fn
(),
sortByField
:
jest
.
fn
(),
fetchResults
:
jest
.
fn
(),
fetch
Paginated
Results
:
jest
.
fn
(),
};
const
state
=
{
...
...
@@ -306,8 +306,8 @@ describe('ErrorTrackingList', () => {
it
(
'
fetches the previous page of results
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.prev-page-item
'
).
attributes
(
'
aria-disabled
'
)).
toBe
(
undefined
);
wrapper
.
vm
.
goToPrevPage
();
expect
(
actions
.
fetchResults
).
toHaveBeenCalled
();
expect
(
actions
.
fetchResults
).
toHaveBeenLastCalledWith
(
expect
(
actions
.
fetch
Paginated
Results
).
toHaveBeenCalled
();
expect
(
actions
.
fetch
Paginated
Results
).
toHaveBeenLastCalledWith
(
expect
.
anything
(),
'
previousCursor
'
,
undefined
,
...
...
@@ -325,8 +325,8 @@ describe('ErrorTrackingList', () => {
window
.
scrollTo
=
jest
.
fn
();
findPagination
().
vm
.
$emit
(
'
input
'
,
2
);
expect
(
window
.
scrollTo
).
toHaveBeenCalledWith
(
0
,
0
);
expect
(
actions
.
fetchResults
).
toHaveBeenCalled
();
expect
(
actions
.
fetchResults
).
toHaveBeenLastCalledWith
(
expect
(
actions
.
fetch
Paginated
Results
).
toHaveBeenCalled
();
expect
(
actions
.
fetch
Paginated
Results
).
toHaveBeenLastCalledWith
(
expect
.
anything
(),
'
nextCursor
'
,
undefined
,
...
...
spec/frontend/error_tracking/store/list/actions_spec.js
View file @
4d7c2987
...
...
@@ -118,11 +118,11 @@ describe('error tracking actions', () => {
});
});
describe
(
'
fetchResults
'
,
()
=>
{
describe
(
'
fetch
Paginated
Results
'
,
()
=>
{
it
(
'
should start polling the selected page cursor
'
,
()
=>
{
const
cursor
=
'
1576637570000:1:1
'
;
testAction
(
actions
.
fetchResults
,
actions
.
fetch
Paginated
Results
,
cursor
,
{},
[{
type
:
types
.
SET_CURSOR
,
payload
:
cursor
}],
...
...
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