From 610e79f8a7a9e202934d52352f367d92343cf3a1 Mon Sep 17 00:00:00 2001 From: arshiya-moengage Date: Wed, 13 May 2026 12:47:32 +0530 Subject: [PATCH 1/2] test data fix --- .../src/__tests__/PayloadBuilder.test.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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" } } From 4f4f065e3d480d94ed3527f46dff7ca466a21892 Mon Sep 17 00:00:00 2001 From: arshiya-moengage Date: Wed, 13 May 2026 12:52:40 +0530 Subject: [PATCH 2/2] update dependencies versions in sample app --- SampleApp/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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",