GitHub

MockMagentoCoreProduct

import { MockMagentoCoreProduct } from '@daffodil/product/driver/magento/testing'
class MockMagentoCoreProduct extends MockMagentoProductPreview implements MagentoProduct {
  __typename: MagentoProductTypeEnum.SimpleProduct
  canonical_url: faker.internet.url()
  meta_title: faker.random.word()
  meta_description: faker.random.words(3)
  stock_status: MagentoProductStockStatusEnum.InStock
  description: {
      __typename: 'ComplexTextValue',
      html: faker.random.words(5)
  }
  short_description: {
      __typename: 'ComplexTextValue',
      html: faker.random.words(3)
  }
  media_gallery_entries: []
}

Properties

Name Type Description
__typename MagentoProductTypeEnum.SimpleProduct
canonical_url faker.internet.url()
meta_title faker.random.word()
meta_description faker.random.words(3)
stock_status MagentoProductStockStatusEnum.InStock
description { __typename: 'ComplexTextValue', html: faker.random.words(5) }
short_description { __typename: 'ComplexTextValue', html: faker.random.words(3) }
media_gallery_entries []