refactor: remove usage of inventory_quantity from the codebase (#7323)
This commit is contained in:
1 parent
9ca302d33f
commit
a502222582
18 files changed
+159
-118
No files matched your search
@@ -42,13 +42,11 @@ export const variantsData = [
|
||||
title: "variant title",
|
||||
sku: "sku 1",
|
||||
product: { id: productsData[0].id },
|
||||
inventory_quantity: 10,
|
||||
},
|
||||
{
|
||||
id: "test-2",
|
||||
title: "variant title",
|
||||
sku: "sku 2",
|
||||
product: { id: productsData[1].id },
|
||||
inventory_quantity: 10,
|
||||
},
|
||||
]
|
||||
@@ -8,7 +8,6 @@ export const buildProductVariantOnlyData = ({
|
||||
ean,
|
||||
upc,
|
||||
allow_backorder,
|
||||
inventory_quantity,
|
||||
manage_inventory,
|
||||
hs_code,
|
||||
origin_country,
|
||||
@@ -28,7 +27,6 @@ export const buildProductVariantOnlyData = ({
|
||||
ean,
|
||||
upc,
|
||||
allow_backorder,
|
||||
inventory_quantity,
|
||||
manage_inventory,
|
||||
hs_code,
|
||||
origin_country,
|
||||
|
||||
-2
@@ -44,7 +44,6 @@ moduleIntegrationTestRunner({
|
||||
variantOne = await service.createVariants({
|
||||
id: "test-1",
|
||||
title: "variant 1",
|
||||
inventory_quantity: 10,
|
||||
product_id: productOne.id,
|
||||
options: { size: "large" },
|
||||
})
|
||||
@@ -52,7 +51,6 @@ moduleIntegrationTestRunner({
|
||||
variantTwo = await service.createVariants({
|
||||
id: "test-2",
|
||||
title: "variant",
|
||||
inventory_quantity: 10,
|
||||
product_id: productTwo.id,
|
||||
})
|
||||
})
|
||||
|
||||
-5
@@ -119,7 +119,6 @@ moduleIntegrationTestRunner({
|
||||
{
|
||||
id: "variant-1",
|
||||
title: "variant 1",
|
||||
inventory_quantity: 10,
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -145,12 +144,10 @@ moduleIntegrationTestRunner({
|
||||
{
|
||||
id: "variant-2",
|
||||
title: "variant 2",
|
||||
inventory_quantity: 10,
|
||||
},
|
||||
{
|
||||
id: "variant-3",
|
||||
title: "variant 3",
|
||||
inventory_quantity: 10,
|
||||
options: {
|
||||
size: "small",
|
||||
color: "red",
|
||||
@@ -258,7 +255,6 @@ moduleIntegrationTestRunner({
|
||||
sku: createdVariant.sku,
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
inventory_quantity: 100,
|
||||
variant_rank: 0,
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
@@ -615,7 +611,6 @@ moduleIntegrationTestRunner({
|
||||
sku: data.variants[0].sku,
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
inventory_quantity: 100,
|
||||
variant_rank: 0,
|
||||
options: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
|
||||
@@ -48,14 +48,12 @@ moduleIntegrationTestRunner({
|
||||
variantOne = testManager.create(ProductVariant, {
|
||||
id: productVariantTestOne,
|
||||
title: "variant 1",
|
||||
inventory_quantity: 10,
|
||||
product: productOne,
|
||||
})
|
||||
|
||||
variantTwo = testManager.create(ProductVariant, {
|
||||
id: "test-2",
|
||||
title: "variant",
|
||||
inventory_quantity: 10,
|
||||
product: productOne,
|
||||
})
|
||||
|
||||
@@ -71,7 +69,6 @@ moduleIntegrationTestRunner({
|
||||
expect.objectContaining({
|
||||
id: variantOne.id,
|
||||
title: "variant 1",
|
||||
inventory_quantity: "10",
|
||||
}),
|
||||
])
|
||||
})
|
||||
@@ -230,7 +227,6 @@ moduleIntegrationTestRunner({
|
||||
id: expect.any(String),
|
||||
title: data.title,
|
||||
sku: data.sku,
|
||||
inventory_quantity: 100,
|
||||
allow_backorder: false,
|
||||
manage_inventory: true,
|
||||
variant_rank: 0,
|
||||
@@ -261,7 +257,6 @@ moduleIntegrationTestRunner({
|
||||
variantOne = testManager.create(ProductVariant, {
|
||||
id: productVariantTestOne,
|
||||
title: "variant 1",
|
||||
inventory_quantity: 10,
|
||||
product: productOne,
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user