|
1 | 1 | import type { ClocksState, RelativeTime, TimeStamp } from '@datadog/browser-core' |
2 | | -import { |
3 | | - ErrorSource, |
4 | | - ExperimentalFeature, |
5 | | - HookNames, |
6 | | - ONE_MINUTE, |
7 | | - display, |
8 | | - startGlobalContext, |
9 | | -} from '@datadog/browser-core' |
| 2 | +import { ErrorSource, HookNames, ONE_MINUTE, display, startGlobalContext } from '@datadog/browser-core' |
10 | 3 | import type { Clock } from '@datadog/browser-core/test' |
11 | | -import { mockExperimentalFeatures, registerCleanupTask, mockClock } from '@datadog/browser-core/test' |
| 4 | +import { registerCleanupTask, mockClock } from '@datadog/browser-core/test' |
12 | 5 | import { |
13 | 6 | createRumSessionManagerMock, |
14 | 7 | createRawRumEvent, |
@@ -76,38 +69,6 @@ describe('rum assembly', () => { |
76 | 69 |
|
77 | 70 | expect((serverRumEvents[0].view as any).performance.lcp.resource_url).toBe('modified_url') |
78 | 71 | }) |
79 | | - |
80 | | - describe('field resource.graphql on Resource events', () => { |
81 | | - it('by default, it should not be modifiable', () => { |
82 | | - const { lifeCycle, serverRumEvents } = setupAssemblyTestWithDefaults({ |
83 | | - partialConfiguration: { |
84 | | - beforeSend: (event) => (event.resource!.graphql = { operationType: 'query' }), |
85 | | - }, |
86 | | - }) |
87 | | - |
88 | | - notifyRawRumEvent(lifeCycle, { |
89 | | - rawRumEvent: createRawRumEvent(RumEventType.RESOURCE, { resource: { url: '/path?foo=bar' } }), |
90 | | - }) |
91 | | - |
92 | | - expect((serverRumEvents[0] as RumResourceEvent).resource.graphql).toBeUndefined() |
93 | | - }) |
94 | | - |
95 | | - it('with the writable_resource_graphql experimental flag is set, it should be modifiable', () => { |
96 | | - mockExperimentalFeatures([ExperimentalFeature.WRITABLE_RESOURCE_GRAPHQL]) |
97 | | - |
98 | | - const { lifeCycle, serverRumEvents } = setupAssemblyTestWithDefaults({ |
99 | | - partialConfiguration: { |
100 | | - beforeSend: (event) => (event.resource!.graphql = { operationType: 'query' }), |
101 | | - }, |
102 | | - }) |
103 | | - |
104 | | - notifyRawRumEvent(lifeCycle, { |
105 | | - rawRumEvent: createRawRumEvent(RumEventType.RESOURCE, { resource: { url: '/path?foo=bar' } }), |
106 | | - }) |
107 | | - |
108 | | - expect((serverRumEvents[0] as RumResourceEvent).resource.graphql).toEqual({ operationType: 'query' }) |
109 | | - }) |
110 | | - }) |
111 | 72 | }) |
112 | 73 |
|
113 | 74 | describe('context field', () => { |
|
0 commit comments