fix(promotion): check currency when computing actions for promotions (#13084)

* fix(promotion): check currency when computing actions for promotions

* chore: fix tests

* chore: fix more specs
This commit is contained in:
Riqwan Thamir
2025-07-31 11:41:07 +02:00
committed by GitHub
parent 54a74b0215
commit 75320e744f
12 changed files with 152 additions and 69 deletions
@@ -11,7 +11,7 @@ export const defaultCampaignsData = [
budget: {
type: CampaignBudgetType.SPEND,
limit: 1000,
currency_code: "USD",
currency_code: "usd",
used: 0,
},
},
@@ -25,7 +25,7 @@ export const defaultCampaignsData = [
budget: {
type: CampaignBudgetType.USAGE,
limit: 1000,
currency_code: "USD",
currency_code: "usd",
used: 0,
},
},
@@ -7,7 +7,7 @@ export const defaultPromotionsData: CreatePromotionDTO[] = [
code: "PROMOTION_1",
type: PromotionType.STANDARD,
application_method: {
currency_code: "USD",
currency_code: "usd",
target_type: "items",
type: "fixed",
allocation: "across",
@@ -19,7 +19,7 @@ export const defaultPromotionsData: CreatePromotionDTO[] = [
code: "PROMOTION_2",
type: PromotionType.STANDARD,
application_method: {
currency_code: "USD",
currency_code: "usd",
target_type: "items",
type: "fixed",
allocation: "across",
@@ -59,7 +59,7 @@ export async function createDefaultPromotion(
campaign_id: "campaign-id-1",
...promotion,
application_method: {
currency_code: "USD",
currency_code: "usd",
target_type: "items",
type: "fixed",
allocation: "across",