Skip to content

Commit d28d7cf

Browse files
committed
✅ Update ui_extension_errored spec for the flattened context shape
1 parent c5ffd0d commit d28d7cf

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

packages/browser-rum-shopify/src/domain/shopifyBindings.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('initShopifyBindings', () => {
122122
expect(stopAction).toHaveBeenCalledWith('element-without-id', { type: 'click' })
123123
})
124124

125-
it('maps "ui_extension_errored" to addError with the extension context', () => {
125+
it('maps "ui_extension_errored" to addError with the flattened extension context', () => {
126126
const { rumPublicApi, addError } = createFakeRumPublicApi()
127127
const { analytics, emit } = createFakeAnalytics()
128128

@@ -138,18 +138,20 @@ describe('initShopifyBindings', () => {
138138
extensionName: 'my-extension',
139139
extensionTarget: 'purchase.checkout.block.render',
140140
type: 'RUNTIME',
141+
appId: 'gid://shopify/App/1',
141142
appName: 'my-app',
143+
appVersion: '1.2.3',
142144
},
143145
},
144146
})
145147

146148
expect(addError).toHaveBeenCalledWith(jasmine.objectContaining({ message: 'Boom', stack: 'stack trace' }), {
147-
extension: {
148-
name: 'my-extension',
149-
target: 'purchase.checkout.block.render',
150-
type: 'RUNTIME',
151-
appName: 'my-app',
152-
},
149+
extensionName: 'my-extension',
150+
extensionTarget: 'purchase.checkout.block.render',
151+
extensionErrorType: 'RUNTIME',
152+
appId: 'gid://shopify/App/1',
153+
appName: 'my-app',
154+
appVersion: '1.2.3',
153155
})
154156
})
155157
})

0 commit comments

Comments
 (0)