chore(feature-flags): Sales Channels enabled by default (#2966)
This commit is contained in:
@@ -14,6 +14,7 @@ const {
|
||||
ShippingProfile,
|
||||
Swap,
|
||||
} = require("@medusajs/medusa")
|
||||
const { simpleSalesChannelFactory } = require("../factories")
|
||||
|
||||
module.exports = async (connection, data = {}) => {
|
||||
const manager = connection.manager
|
||||
@@ -22,6 +23,11 @@ module.exports = async (connection, data = {}) => {
|
||||
type: "default",
|
||||
})
|
||||
|
||||
const salesChannel = await simpleSalesChannelFactory(connection, {
|
||||
id: "test-channel",
|
||||
is_default: true,
|
||||
})
|
||||
|
||||
await manager.insert(Product, {
|
||||
id: "test-product",
|
||||
title: "test product",
|
||||
@@ -29,6 +35,10 @@ module.exports = async (connection, data = {}) => {
|
||||
options: [{ id: "test-option", title: "Size" }],
|
||||
})
|
||||
|
||||
await manager.query(
|
||||
`insert into product_sales_channel values ('test-product', '${salesChannel.id}');`
|
||||
)
|
||||
|
||||
await manager.insert(ProductVariant, {
|
||||
id: "test-variant",
|
||||
title: "test variant",
|
||||
|
||||
Reference in New Issue
Block a user