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
4d9648d1
Commit
4d9648d1
authored
Mar 31, 2022
by
Angelo Gulina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track Zuora events with actual error
parent
27c053e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
ee/app/assets/javascripts/billings/components/zuora.vue
ee/app/assets/javascripts/billings/components/zuora.vue
+2
-2
ee/spec/frontend/billings/components/zuora_spec.js
ee/spec/frontend/billings/components/zuora_spec.js
+8
-2
No files found.
ee/app/assets/javascripts/billings/components/zuora.vue
View file @
4d9648d1
...
...
@@ -87,9 +87,9 @@ export default {
// no need to reload the iframe and emit the failure event
// Add a 15px height to the iframe to accomodate the error message
this
.
iframeHeight
+=
ZUORA_CLIENT_ERROR_HEIGHT
;
this
.
track
(
'
client_error
'
);
this
.
track
(
'
client_error
'
,
{
property
:
event
.
data
.
msg
}
);
}
else
if
(
parseInt
(
event
.
data
.
code
,
10
)
>
6
)
{
this
.
track
(
'
error
'
);
this
.
track
(
'
error
'
,
{
property
:
event
.
data
.
msg
}
);
this
.
error
=
event
.
data
.
msg
;
window
.
removeEventListener
(
'
message
'
,
this
.
handleFrameMessages
,
true
);
this
.
$refs
.
zuora
.
src
=
this
.
iframeSrc
;
...
...
ee/spec/frontend/billings/components/zuora_spec.js
View file @
4d9648d1
...
...
@@ -147,10 +147,12 @@ describe('Zuora', () => {
});
describe
(
'
when failure and code less than 7
'
,
()
=>
{
const
msg
=
'
a propagated error
'
;
beforeEach
(()
=>
{
wrapper
.
vm
.
handleFrameMessages
({
origin
:
'
https://gitlab.com
'
,
data
:
{
success
:
false
,
code
:
6
},
data
:
{
success
:
false
,
code
:
6
,
msg
},
});
});
...
...
@@ -166,6 +168,7 @@ describe('Zuora', () => {
it
(
'
tracks client side Zuora error
'
,
()
=>
{
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
'
Zuora_cc
'
,
'
client_error
'
,
{
property
:
msg
,
category
:
'
Zuora_cc
'
,
});
});
...
...
@@ -198,7 +201,10 @@ describe('Zuora', () => {
});
it
(
'
tracks Zuora error
'
,
()
=>
{
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
'
Zuora_cc
'
,
'
error
'
,
{
category
:
'
Zuora_cc
'
});
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
'
Zuora_cc
'
,
'
error
'
,
{
property
:
'
error
'
,
category
:
'
Zuora_cc
'
,
});
});
});
});
...
...
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