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ć authored and GitHub committed 2025-12-01 18:29:15 +01:00
1 parent 0f835381e9
commit 8ddf8b4d76
5 files changed
+35 -4

No files matched your search

@@ -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",
{