Skip to content

Commit bc1f166

Browse files
rmi22186claude
andcommitted
test: use actual server key for captureIntegrationSpecificIds.V2 in tests
Tests were using the SDK constant value as the flag key, which matched the (incorrect) constant and always passed. Updated all test configs to use the literal server key 'captureIntegrationSpecificIds.V2' so tests will catch key mismatches in the future. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 26f58ae commit bc1f166

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

test/src/tests-batchUploader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ describe('batch uploader', () => {
269269
};
270270

271271
window.mParticle.config.flags.captureIntegrationSpecificIds = "False";
272-
window.mParticle.config.flags.captureIntegrationSpecificIdsV2 = "roktonly";
272+
window.mParticle.config.flags['captureIntegrationSpecificIds.V2'] = "roktonly";
273273

274274
const consentState = window.mParticle.Consent.createConsentState();
275275
const timestamp = new Date().getTime();

test/src/tests-feature-flags.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('feature-flags', () => {
119119
it('should capture click ids when feature flag is true', async () => {
120120
window.mParticle.config.flags = {
121121
captureIntegrationSpecificIds: 'True',
122-
captureIntegrationSpecificIdsV2: 'all'
122+
'captureIntegrationSpecificIds.V2': 'all'
123123
};
124124

125125
// initialize mParticle with feature flag
@@ -149,7 +149,7 @@ describe('feature-flags', () => {
149149
it('should NOT capture click ids when feature flag is false', async () => {
150150
window.mParticle.config.flags = {
151151
captureIntegrationSpecificIds: 'False',
152-
captureIntegrationSpecificIdsV2: 'none'
152+
'captureIntegrationSpecificIds.V2': 'none'
153153
};
154154

155155
// initialize mParticle with feature flag

test/src/tests-integration-capture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('Integration Capture', () => {
3636

3737
window.mParticle.config.flags = {
3838
captureIntegrationSpecificIds: 'True',
39-
captureIntegrationSpecificIdsV2: 'all'
39+
'captureIntegrationSpecificIds.V2': 'all'
4040
};
4141

4242
window.document.cookie = '_cookie1=234';

test/src/tests-store.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ describe('Store', () => {
13791379
cacheIdentity: 'False',
13801380
audienceAPI: 'False',
13811381
captureIntegrationSpecificIds: 'False',
1382-
captureIntegrationSpecificIdsV2: 'none',
1382+
'captureIntegrationSpecificIds.V2': 'none',
13831383
astBackgroundEvents: 'True',
13841384
},
13851385
};
@@ -1399,7 +1399,7 @@ describe('Store', () => {
13991399
cacheIdentity: false,
14001400
audienceAPI: false,
14011401
captureIntegrationSpecificIds: false,
1402-
captureIntegrationSpecificIdsV2: 'none',
1402+
'captureIntegrationSpecificIds.V2': 'none',
14031403
astBackgroundEvents: true,
14041404
};
14051405

@@ -1599,7 +1599,7 @@ describe('Store', () => {
15991599
cacheIdentity: false,
16001600
audienceAPI: false,
16011601
captureIntegrationSpecificIds: false,
1602-
captureIntegrationSpecificIdsV2: 'none',
1602+
'captureIntegrationSpecificIds.V2': 'none',
16031603
astBackgroundEvents: false,
16041604
};
16051605

@@ -1615,7 +1615,7 @@ describe('Store', () => {
16151615
cacheIdentity: 'True',
16161616
audienceAPI: 'True',
16171617
captureIntegrationSpecificIds: 'True',
1618-
captureIntegrationSpecificIdsV2: 'all',
1618+
'captureIntegrationSpecificIds.V2': 'all',
16191619
astBackgroundEvents: 'True',
16201620
};
16211621

@@ -1631,7 +1631,7 @@ describe('Store', () => {
16311631
cacheIdentity: true,
16321632
audienceAPI: true,
16331633
captureIntegrationSpecificIds: true,
1634-
captureIntegrationSpecificIdsV2: 'all',
1634+
'captureIntegrationSpecificIds.V2': 'all',
16351635
astBackgroundEvents: true,
16361636
};
16371637

0 commit comments

Comments
 (0)