GitHub

MockMagentoBundledProductItemOption

class

import { MockMagentoBundledProductItemOption } from '@daffodil/product-composite/driver/magento/testing'

class MockMagentoBundledProductItemOption implements MagentoBundledProductItemOption {
  uid: faker.string.uuid() = faker.string.uuid()
  label: faker.lorem.word() = faker.lorem.word()
  quantity: faker.number.int({ min: 1, max: 20 }) = faker.number.int({ min: 1, max: 20 })
  is_default: faker.datatype.boolean() = faker.datatype.boolean()
  position: faker.number.int({ min: 1, max: 10 }) = faker.number.int({ min: 1, max: 10 })
  product: MagentoSimpleProduct = this.createProduct()

  protected createProduct(): MagentoSimpleProduct
}

() Methods