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
114ecabe
Commit
114ecabe
authored
Apr 06, 2021
by
Scott Hampton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove snowplow event
Remove the snowplow event now that are using usage ping.
parent
a3b40ddf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
45 deletions
+20
-45
app/assets/javascripts/reports/grouped_test_report/grouped_test_reports_app.vue
.../reports/grouped_test_report/grouped_test_reports_app.vue
+3
-6
spec/frontend/reports/grouped_test_report/grouped_test_reports_app_spec.js
...orts/grouped_test_report/grouped_test_reports_app_spec.js
+17
-39
No files found.
app/assets/javascripts/reports/grouped_test_report/grouped_test_reports_app.vue
View file @
114ecabe
...
@@ -3,7 +3,6 @@ import { GlButton, GlIcon } from '@gitlab/ui';
...
@@ -3,7 +3,6 @@ import { GlButton, GlIcon } from '@gitlab/ui';
import
{
mapActions
,
mapGetters
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
,
mapGetters
,
mapState
}
from
'
vuex
'
;
import
api
from
'
~/api
'
;
import
api
from
'
~/api
'
;
import
{
sprintf
,
s__
}
from
'
~/locale
'
;
import
{
sprintf
,
s__
}
from
'
~/locale
'
;
import
Tracking
from
'
~/tracking
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
GroupedIssuesList
from
'
../components/grouped_issues_list.vue
'
;
import
GroupedIssuesList
from
'
../components/grouped_issues_list.vue
'
;
import
{
componentNames
}
from
'
../components/issue_body
'
;
import
{
componentNames
}
from
'
../components/issue_body
'
;
...
@@ -29,7 +28,7 @@ export default {
...
@@ -29,7 +28,7 @@ export default {
GlButton
,
GlButton
,
GlIcon
,
GlIcon
,
},
},
mixins
:
[
Tracking
.
mixin
(),
glFeatureFlagsMixin
()],
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
props
:
{
endpoint
:
{
endpoint
:
{
type
:
String
,
type
:
String
,
...
@@ -83,9 +82,8 @@ export default {
...
@@ -83,9 +82,8 @@ export default {
methods
:
{
methods
:
{
...
mapActions
([
'
setPaths
'
,
'
fetchReports
'
,
'
closeModal
'
]),
...
mapActions
([
'
setPaths
'
,
'
fetchReports
'
,
'
closeModal
'
]),
handleToggleEvent
()
{
handleToggleEvent
()
{
this
.
track
(
this
.
$options
.
expandEvent
);
if
(
this
.
glFeatures
.
usageDataITestingSummaryWidgetTotal
)
{
if
(
this
.
glFeatures
.
usageDataITestingSummaryWidgetTotal
)
{
api
.
trackRedisHllUserEvent
(
this
.
$options
.
expand
UsagePing
Event
);
api
.
trackRedisHllUserEvent
(
this
.
$options
.
expandEvent
);
}
}
},
},
reportText
(
report
)
{
reportText
(
report
)
{
...
@@ -132,8 +130,7 @@ export default {
...
@@ -132,8 +130,7 @@ export default {
return
report
.
resolved_failures
.
concat
(
report
.
resolved_errors
);
return
report
.
resolved_failures
.
concat
(
report
.
resolved_errors
);
},
},
},
},
expandEvent
:
'
expand_test_report_widget
'
,
expandEvent
:
'
i_testing_summary_widget_total
'
,
expandUsagePingEvent
:
'
i_testing_summary_widget_total
'
,
};
};
</
script
>
</
script
>
<
template
>
<
template
>
...
...
spec/frontend/reports/grouped_test_report/grouped_test_reports_app_spec.js
View file @
114ecabe
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
mockTracking
}
from
'
helpers/tracking_helper
'
;
import
Api
from
'
~/api
'
;
import
Api
from
'
~/api
'
;
import
GroupedTestReportsApp
from
'
~/reports/grouped_test_report/grouped_test_reports_app.vue
'
;
import
GroupedTestReportsApp
from
'
~/reports/grouped_test_report/grouped_test_reports_app.vue
'
;
import
{
getStoreConfig
}
from
'
~/reports/grouped_test_report/store
'
;
import
{
getStoreConfig
}
from
'
~/reports/grouped_test_report/store
'
;
...
@@ -111,54 +110,33 @@ describe('Grouped test reports app', () => {
...
@@ -111,54 +110,33 @@ describe('Grouped test reports app', () => {
});
});
describe
(
'
`Expand` button
'
,
()
=>
{
describe
(
'
`Expand` button
'
,
()
=>
{
let
trackingSpy
;
beforeEach
(()
=>
{
it
(
'
tracks an event on click
'
,
()
=>
{
setReports
(
newFailedTestReports
);
setReports
(
newFailedTestReports
);
mountComponent
();
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
findExpandButton
().
trigger
(
'
click
'
);
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
undefined
,
'
expand_test_report_widget
'
,
{});
});
});
it
(
'
only tracks the first expansion
'
,
()
=>
{
it
(
'
tracks usage ping metric when enabled
'
,
()
=>
{
setReports
(
newFailedTestReports
);
mountComponent
({
glFeatures
:
{
usageDataITestingSummaryWidgetTotal
:
true
}
});
mountComponent
();
findExpandButton
().
trigger
(
'
click
'
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
expect
(
trackingSpy
).
not
.
toHaveBeenCalled
();
const
button
=
findExpandButton
();
button
.
trigger
(
'
click
'
);
button
.
trigger
(
'
click
'
);
button
.
trigger
(
'
click
'
);
expect
(
trackingSpy
).
toHaveBeenCalledTimes
(
1
);
expect
(
Api
.
trackRedisHllUserEvent
).
toHaveBeenCalledTimes
(
1
);
expect
(
Api
.
trackRedisHllUserEvent
).
toHaveBeenCalledWith
(
wrapper
.
vm
.
$options
.
expandEvent
);
});
});
describe
(
'
with :usage_data_i_testing_summary_widget_total enabled
'
,
()
=>
{
it
(
'
only tracks the first expansion
'
,
()
=>
{
it
(
'
does track usage ping metric
'
,
()
=>
{
mountComponent
({
glFeatures
:
{
usageDataITestingSummaryWidgetTotal
:
true
}
});
setReports
(
newFailedTestReports
);
const
expandButton
=
findExpandButton
();
mountComponent
({
glFeatures
:
{
usageDataITestingSummaryWidgetTotal
:
true
}
});
expandButton
.
trigger
(
'
click
'
);
findExpandButton
().
trigger
(
'
click
'
);
expandButton
.
trigger
(
'
click
'
);
expandButton
.
trigger
(
'
click
'
);
expect
(
Api
.
trackRedisHllUserEvent
).
toHaveBeenCalledTimes
(
1
);
expect
(
Api
.
trackRedisHllUserEvent
).
toHaveBeenCalledTimes
(
1
);
expect
(
Api
.
trackRedisHllUserEvent
).
toHaveBeenCalledWith
(
wrapper
.
vm
.
$options
.
expandUsagePingEvent
,
);
});
});
});
describe
(
'
with :usage_data_i_testing_summary_widget_total disabled
'
,
()
=>
{
it
(
'
does not track usage ping metric when disabled
'
,
()
=>
{
it
(
'
does not track usage ping metric
'
,
()
=>
{
mountComponent
({
glFeatures
:
{
usageDataITestingSummaryWidgetTotal
:
false
}
});
setReports
(
newFailedTestReports
);
findExpandButton
().
trigger
(
'
click
'
);
mountComponent
({
glFeatures
:
{
usageDataITestingSummaryWidgetTotal
:
false
}
});
findExpandButton
().
trigger
(
'
click
'
);
expect
(
Api
.
trackRedisHllUserEvent
).
not
.
toHaveBeenCalled
();
expect
(
Api
.
trackRedisHllUserEvent
).
not
.
toHaveBeenCalled
();
});
});
});
});
});
...
...
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