The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update rewards tests (#3027)
Kiran K1aafd199d271
diff --git a/apps/web/tests/rewards/lead-reward.test.ts b/apps/web/tests/rewards/lead-reward.test.tsindex 990167233e..95456359ec 100644--- a/apps/web/tests/rewards/lead-reward.test.ts+++ b/apps/web/tests/rewards/lead-reward.test.ts@@ -13,7 +13,7 @@ describe.concurrent("Lead rewards", async () => {const h = new IntegrationHarness();const { http } = await h.init();- test("when {Partner} {Country} is {US}", async () => {+ test("when customer country is US and partner country is US", async () => {// Track the clickconst clickResponse = await http.post<{ clickId: string }>({path: "/track/click",@@ -47,11 +47,11 @@ describe.concurrent("Lead rewards", async () => {await verifyCommission({http,customerExternalId: customer.externalId,- expectedEarnings: E2E_LEAD_REWARD.modifiers[0].amountInCents,+ expectedEarnings: E2E_LEAD_REWARD.modifiers[1].amountInCents,});});- test("when {Partner} {Country} is not {US}", async () => {+ test("when customer country is US and partner country is not US", async () => {// Track the clickconst clickResponse = await http.post<{ clickId: string }>({path: "/track/click",@@ -85,7 +85,7 @@ describe.concurrent("Lead rewards", async () => {await verifyCommission({http,customerExternalId: customer.externalId,- expectedEarnings: E2E_LEAD_REWARD.amountInCents,+ expectedEarnings: E2E_LEAD_REWARD.modifiers[0].amountInCents,});});});diff --git a/apps/web/tests/utils/resource.ts b/apps/web/tests/utils/resource.tsindex 6aefc236eb..2114f8b245 100644--- a/apps/web/tests/utils/resource.ts+++ b/apps/web/tests/utils/resource.ts@@ -115,7 +115,7 @@ export const E2E_LEAD_REWARD = {conditions: [{value: "US",- entity: "partner",+ entity: "customer",operator: "equals_to",attribute: "country",},@@ -129,13 +129,13 @@ export const E2E_LEAD_REWARD = {conditions: [{value: "US",- entity: "customer",+ entity: "partner",operator: "equals_to",attribute: "country",},],- maxDuration: null,- amountInCents: 400,+ maxDuration: 0,+ amountInCents: 300,},],};