Skip to content

Commit

Permalink
Merge 71e270a into 8f5e07c
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsola-guardian authored Feb 5, 2024
2 parents 8f5e07c + 71e270a commit c3ebb03
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-kangaroos-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@guardian/consent-management-platform": minor
---

Removing \_\_gpp stub load in CCPA
5 changes: 0 additions & 5 deletions src/sourcepoint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ describe('Sourcepoint unified', () => {
beforeEach(() => {
window.__tcfapi = undefined;
window.__uspapi = undefined;
window.__gpp = undefined;
});
afterEach(() => {
window._sp_ = undefined;
Expand Down Expand Up @@ -43,23 +42,19 @@ describe('Sourcepoint unified', () => {
expect(window._sp_.config.ccpa).toBeUndefined();
expect(window.__tcfapi).toBeDefined();
expect(window.__uspapi).toBeUndefined();
expect(window.__gpp).toBeUndefined();
} else if (framework == 'ccpa') {
expect(
window._sp_.config.ccpa.targetingParams.framework,
).toEqual(framework);
expect(window._sp_.config.gdpr).toBeUndefined;
expect(window._sp_.config.ccpa.includeGppApi).toBeTruthy();
expect(window.__uspapi).toBeDefined();
expect(window.__gpp).toBeDefined();
expect(window.__tcfapi).toBeUndefined();
} else if (framework == 'aus') {
expect(
window._sp_.config.ccpa.targetingParams.framework,
).toEqual(framework);
expect(window._sp_.config.gdpr).toBeUndefined;
expect(window._sp_.config.ccpa.includeGppApi).toBeFalsy();
expect(window.__gpp).toBeUndefined();
expect(window.__uspapi).toBeDefined();
expect(window.__tcfapi).toBeUndefined();
}
Expand Down
1 change: 0 additions & 1 deletion src/sourcepoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ export const init = (framework: Framework, pubData = {}): void => {
break;
case 'ccpa':
window._sp_.config.ccpa = {
includeGppApi: true,
targetingParams: {
framework,
},
Expand Down
2 changes: 0 additions & 2 deletions src/stub.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { stub_gpp_ccpa } from './stub_gpp_ccpa';
import { stub_tcfv2 } from './stub_tcfv2';
import { stub_uspapi_ccpa } from './stub_uspapi_ccpa';
import type { Framework } from './types';
Expand All @@ -14,7 +13,6 @@ export const stub = (framework: Framework): void => {
break;
case 'ccpa':
stub_uspapi_ccpa();
stub_gpp_ccpa();
break;
case 'aus':
stub_uspapi_ccpa();
Expand Down
4 changes: 0 additions & 4 deletions src/types/window.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,5 @@ declare global {
callback: (tcData: TCData, success: boolean) => void,
vendorIDs?: number[],
) => void;
__gpp?: (
command: string,
callback: (gppData: GPPData, success: boolean) => void,
) => void;
}
}

0 comments on commit c3ebb03

Please sign in to comment.