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
0dc1b04f
Commit
0dc1b04f
authored
Oct 02, 2020
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub tests for design upload tracking
parent
c9388ea2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
spec/frontend/design_management/pages/index_spec.js
spec/frontend/design_management/pages/index_spec.js
+26
-0
No files found.
spec/frontend/design_management/pages/index_spec.js
View file @
0dc1b04f
...
...
@@ -29,6 +29,7 @@ import {
import
getDesignListQuery
from
'
~/design_management/graphql/queries/get_design_list.query.graphql
'
;
import
permissionsQuery
from
'
~/design_management/graphql/queries/design_permissions.query.graphql
'
;
import
moveDesignMutation
from
'
~/design_management/graphql/mutations/move_design.mutation.graphql
'
;
import
{
mockTracking
,
unmockTracking
}
from
'
helpers/tracking_helper
'
;
jest
.
mock
(
'
~/flash.js
'
);
const
mockPageEl
=
{
...
...
@@ -482,6 +483,31 @@ describe('Design management index page', () => {
expect
(
createFlash
).
toHaveBeenCalledWith
(
message
);
});
});
describe
(
'
tracking
'
,
()
=>
{
let
trackingSpy
;
beforeEach
(()
=>
{
trackingSpy
=
mockTracking
(
'
_category_
'
,
undefined
,
jest
.
spyOn
);
});
afterEach
(()
=>
{
unmockTracking
();
});
it
(
'
tracks design creation
'
,
()
=>
{
createComponent
({
stubs
:
{
GlEmptyState
}
});
wrapper
.
vm
.
onUploadDesign
([{
name
:
'
test
'
}]);
wrapper
.
vm
.
onUploadDesignDone
();
// expect(trackingSpy).toHaveBeenCalledWith(undefined, 'create_design', {});
});
it
(
'
tracks design modification
'
,
()
=>
{
wrapper
.
vm
.
onUploadDesignDone
();
// expect(trackingSpy).toHaveBeenCalledWith(undefined, 'update_design', {});
});
});
});
describe
(
'
on latest version when has designs
'
,
()
=>
{
...
...
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