File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
packages/consent/consent-tools-integration-tests/src/page-objects Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 1+ import { CDNSettingsBuilder } from '@internal/test-helpers'
12import { Page , Route , Request } from '@playwright/test'
23
34export abstract class BasePage {
@@ -84,27 +85,30 @@ export abstract class BasePage {
8485 }
8586
8687 private async mockCDNSettingsAPI ( ) {
87- const settings = {
88- integrations : {
89- FullStory : {
88+ const cdnSettings = new CDNSettingsBuilder ( )
89+ . addActionDestinationSettings (
90+ {
91+ creationName : 'FullStory' ,
9092 url : 'https://cdn.segment.com/next-integrations/actions/fullstory-plugins/foo.js' ,
9193 consentSettings : {
9294 categories : [ 'FooCategory2' ] ,
9395 } ,
9496 } ,
95- 'Actions Amplitude' : {
97+ {
98+ creationName : 'Actions Amplitude' ,
9699 url : 'https://cdn.segment.com/next-integrations/actions/amplitude-plugins/foo.js' ,
97100 consentSettings : {
98101 categories : [ 'FooCategory1' ] ,
99102 } ,
100- } ,
101- } ,
102- }
103+ }
104+ )
105+ . build ( )
103106
104107 await this . page . route ( '**/settings' , async ( route : Route ) => {
105108 await route . fulfill ( {
106109 status : 200 ,
107- body : JSON . stringify ( settings ) ,
110+ contentType : 'application/json' ,
111+ body : JSON . stringify ( cdnSettings ) ,
108112 } )
109113 } )
110114 }
You can’t perform that action at this time.
0 commit comments