chore(feature-flags): Remove OrderEditing feature flag (#3006)
This commit is contained in:
committed by
GitHub
parent
d2c692aa96
commit
9e3beaf531
@@ -81,67 +81,50 @@ describe("/store/carts", () => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
|
||||
expect(response.data).toMatchSnapshot({
|
||||
swap: {
|
||||
id: expect.stringMatching(/^swap_*/),
|
||||
idempotency_key: expect.any(String),
|
||||
additional_items: [
|
||||
{
|
||||
id: expect.stringMatching(/^item_*/),
|
||||
cart_id: expect.stringMatching(/^cart_*/),
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
variant: {
|
||||
id: "test-variant-2",
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
product: {
|
||||
profile_id: expect.stringMatching(/^sp_*/),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
},
|
||||
quantity: 1,
|
||||
variant_id: "test-variant-2",
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
],
|
||||
order: {
|
||||
id: "test-order",
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
cart_id: expect.stringMatching(/^cart_*/),
|
||||
cart: {
|
||||
id: expect.stringMatching(/^cart_*/),
|
||||
sales_channel_id: expect.any(String),
|
||||
billing_address_id: "test-billing-address",
|
||||
type: "swap",
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
shipping_address_id: "test-shipping-address",
|
||||
metadata: {
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
},
|
||||
},
|
||||
return_order: {
|
||||
id: expect.stringMatching(/^ret_*/),
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
refund_amount: 7200,
|
||||
items: [
|
||||
{
|
||||
item_id: "test-item",
|
||||
expect(response.data).toEqual(
|
||||
expect.objectContaining({
|
||||
swap: expect.objectContaining({
|
||||
id: expect.stringMatching(/^swap_*/),
|
||||
additional_items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: expect.stringMatching(/^item_*/),
|
||||
cart_id: expect.stringMatching(/^cart_*/),
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
variant: expect.objectContaining({
|
||||
id: "test-variant-2",
|
||||
}),
|
||||
quantity: 1,
|
||||
return_id: expect.stringMatching(/^ret_*/),
|
||||
},
|
||||
],
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
})
|
||||
variant_id: "test-variant-2",
|
||||
}),
|
||||
]),
|
||||
order: expect.objectContaining({
|
||||
id: "test-order",
|
||||
}),
|
||||
cart_id: expect.stringMatching(/^cart_*/),
|
||||
cart: expect.objectContaining({
|
||||
id: expect.stringMatching(/^cart_*/),
|
||||
billing_address_id: "test-billing-address",
|
||||
type: "swap",
|
||||
shipping_address_id: "test-shipping-address",
|
||||
metadata: expect.objectContaining({
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
}),
|
||||
}),
|
||||
return_order: expect.objectContaining({
|
||||
id: expect.stringMatching(/^ret_*/),
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
refund_amount: 7200,
|
||||
items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
item_id: "test-item",
|
||||
quantity: 1,
|
||||
return_id: expect.stringMatching(/^ret_*/),
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
}),
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
it("swap with return shipping", async () => {
|
||||
@@ -168,76 +151,54 @@ describe("/store/carts", () => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
|
||||
expect(response.data).toMatchSnapshot({
|
||||
swap: {
|
||||
expect(response.data).toEqual({
|
||||
swap: expect.objectContaining({
|
||||
id: expect.stringMatching(/^swap_*/),
|
||||
idempotency_key: expect.any(String),
|
||||
additional_items: [
|
||||
{
|
||||
additional_items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: expect.stringMatching(/^item_*/),
|
||||
cart_id: expect.stringMatching(/^cart_*/),
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
variant: {
|
||||
variant: expect.objectContaining({
|
||||
id: "test-variant-2",
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
product: {
|
||||
profile_id: expect.stringMatching(/^sp_*/),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
},
|
||||
}),
|
||||
quantity: 1,
|
||||
variant_id: "test-variant-2",
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
],
|
||||
order: {
|
||||
}),
|
||||
]),
|
||||
order: expect.objectContaining({
|
||||
id: "test-order",
|
||||
display_id: expect.any(Number),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
}),
|
||||
cart_id: expect.stringMatching(/^cart_*/),
|
||||
cart: {
|
||||
cart: expect.objectContaining({
|
||||
id: expect.stringMatching(/^cart_*/),
|
||||
sales_channel_id: expect.any(String),
|
||||
billing_address_id: "test-billing-address",
|
||||
shipping_address_id: "test-shipping-address",
|
||||
type: "swap",
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
metadata: {
|
||||
metadata: expect.objectContaining({
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
},
|
||||
},
|
||||
return_order: {
|
||||
}),
|
||||
}),
|
||||
return_order: expect.objectContaining({
|
||||
id: expect.stringMatching(/^ret_*/),
|
||||
swap_id: expect.stringMatching(/^swap_*/),
|
||||
refund_amount: 6200,
|
||||
shipping_method: {
|
||||
shipping_method: expect.objectContaining({
|
||||
id: expect.stringMatching(/^sm_*/),
|
||||
return_id: expect.stringMatching(/^ret_*/),
|
||||
shipping_option: {
|
||||
shipping_option: expect.objectContaining({
|
||||
profile_id: expect.stringMatching(/^sp_*/),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
},
|
||||
items: [
|
||||
{
|
||||
}),
|
||||
}),
|
||||
items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
item_id: "test-item",
|
||||
quantity: 1,
|
||||
return_id: expect.stringMatching(/^ret_*/),
|
||||
},
|
||||
],
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
},
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
}),
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user