feat(core-flows, product): options checks on product create/update (#9171)
**What** - validate that variants are unique with respect to options on product update/create and variant update/create - validate that the product has options upon creation - ensure variants have the same number of option values as the product has options - admin error handling - update tests --- FIXES FRMW-2707 CC-556
This commit is contained in:
@@ -67,10 +67,12 @@ medusaIntegrationTestRunner({
|
||||
"/admin/products",
|
||||
{
|
||||
title: "Test product",
|
||||
options: [{ title: "size", values: ["large", "small"] }],
|
||||
variants: [
|
||||
{
|
||||
title: "Test variant",
|
||||
sku: "test-variant",
|
||||
options: { size: "large" },
|
||||
prices: [
|
||||
{
|
||||
currency_code: "usd",
|
||||
@@ -89,10 +91,12 @@ medusaIntegrationTestRunner({
|
||||
"/admin/products",
|
||||
{
|
||||
title: "Extra product",
|
||||
options: [{ title: "size", values: ["large", "small"] }],
|
||||
variants: [
|
||||
{
|
||||
title: "my variant",
|
||||
sku: "variant-sku",
|
||||
options: { size: "large" },
|
||||
prices: [
|
||||
{
|
||||
currency_code: "usd",
|
||||
|
||||
Reference in New Issue
Block a user