chore(feature-flags): Sales Channels enabled by default (#2966)
This commit is contained in:
@@ -107,6 +107,7 @@ Object {
|
||||
"object": "order",
|
||||
"payment_status": "captured",
|
||||
"region_id": "test-region",
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_2": null,
|
||||
@@ -260,6 +261,7 @@ Object {
|
||||
"object": "order",
|
||||
"payment_status": "captured",
|
||||
"region_id": "test-region",
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_2": null,
|
||||
@@ -579,6 +581,7 @@ Object {
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_2": null,
|
||||
@@ -897,6 +900,7 @@ Object {
|
||||
},
|
||||
"region_id": "test-region",
|
||||
"returns": Array [],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_2": null,
|
||||
@@ -1149,6 +1153,7 @@ Object {
|
||||
},
|
||||
"region_id": "test-region",
|
||||
"returns": Array [],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_2": null,
|
||||
@@ -1400,6 +1405,7 @@ Object {
|
||||
},
|
||||
"region_id": "test-region",
|
||||
"returns": Array [],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_2": null,
|
||||
@@ -1754,6 +1760,7 @@ Object {
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_2": null,
|
||||
@@ -2168,6 +2175,7 @@ Object {
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
"region_id": "test-region",
|
||||
"sales_channel_id": null,
|
||||
"shipping_address_id": Any<String>,
|
||||
"status": "pending",
|
||||
"swaps": Array [
|
||||
|
||||
@@ -41,7 +41,6 @@ describe("medusa-plugin-sendgrid", () => {
|
||||
const db = useDb()
|
||||
await db.shutdown()
|
||||
express.close()
|
||||
// medusaProcess.kill()
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
@@ -72,6 +71,7 @@ describe("medusa-plugin-sendgrid", () => {
|
||||
date: expect.any(String),
|
||||
id: expect.any(String),
|
||||
display_id: expect.any(Number),
|
||||
sales_channel_id: null,
|
||||
created_at: expect.any(Date),
|
||||
canceled_at: expect.any(Date),
|
||||
updated_at: expect.any(Date),
|
||||
@@ -678,6 +678,7 @@ describe("medusa-plugin-sendgrid", () => {
|
||||
items: [{ order_id: expect.any(String), ...itemSnap }],
|
||||
customer_id: expect.any(String),
|
||||
shipping_address_id: expect.any(String),
|
||||
sales_channel_id: null,
|
||||
swaps: [swapSnap],
|
||||
region: {
|
||||
id: expect.any(String),
|
||||
@@ -725,6 +726,7 @@ describe("medusa-plugin-sendgrid", () => {
|
||||
})
|
||||
|
||||
test("swap created data", async () => {
|
||||
await simpleStoreFactory(dbConnection)
|
||||
await adminSeeder(dbConnection)
|
||||
|
||||
const order = await createReturnableOrder(dbConnection)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Connection } from "typeorm"
|
||||
import { SalesChannel, Store } from "@medusajs/medusa"
|
||||
import faker from "faker"
|
||||
import { Store } from "@medusajs/medusa"
|
||||
import { Connection } from "typeorm"
|
||||
|
||||
export type StoreFactoryData = {
|
||||
swap_link_template?: string
|
||||
@@ -20,5 +20,14 @@ export const simpleStoreFactory = async (
|
||||
|
||||
store.swap_link_template = data.swap_link_template ?? "something/{cart_id}"
|
||||
|
||||
return await manager.save(store)
|
||||
await manager.insert(SalesChannel, {
|
||||
id: "test-channel",
|
||||
name: "Default"
|
||||
})
|
||||
|
||||
const storeToSave = await manager.save(store)
|
||||
|
||||
await manager.query(`update store set default_sales_channel_id = 'test-channel' where id = '${storeToSave!.id}'`)
|
||||
|
||||
return storeToSave!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user