fix: skip promotion usage limit checks on edit flows (#14176)

* fix: skip promotion usage limit checks on edit flows

* feat: add test check
This commit is contained in:
Frane Polić
2025-12-01 18:29:15 +01:00
committed by GitHub
parent 0f835381e9
commit 8ddf8b4d76
5 changed files with 35 additions and 4 deletions

View File

@@ -1437,6 +1437,16 @@ medusaIntegrationTestRunner({
adminHeaders
)
const promotionModule = getContainer().resolve(Modules.PROMOTION)
// check that adjustments are computed for promotions that exceeded usage limit (we ignore usage limits on edit flows)
// @ts-ignore
await promotionModule.updatePromotions({
id: appliedPromotion.id,
limit: 1,
used: 1,
})
let result = await api.post(
"/admin/exchanges",
{