feat(medusa,types): create promotion flows (#7029)
* chore: create promotion phase * chore: fix specs + minor ui changes * chore: minor fixes * chore: added changeset * address pr reviews * chore: fix spec * Update packages/admin-next/dashboard/src/v2-routes/promotions/common/edit-rules/edit-rules.tsx Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com> * chore: fix specs --------- Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { PromotionType } from "@medusajs/utils"
|
||||
import { createAdminUser } from "../../../../helpers/create-admin-user"
|
||||
import { medusaIntegrationTestRunner } from "medusa-test-utils"
|
||||
import { createAdminUser } from "../../../../helpers/create-admin-user"
|
||||
|
||||
jest.setTimeout(50000)
|
||||
|
||||
@@ -65,7 +65,7 @@ medusaIntegrationTestRunner({
|
||||
target_type: "items",
|
||||
type: "fixed",
|
||||
allocation: "each",
|
||||
value: "100",
|
||||
value: 100,
|
||||
max_quantity: 100,
|
||||
target_rules: [
|
||||
{
|
||||
@@ -144,7 +144,7 @@ medusaIntegrationTestRunner({
|
||||
target_type: "items",
|
||||
type: "fixed",
|
||||
allocation: "each",
|
||||
value: "100",
|
||||
value: 100,
|
||||
max_quantity: 100,
|
||||
target_rules: [
|
||||
{
|
||||
@@ -184,7 +184,7 @@ medusaIntegrationTestRunner({
|
||||
target_type: "items",
|
||||
type: "fixed",
|
||||
allocation: "each",
|
||||
value: "100",
|
||||
value: 100,
|
||||
max_quantity: 100,
|
||||
buy_rules: [
|
||||
{
|
||||
@@ -231,7 +231,7 @@ medusaIntegrationTestRunner({
|
||||
target_type: "items",
|
||||
type: "fixed",
|
||||
allocation: "each",
|
||||
value: "100",
|
||||
value: 100,
|
||||
max_quantity: 100,
|
||||
apply_to_quantity: 1,
|
||||
buy_rules_min_quantity: 1,
|
||||
|
||||
@@ -834,8 +834,8 @@ medusaIntegrationTestRunner({
|
||||
expect(response.data.values.length).toEqual(2)
|
||||
expect(response.data.values).toEqual(
|
||||
expect.arrayContaining([
|
||||
{ label: "Afghan Afghani", value: "afn" },
|
||||
{ label: "Albanian Lek", value: "all" },
|
||||
{ label: "afn", value: "afn" },
|
||||
{ label: "all", value: "all" },
|
||||
])
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user