feat: Pricing update and refactor product API tests to not rely on internals (#6892)
This PR achieves the following - Remove dependency on internals for seeding the tests (more work left, but major work done) - Adds the workflow for updating variant's price I will do a follow-up PR to further clean up the tests and remove all internal dependencies
This commit is contained in:
@@ -1108,7 +1108,7 @@ export default class ProductModuleService<
|
||||
const productData = await this.productService_.upsertWithReplace(
|
||||
normalizedInput,
|
||||
{
|
||||
relations: ["type", "collection", "images", "tags", "categories"],
|
||||
relations: ["images", "tags", "categories"],
|
||||
},
|
||||
sharedContext
|
||||
)
|
||||
@@ -1164,7 +1164,7 @@ export default class ProductModuleService<
|
||||
const productData = await this.productService_.upsertWithReplace(
|
||||
normalizedInput,
|
||||
{
|
||||
relations: ["type", "collection", "images", "tags", "categories"],
|
||||
relations: ["images", "tags", "categories"],
|
||||
},
|
||||
sharedContext
|
||||
)
|
||||
@@ -1350,6 +1350,10 @@ export default class ProductModuleService<
|
||||
}
|
||||
)
|
||||
|
||||
if (!variantOptions.length) {
|
||||
return variant
|
||||
}
|
||||
|
||||
return {
|
||||
...variant,
|
||||
options: variantOptions,
|
||||
|
||||
Reference in New Issue
Block a user