chore: Merge master to develop (#3653)
This commit is contained in:
committed by
GitHub
parent
b2e2eddcea
commit
809ab2e0eb
@@ -604,13 +604,22 @@ describe("/store/carts", () => {
|
||||
.catch((err) => console.log(err))
|
||||
|
||||
expect(response.data.cart.items.length).toEqual(2)
|
||||
|
||||
const item1 = response.data.cart.items.find((i) => i.id === "test-li")
|
||||
expect(item1.adjustments).toHaveLength(1)
|
||||
|
||||
const item2 = response.data.cart.items.find((i) => i.id !== "test-li")
|
||||
expect(item2.adjustments).toHaveLength(1)
|
||||
|
||||
expect(item1.adjustments[0].amount).toBeCloseTo(17, 0)
|
||||
expect(item2.adjustments[0].amount).toBeCloseTo(168, 0)
|
||||
|
||||
expect(response.data.cart.items).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
adjustments: [
|
||||
expect.objectContaining({
|
||||
item_id: "test-li",
|
||||
amount: 17,
|
||||
discount_id: "medusa-185",
|
||||
}),
|
||||
],
|
||||
@@ -618,7 +627,6 @@ describe("/store/carts", () => {
|
||||
expect.objectContaining({
|
||||
adjustments: [
|
||||
expect.objectContaining({
|
||||
amount: 168,
|
||||
discount_id: "medusa-185",
|
||||
}),
|
||||
],
|
||||
@@ -663,14 +671,23 @@ describe("/store/carts", () => {
|
||||
.catch((err) => console.log(err))
|
||||
|
||||
expect(response.data.cart.items.length).toEqual(2)
|
||||
|
||||
const item1 = response.data.cart.items.find((i) => i.id === "test-li")
|
||||
expect(item1.adjustments).toHaveLength(1)
|
||||
|
||||
const item2 = response.data.cart.items.find(
|
||||
(i) => i.id === "line-item-2"
|
||||
)
|
||||
expect(item2.adjustments).toHaveLength(1)
|
||||
|
||||
expect(response.data.cart.items).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
adjustments: [
|
||||
expect.objectContaining({
|
||||
item_id: "test-li",
|
||||
amount: 9.25,
|
||||
discount_id: "medusa-185",
|
||||
amount: 9,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
@@ -678,7 +695,7 @@ describe("/store/carts", () => {
|
||||
adjustments: [
|
||||
expect.objectContaining({
|
||||
item_id: "line-item-2",
|
||||
amount: 176,
|
||||
amount: 175.75,
|
||||
discount_id: "medusa-185",
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -168,6 +168,7 @@ describe("/store/carts", () => {
|
||||
// fields
|
||||
"status",
|
||||
"email",
|
||||
|
||||
// relations
|
||||
"shipping_address",
|
||||
"fulfillments",
|
||||
@@ -177,7 +178,8 @@ describe("/store/carts", () => {
|
||||
"customer",
|
||||
"payments",
|
||||
"region",
|
||||
// default
|
||||
|
||||
// totals
|
||||
"shipping_total",
|
||||
"discount_total",
|
||||
"tax_total",
|
||||
@@ -199,6 +201,7 @@ describe("/store/carts", () => {
|
||||
expect(Object.keys(response.data.order)).toEqual([
|
||||
// fields
|
||||
"status",
|
||||
|
||||
// default relations
|
||||
"shipping_address",
|
||||
"fulfillments",
|
||||
@@ -208,7 +211,8 @@ describe("/store/carts", () => {
|
||||
"customer",
|
||||
"payments",
|
||||
"region",
|
||||
// default
|
||||
|
||||
// totals
|
||||
"shipping_total",
|
||||
"discount_total",
|
||||
"tax_total",
|
||||
@@ -232,9 +236,11 @@ describe("/store/carts", () => {
|
||||
expect(Object.keys(response.data.order)).toEqual([
|
||||
// fields
|
||||
"status",
|
||||
|
||||
// selected relations
|
||||
"billing_address",
|
||||
// default
|
||||
|
||||
// totals
|
||||
"shipping_total",
|
||||
"discount_total",
|
||||
"tax_total",
|
||||
|
||||
Reference in New Issue
Block a user