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:
@@ -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",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user