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
ef32342f
Commit
ef32342f
authored
Jan 15, 2020
by
lauraMon
Committed by
Tristan Read
Jan 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds extra spec
parent
82c8b065
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
app/assets/javascripts/error_tracking/components/error_tracking_list.vue
...scripts/error_tracking/components/error_tracking_list.vue
+1
-1
spec/frontend/error_tracking/components/error_tracking_list_spec.js
...end/error_tracking/components/error_tracking_list_spec.js
+31
-1
No files found.
app/assets/javascripts/error_tracking/components/error_tracking_list.vue
View file @
ef32342f
...
...
@@ -324,7 +324,7 @@ export default {
</div>
</
template
>
<
template
v-slot:ignore=
"errors"
>
<gl-button
@
click=
"updateIssueStatus(errors.item.id, 'ignored')"
>
<gl-button
ref=
"ignoreError"
@
click=
"updateIssueStatus(errors.item.id, 'ignored')"
>
<gl-icon
name=
"eye-slash"
:size=
"12"
/>
</gl-button>
</
template
>
...
...
spec/frontend/error_tracking/components/error_tracking_list_spec.js
View file @
ef32342f
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
{
GlEmptyState
,
GlLoadingIcon
,
GlFormInput
,
GlPagination
}
from
'
@gitlab/ui
'
;
import
{
Gl
Icon
,
Gl
EmptyState
,
GlLoadingIcon
,
GlFormInput
,
GlPagination
}
from
'
@gitlab/ui
'
;
import
stubChildren
from
'
helpers/stub_children
'
;
import
ErrorTrackingList
from
'
~/error_tracking/components/error_tracking_list.vue
'
;
import
errorsList
from
'
./list_mock.json
'
;
...
...
@@ -61,6 +61,7 @@ describe('ErrorTrackingList', () => {
searchByQuery
:
jest
.
fn
(),
sortByField
:
jest
.
fn
(),
fetchPaginatedResults
:
jest
.
fn
(),
updateStatus
:
jest
.
fn
(),
};
const
state
=
{
...
...
@@ -215,6 +216,35 @@ describe('ErrorTrackingList', () => {
});
});
describe
(
'
When the ignore button on an error is clicked
'
,
()
=>
{
beforeEach
(()
=>
{
store
.
state
.
list
.
loading
=
false
;
store
.
state
.
list
.
errors
=
errorsList
;
mountComponent
({
stubs
:
{
GlTable
:
false
,
GlLink
:
false
,
GlButton
:
false
,
},
});
});
it
(
'
sends the status and error ID
'
,
()
=>
{
const
ignoreButton
=
wrapper
.
find
({
ref
:
'
ignoreError
'
});
ignoreButton
.
trigger
(
'
click
'
);
expect
(
actions
.
updateStatus
).
toHaveBeenCalledWith
(
expect
.
anything
(),
{
endpoint
:
'
/project/test/-/error_tracking/3.json
'
,
redirectUrl
:
'
/error_tracking
'
,
status
:
'
ignored
'
,
},
undefined
,
);
});
});
describe
(
'
When error tracking is disabled and user is not allowed to enable it
'
,
()
=>
{
beforeEach
(()
=>
{
mountComponent
({
...
...
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