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
2161c724
Commit
2161c724
authored
Mar 31, 2020
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test true mounting lifecycle hook
- before we weren't testing the actual mounting life cycle now we are.
parent
65538ce3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
app/assets/javascripts/blob/pipeline_tour_success_modal.vue
app/assets/javascripts/blob/pipeline_tour_success_modal.vue
+1
-4
spec/frontend/blob/pipeline_tour_success_modal_spec.js
spec/frontend/blob/pipeline_tour_success_modal_spec.js
+5
-14
No files found.
app/assets/javascripts/blob/pipeline_tour_success_modal.vue
View file @
2161c724
...
...
@@ -50,13 +50,10 @@ export default {
};
},
mounted
()
{
this
.
track
OnShow
();
this
.
track
();
this
.
disableModalFromRenderingAgain
();
},
methods
:
{
trackOnShow
()
{
this
.
track
();
},
disableModalFromRenderingAgain
()
{
Cookies
.
remove
(
this
.
commitCookie
);
},
...
...
spec/frontend/blob/pipeline_tour_success_spec.js
→
spec/frontend/blob/pipeline_tour_success_
modal_
spec.js
View file @
2161c724
...
...
@@ -8,8 +8,12 @@ import modalProps from './pipeline_tour_success_mock_data';
describe
(
'
PipelineTourSuccessModal
'
,
()
=>
{
let
wrapper
;
let
cookieSpy
;
let
trackingSpy
;
beforeEach
(()
=>
{
document
.
body
.
dataset
.
page
=
'
projects:blob:show
'
;
trackingSpy
=
mockTracking
(
'
_category_
'
,
undefined
,
jest
.
spyOn
);
wrapper
=
shallowMount
(
pipelineTourSuccess
,
{
propsData
:
modalProps
,
});
...
...
@@ -19,6 +23,7 @@ describe('PipelineTourSuccessModal', () => {
afterEach
(()
=>
{
wrapper
.
destroy
();
unmockTracking
();
});
it
(
'
has expected structure
'
,
()
=>
{
...
...
@@ -36,21 +41,7 @@ describe('PipelineTourSuccessModal', () => {
});
describe
(
'
tracking
'
,
()
=>
{
let
trackingSpy
;
beforeEach
(()
=>
{
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
});
afterEach
(()
=>
{
unmockTracking
();
});
it
(
'
send event for basic view of popover
'
,
()
=>
{
document
.
body
.
dataset
.
page
=
'
projects:blob:show
'
;
wrapper
.
vm
.
trackOnShow
();
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
undefined
,
undefined
,
{
label
:
'
congratulate_first_pipeline
'
,
property
:
modalProps
.
humanAccess
,
...
...
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