chore(feature-flags): Remove OrderEditing feature flag (#3006)
This commit is contained in:
@@ -1,153 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Claims creates a refund claim 1`] = `
|
||||
Object {
|
||||
"additional_items": Array [],
|
||||
"canceled_at": null,
|
||||
"claim_items": ArrayContaining [
|
||||
ObjectContaining {
|
||||
"item": Any<Object>,
|
||||
"item_id": "test-item",
|
||||
"quantity": 1,
|
||||
},
|
||||
],
|
||||
"created_at": Any<String>,
|
||||
"deleted_at": null,
|
||||
"fulfillment_status": "not_fulfilled",
|
||||
"fulfillments": Array [],
|
||||
"id": StringMatching /\\^claim_\\*/,
|
||||
"idempotency_key": Any<String>,
|
||||
"metadata": null,
|
||||
"no_notification": null,
|
||||
"order_id": Any<String>,
|
||||
"payment_status": "refunded",
|
||||
"refund_amount": 1200,
|
||||
"return_order": null,
|
||||
"shipping_address": Any<Object>,
|
||||
"shipping_address_id": Any<String>,
|
||||
"shipping_methods": Array [],
|
||||
"type": "refund",
|
||||
"updated_at": Any<String>,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`Claims creates a replace claim 1`] = `
|
||||
Object {
|
||||
"additional_items": Array [
|
||||
Object {
|
||||
"adjustments": Array [],
|
||||
"allow_discounts": true,
|
||||
"cart_id": null,
|
||||
"claim_order_id": StringMatching /\\^claim_\\*/,
|
||||
"created_at": Any<String>,
|
||||
"description": "Refined Wooden Chair",
|
||||
"fulfilled_quantity": null,
|
||||
"has_shipping": null,
|
||||
"id": StringMatching /\\^item_\\*/,
|
||||
"is_giftcard": false,
|
||||
"is_return": false,
|
||||
"metadata": Object {},
|
||||
"order_id": null,
|
||||
"quantity": 1,
|
||||
"refundable": 113,
|
||||
"returned_quantity": null,
|
||||
"shipped_quantity": null,
|
||||
"should_merge": true,
|
||||
"swap_id": null,
|
||||
"tax_lines": Array [
|
||||
Object {
|
||||
"code": "default",
|
||||
"created_at": Any<String>,
|
||||
"id": StringMatching /\\^litl_\\*/,
|
||||
"item_id": StringMatching /\\^item_\\*/,
|
||||
"metadata": null,
|
||||
"name": "default",
|
||||
"rate": 12.5,
|
||||
"updated_at": Any<String>,
|
||||
},
|
||||
],
|
||||
"thumbnail": null,
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"unit_price": 100,
|
||||
"updated_at": Any<String>,
|
||||
"variant": Object {
|
||||
"allow_backorder": false,
|
||||
"barcode": null,
|
||||
"created_at": Any<String>,
|
||||
"deleted_at": null,
|
||||
"ean": null,
|
||||
"height": null,
|
||||
"hs_code": null,
|
||||
"id": "test-variant",
|
||||
"inventory_quantity": 9,
|
||||
"length": null,
|
||||
"manage_inventory": true,
|
||||
"material": null,
|
||||
"metadata": null,
|
||||
"mid_code": null,
|
||||
"origin_country": null,
|
||||
"product": Object {
|
||||
"collection_id": null,
|
||||
"created_at": Any<String>,
|
||||
"deleted_at": null,
|
||||
"description": null,
|
||||
"discountable": true,
|
||||
"external_id": null,
|
||||
"handle": null,
|
||||
"height": null,
|
||||
"hs_code": null,
|
||||
"id": "test-product",
|
||||
"is_giftcard": false,
|
||||
"length": null,
|
||||
"material": null,
|
||||
"metadata": null,
|
||||
"mid_code": null,
|
||||
"origin_country": null,
|
||||
"profile_id": StringMatching /\\^sp_\\*/,
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<String>,
|
||||
"weight": null,
|
||||
"width": null,
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<String>,
|
||||
"weight": null,
|
||||
"width": null,
|
||||
},
|
||||
"variant_id": "test-variant",
|
||||
},
|
||||
],
|
||||
"canceled_at": null,
|
||||
"claim_items": ArrayContaining [
|
||||
ObjectContaining {
|
||||
"item": Any<Object>,
|
||||
"item_id": "test-item",
|
||||
"quantity": 1,
|
||||
},
|
||||
],
|
||||
"created_at": Any<String>,
|
||||
"deleted_at": null,
|
||||
"fulfillment_status": "not_fulfilled",
|
||||
"fulfillments": Array [],
|
||||
"id": StringMatching /\\^claim_\\*/,
|
||||
"idempotency_key": Any<String>,
|
||||
"metadata": null,
|
||||
"no_notification": null,
|
||||
"order_id": Any<String>,
|
||||
"payment_status": "na",
|
||||
"refund_amount": null,
|
||||
"return_order": null,
|
||||
"shipping_address": Any<Object>,
|
||||
"shipping_address_id": Any<String>,
|
||||
"shipping_methods": Array [],
|
||||
"type": "replace",
|
||||
"updated_at": Any<String>,
|
||||
}
|
||||
`;
|
||||
@@ -64,23 +64,20 @@ describe("Claims", () => {
|
||||
)
|
||||
|
||||
expect(response.status).toEqual(200)
|
||||
expect(response.data.order.claims[0]).toMatchSnapshot({
|
||||
id: expect.stringMatching(/^claim_*/),
|
||||
order_id: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
created_at: expect.any(String),
|
||||
idempotency_key: expect.any(String),
|
||||
shipping_address_id: expect.any(String),
|
||||
refund_amount: 1200,
|
||||
shipping_address: expect.any(Object),
|
||||
claim_items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
item: expect.any(Object),
|
||||
item_id: "test-item",
|
||||
quantity: 1,
|
||||
}),
|
||||
]),
|
||||
})
|
||||
expect(response.data.order.claims[0]).toEqual(
|
||||
expect.objectContaining({
|
||||
id: expect.stringMatching(/^claim_*/),
|
||||
order_id: expect.any(String),
|
||||
refund_amount: 1200,
|
||||
claim_items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
item: expect.any(Object),
|
||||
item_id: "test-item",
|
||||
quantity: 1,
|
||||
}),
|
||||
]),
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
test("creates a replace claim", async () => {
|
||||
@@ -110,49 +107,33 @@ describe("Claims", () => {
|
||||
)
|
||||
|
||||
expect(response.status).toEqual(200)
|
||||
expect(response.data.order.claims[0]).toMatchSnapshot({
|
||||
id: expect.stringMatching(/^claim_*/),
|
||||
order_id: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
created_at: expect.any(String),
|
||||
idempotency_key: expect.any(String),
|
||||
shipping_address_id: expect.any(String),
|
||||
refund_amount: null,
|
||||
shipping_address: expect.any(Object),
|
||||
additional_items: [
|
||||
{
|
||||
id: expect.stringMatching(/^item_*/),
|
||||
claim_order_id: expect.stringMatching(/^claim_*/),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
variant: {
|
||||
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),
|
||||
},
|
||||
},
|
||||
tax_lines: [
|
||||
{
|
||||
id: expect.stringMatching(/^litl_*/),
|
||||
item_id: expect.stringMatching(/^item_*/),
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
rate: 12.5,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
claim_items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
item: expect.any(Object),
|
||||
item_id: "test-item",
|
||||
quantity: 1,
|
||||
}),
|
||||
]),
|
||||
})
|
||||
expect(response.data.order.claims[0]).toEqual(
|
||||
expect.objectContaining({
|
||||
id: expect.stringMatching(/^claim_*/),
|
||||
order_id: expect.any(String),
|
||||
additional_items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: expect.stringMatching(/^item_*/),
|
||||
claim_order_id: expect.stringMatching(/^claim_*/),
|
||||
variant: expect.objectContaining({ id: "test-variant" }),
|
||||
tax_lines: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: expect.stringMatching(/^litl_*/),
|
||||
item_id: expect.stringMatching(/^item_*/),
|
||||
rate: 12.5,
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
]),
|
||||
claim_items: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
item: expect.any(Object),
|
||||
item_id: "test-item",
|
||||
quantity: 1,
|
||||
}),
|
||||
]),
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
test("creates a replace claim fulfillment", async () => {
|
||||
|
||||
Reference in New Issue
Block a user