chore(feature-flags): Sales Channels enabled by default (#2966)
This commit is contained in:
@@ -109,31 +109,20 @@ describe("sales channels", () => {
|
||||
expect(response.status).toEqual(200)
|
||||
expect(response.data.sales_channels).toBeTruthy()
|
||||
expect(response.data.sales_channels.length).toBe(2)
|
||||
expect(response.data).toMatchSnapshot({
|
||||
count: 2,
|
||||
limit: 20,
|
||||
offset: 0,
|
||||
sales_channels: expect.arrayContaining([
|
||||
{
|
||||
id: expect.any(String),
|
||||
name: salesChannel1.name,
|
||||
description: salesChannel1.description,
|
||||
is_disabled: false,
|
||||
deleted_at: null,
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
{
|
||||
id: expect.any(String),
|
||||
name: salesChannel2.name,
|
||||
description: salesChannel2.description,
|
||||
is_disabled: false,
|
||||
deleted_at: null,
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
]),
|
||||
})
|
||||
expect(response.data).toEqual(
|
||||
expect.objectContaining({
|
||||
sales_channels: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
name: salesChannel1.name,
|
||||
description: salesChannel1.description,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
name: salesChannel2.name,
|
||||
description: salesChannel2.description,
|
||||
}),
|
||||
]),
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
it("should list the sales channel using free text search", async () => {
|
||||
@@ -632,7 +621,7 @@ describe("sales channels", () => {
|
||||
relations: ["sales_channels"],
|
||||
})
|
||||
|
||||
expect(attachedProduct.sales_channels.length).toBe(1)
|
||||
expect(attachedProduct.sales_channels.length).toBe(2)
|
||||
expect(attachedProduct.sales_channels).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
@@ -641,6 +630,10 @@ describe("sales channels", () => {
|
||||
description: "test description",
|
||||
is_disabled: false,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: expect.any(String),
|
||||
is_disabled: false,
|
||||
}),
|
||||
])
|
||||
)
|
||||
|
||||
@@ -679,7 +672,8 @@ describe("sales channels", () => {
|
||||
relations: ["sales_channels"],
|
||||
})
|
||||
|
||||
expect(attachedProduct.sales_channels.length).toBe(0)
|
||||
// default sales channel
|
||||
expect(attachedProduct.sales_channels.length).toBe(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -733,7 +727,8 @@ describe("sales channels", () => {
|
||||
relations: ["sales_channels"],
|
||||
})
|
||||
|
||||
expect(attachedProduct.sales_channels.length).toBe(1)
|
||||
// + default sales channel
|
||||
expect(attachedProduct.sales_channels.length).toBe(2)
|
||||
expect(attachedProduct.sales_channels).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
@@ -742,6 +737,10 @@ describe("sales channels", () => {
|
||||
description: "test description",
|
||||
is_disabled: false,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: expect.any(String),
|
||||
is_disabled: false,
|
||||
}),
|
||||
])
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user