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:
Stevche Radevski
2024-04-01 09:33:52 +00:00
committed by GitHub
parent fe1d3a4a78
commit 585818eaf8
10 changed files with 658 additions and 694 deletions
@@ -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,