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:
@@ -47,6 +47,10 @@ export const remapProduct = (p: ProductDTO) => {
|
||||
}
|
||||
|
||||
export const remapVariant = (v: ProductVariantDTO) => {
|
||||
if (!v) {
|
||||
return v
|
||||
}
|
||||
|
||||
return {
|
||||
...v,
|
||||
prices: (v as any).price_set?.prices?.map((price) => ({
|
||||
|
||||
@@ -646,7 +646,8 @@ export class AdminPostProductsProductOptionsOptionReq {
|
||||
// eslint-disable-next-line max-len
|
||||
export class ProductVariantReq extends AdminPostProductsProductVariantsVariantReq {
|
||||
@IsString()
|
||||
id: string
|
||||
@IsOptional()
|
||||
id?: string
|
||||
}
|
||||
|
||||
export class ProductTagReq {
|
||||
|
||||
Reference in New Issue
Block a user