fix: export ProductImage to allow for custom links to add alt text (#12357)

This commit is contained in:
Harminder Virk
2025-05-05 14:24:25 +05:30
committed by GitHub
parent c35e9e5104
commit e4d853185f
6 changed files with 33 additions and 2 deletions
@@ -1161,6 +1161,14 @@ moduleIntegrationTestRunner<IProductModuleService>({
source: Modules.PRODUCT,
action: CommonEvents.DELETED,
}),
composeMessage(ProductEvents.PRODUCT_IMAGE_DELETED, {
data: {
id: [products[0].images[0].id],
},
object: "product_image",
source: Modules.PRODUCT,
action: CommonEvents.DELETED,
}),
composeMessage(ProductEvents.PRODUCT_OPTION_VALUE_DELETED, {
data: {
id: [products[0].options[0].values[0].id],
@@ -55,7 +55,7 @@ moduleIntegrationTestRunner<Service>({
service: ProductModuleService,
}).linkable
expect(Object.keys(linkable)).toHaveLength(8)
expect(Object.keys(linkable)).toHaveLength(9)
expect(Object.keys(linkable)).toEqual(
expect.arrayContaining([
"product",
@@ -66,6 +66,7 @@ moduleIntegrationTestRunner<Service>({
"productTag",
"productCollection",
"productCategory",
"productImage",
])
)
@@ -153,6 +154,15 @@ moduleIntegrationTestRunner<Service>({
field: "productCategory",
},
},
productImage: {
id: {
entity: "ProductImage",
field: "productImage",
linkable: "product_image_id",
primaryKey: "id",
serviceName: "product",
},
},
})
})