fix(core-flows): shipping options for cart (#9343)
FIXES: CC-536 Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
This commit is contained in:
co-authored by
Frane Polić
parent
74b3385a65
commit
19bc8d7f61
@@ -200,7 +200,7 @@ medusaIntegrationTestRunner({
|
||||
thumbnail: "test-image.png",
|
||||
status: "draft",
|
||||
description: "test-product-description\ntest line 2",
|
||||
options: [
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "size",
|
||||
values: expect.arrayContaining([
|
||||
@@ -220,7 +220,7 @@ medusaIntegrationTestRunner({
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
],
|
||||
]),
|
||||
images: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
url: "test-image.png",
|
||||
@@ -243,12 +243,12 @@ medusaIntegrationTestRunner({
|
||||
collection: expect.objectContaining({
|
||||
id: baseCollection.id,
|
||||
}),
|
||||
variants: [
|
||||
variants: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "Test variant",
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
prices: [
|
||||
prices: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
currency_code: "dkk",
|
||||
amount: 30,
|
||||
@@ -261,21 +261,21 @@ medusaIntegrationTestRunner({
|
||||
currency_code: "usd",
|
||||
amount: 100,
|
||||
}),
|
||||
],
|
||||
options: [
|
||||
]),
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
value: "large",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
value: "green",
|
||||
}),
|
||||
],
|
||||
]),
|
||||
}),
|
||||
expect.objectContaining({
|
||||
title: "Test variant 2",
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
prices: [
|
||||
prices: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
currency_code: "dkk",
|
||||
amount: 50,
|
||||
@@ -288,17 +288,17 @@ medusaIntegrationTestRunner({
|
||||
currency_code: "usd",
|
||||
amount: 200,
|
||||
}),
|
||||
],
|
||||
options: [
|
||||
]),
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
value: "small",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
value: "green",
|
||||
}),
|
||||
],
|
||||
]),
|
||||
}),
|
||||
],
|
||||
]),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
}),
|
||||
@@ -309,7 +309,7 @@ medusaIntegrationTestRunner({
|
||||
thumbnail: "test-image.png",
|
||||
status: "proposed",
|
||||
description: "test-product-description",
|
||||
options: [
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "size",
|
||||
values: expect.arrayContaining([
|
||||
@@ -326,7 +326,7 @@ medusaIntegrationTestRunner({
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
],
|
||||
]),
|
||||
images: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
url: "test-image.png",
|
||||
@@ -344,12 +344,12 @@ medusaIntegrationTestRunner({
|
||||
id: baseType.id,
|
||||
}),
|
||||
collection: null,
|
||||
variants: [
|
||||
variants: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "Test variant",
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
prices: [
|
||||
prices: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
currency_code: "dkk",
|
||||
amount: 30,
|
||||
@@ -362,17 +362,17 @@ medusaIntegrationTestRunner({
|
||||
currency_code: "usd",
|
||||
amount: 100,
|
||||
}),
|
||||
],
|
||||
options: [
|
||||
]),
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
value: "large",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
value: "green",
|
||||
}),
|
||||
],
|
||||
]),
|
||||
}),
|
||||
],
|
||||
]),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
}),
|
||||
@@ -613,7 +613,7 @@ medusaIntegrationTestRunner({
|
||||
thumbnail: "test-image.png",
|
||||
status: "draft",
|
||||
description: "test-product-description",
|
||||
options: [
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "Size",
|
||||
values: expect.arrayContaining([
|
||||
@@ -628,7 +628,7 @@ medusaIntegrationTestRunner({
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
],
|
||||
]),
|
||||
images: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
url: "test-image.png",
|
||||
@@ -645,7 +645,7 @@ medusaIntegrationTestRunner({
|
||||
collection: expect.objectContaining({
|
||||
id: baseCollection.id,
|
||||
}),
|
||||
variants: [
|
||||
variants: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "Test variant",
|
||||
sku: "test-sku-2",
|
||||
@@ -689,7 +689,7 @@ medusaIntegrationTestRunner({
|
||||
barcode: "test-barcode-4",
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
prices: [
|
||||
prices: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
currency_code: "usd",
|
||||
amount: 100,
|
||||
@@ -703,14 +703,14 @@ medusaIntegrationTestRunner({
|
||||
currency_code: "dkk",
|
||||
amount: 30,
|
||||
}),
|
||||
],
|
||||
]),
|
||||
options: [
|
||||
expect.objectContaining({
|
||||
value: "Large",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
]),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
}),
|
||||
@@ -723,7 +723,7 @@ medusaIntegrationTestRunner({
|
||||
status: "draft",
|
||||
description:
|
||||
"Hopper Stripes Bedding, available as duvet cover, pillow sham and sheet.\\n100% organic cotton, soft and crisp to the touch. Made in Portugal.",
|
||||
options: [
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "test-option-1",
|
||||
values: expect.arrayContaining([
|
||||
@@ -740,7 +740,7 @@ medusaIntegrationTestRunner({
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
],
|
||||
]),
|
||||
images: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
url: "test-image.png",
|
||||
@@ -748,14 +748,14 @@ medusaIntegrationTestRunner({
|
||||
]),
|
||||
tags: [],
|
||||
type: null,
|
||||
variants: [
|
||||
variants: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
title: "Test variant",
|
||||
sku: "test-sku-1-1",
|
||||
barcode: "test-barcode-1-1",
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
prices: [
|
||||
prices: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
currency_code: "usd",
|
||||
rules: {
|
||||
@@ -767,17 +767,17 @@ medusaIntegrationTestRunner({
|
||||
currency_code: "usd",
|
||||
amount: 1.1,
|
||||
}),
|
||||
],
|
||||
options: [
|
||||
]),
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
value: "option 1 value red",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
value: "option 2 value 1",
|
||||
}),
|
||||
],
|
||||
]),
|
||||
}),
|
||||
],
|
||||
]),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
}),
|
||||
|
||||
@@ -200,6 +200,7 @@ medusaIntegrationTestRunner({
|
||||
)
|
||||
|
||||
const shippingOptions = resp.data.shipping_options
|
||||
|
||||
expect(shippingOptions).toHaveLength(1)
|
||||
expect(shippingOptions[0]).toEqual(
|
||||
expect.objectContaining({
|
||||
|
||||
Reference in New Issue
Block a user