feat: Create cart with line items (#6449)
**What** - Add support for creating a cart with items - Add endpoint `POST /store/carts/:id/line-items` - Add `CreateCartWorkflow` - Add `AddToCartWorkflow` - Add steps for both workflows **Testing** - Endpoints - Workflows I would still call this a first iteration, as we are missing a few pieces of the full flow, such as payment sessions, discounts, and taxes. Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
@@ -2,10 +2,10 @@ import { useApi } from "../../../environment-helpers/use-api"
|
||||
import { initDb, useDb } from "../../../environment-helpers/use-db"
|
||||
|
||||
import {
|
||||
StepResponse,
|
||||
WorkflowData,
|
||||
createStep,
|
||||
createWorkflow,
|
||||
StepResponse,
|
||||
WorkflowData,
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import { AxiosInstance } from "axios"
|
||||
import path from "path"
|
||||
@@ -200,9 +200,9 @@ export const workflowEngineTestSuite = (env, extraParams = {}) => {
|
||||
data: expect.objectContaining({
|
||||
invoke: {
|
||||
"my-step": {
|
||||
__type: "WorkflowWorkflowData",
|
||||
__type: "Symbol(WorkflowWorkflowData)",
|
||||
output: {
|
||||
__type: "WorkflowStepResponse",
|
||||
__type: "Symbol(WorkflowStepResponse)",
|
||||
output: {
|
||||
result: "abc",
|
||||
},
|
||||
@@ -248,7 +248,7 @@ export const workflowEngineTestSuite = (env, extraParams = {}) => {
|
||||
data: expect.objectContaining({
|
||||
invoke: expect.objectContaining({
|
||||
"my-step-async": {
|
||||
__type: "WorkflowStepResponse",
|
||||
__type: "Symbol(WorkflowStepResponse)",
|
||||
output: {
|
||||
all: "good",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user