Skip to content

Commit

Permalink
Add e2e test for init configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cy-moi committed Sep 20, 2024
1 parent 5e00489 commit 83f9694
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/e2e/scenario/rum/init.scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ describe('API calls and events around init', () => {
{ name: 'after manual view', viewId: initialView.view.id, viewName: 'after manual view' }
)
})

createTest('should be able to set view context')
.withRum({ enableExperimentalFeatures: ['view_specific_context'] })
.withRumSlim()
.withRumInit((configuration) => {
window.DD_RUM!.init(configuration)
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
;(window.DD_RUM as any).setViewContext({ foo: 'bar' })
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
;(window.DD_RUM as any).setViewContextProperty('foo', 'baz')
})
})

describe('beforeSend', () => {
Expand Down

0 comments on commit 83f9694

Please sign in to comment.