diff --git a/SampleApp/package.json b/SampleApp/package.json index 31e59fba..4035bece 100644 --- a/SampleApp/package.json +++ b/SampleApp/package.json @@ -20,10 +20,10 @@ "react-native": "^0.76.1", "react-native-alertbox": "^0.2.11", "react-native-elements": "^3.4.3", - "react-native-moengage": "^11.0.0", - "react-native-moengage-cards": "^5.0.0", - "react-native-moengage-geofence": "^6.0.0", - "react-native-moengage-inbox": "^5.0.0", + "react-native-moengage": "^12.0.0", + "react-native-moengage-cards": "^6.0.0", + "react-native-moengage-geofence": "^7.0.0", + "react-native-moengage-inbox": "^6.0.0", "react-native-moengage-personalize": "^1.0.0", "react-native-render-html": "^6.3.4", "react-native-safe-area-context": "^4.14.0", diff --git a/sdk/personalize/src/__tests__/PayloadBuilder.test.ts b/sdk/personalize/src/__tests__/PayloadBuilder.test.ts index bc3bcdbc..e4bdd000 100644 --- a/sdk/personalize/src/__tests__/PayloadBuilder.test.ts +++ b/sdk/personalize/src/__tests__/PayloadBuilder.test.ts @@ -82,16 +82,16 @@ describe("PayloadBuilder", () => { accountMeta: { appId: APP_ID }, data: { experiences: [ - { experienceKey: "exp_a", payload: { payloadKey: "payloadValue" }, experienceContext: { contextKey: "contextValue" } }, - { experienceKey: "exp_b", payload: { payloadKey: "payloadValue" }, experienceContext: { contextKey: "contextValue" } } + { experienceKey: "exp_a", payload: { payloadKey: "payloadValue" }, experienceContext: { contextKey: "contextValue" }, source: "NETWORK" }, + { experienceKey: "exp_b", payload: { payloadKey: "payloadValue" }, experienceContext: { contextKey: "contextValue" }, source: "NETWORK" } ] } }); }); - it("does NOT include 'source' in serialized campaign (wire contract)", () => { + it("does includes 'source' in serialized campaign (wire contract)", () => { const json = JSON.parse(PayloadBuilder.buildExperiencesShownPayload(APP_ID, [makeCampaign()])); - expect(json.data.experiences[0]).not.toHaveProperty("source"); + expect(json.data.experiences[0]).toHaveProperty("source"); }); }); @@ -104,7 +104,8 @@ describe("PayloadBuilder", () => { experience: { experienceKey: "exp_x", payload: { payloadKey: "payloadValue" }, - experienceContext: { contextKey: "contextValue" } + experienceContext: { contextKey: "contextValue" }, + source: "NETWORK" } } }); @@ -135,7 +136,8 @@ describe("PayloadBuilder", () => { experience: { experienceKey: "exp_o", payload: { payloadKey: "payloadValue" }, - experienceContext: { contextKey: "contextValue" } + experienceContext: { contextKey: "contextValue" }, + source: "NETWORK" }, offeringPayload: { sku: "123" } }