feat(core-flows, types): update shipping methods upon cart ops (#10382)
* feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context * chore: add test for shipping options returning free shipping * feat(core-flows, types): update shipping methods upon cart ops * chore: fix specs * chore: fix bugs + specs * Update update-shipping-methods.ts Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> * Update mutations.ts Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> * chore: undo refresh changes * chore: merge with latest * chore: address PR comments * chore: fix conflicts * chore: fix specs * chore: address reviews --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Oli Juhl
parent
f95c4e240c
commit
9e797dc3d2
@@ -152,12 +152,12 @@ medusaIntegrationTestRunner({
|
||||
amount: 500,
|
||||
rules: [
|
||||
{
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "gte",
|
||||
value: 100,
|
||||
},
|
||||
{
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "lte",
|
||||
value: 200,
|
||||
},
|
||||
@@ -220,12 +220,12 @@ medusaIntegrationTestRunner({
|
||||
rules_count: 2,
|
||||
price_rules: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "gte",
|
||||
value: "100",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "lte",
|
||||
value: "200",
|
||||
}),
|
||||
@@ -329,7 +329,7 @@ medusaIntegrationTestRunner({
|
||||
amount: 500,
|
||||
rules: [
|
||||
{
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "gt",
|
||||
value: 200,
|
||||
},
|
||||
@@ -380,7 +380,7 @@ medusaIntegrationTestRunner({
|
||||
rules_count: 2,
|
||||
price_rules: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "gt",
|
||||
value: "200",
|
||||
}),
|
||||
@@ -460,7 +460,7 @@ medusaIntegrationTestRunner({
|
||||
amount: 500,
|
||||
rules: [
|
||||
{
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "not_whitelisted",
|
||||
value: 100,
|
||||
},
|
||||
@@ -498,7 +498,7 @@ medusaIntegrationTestRunner({
|
||||
amount: 500,
|
||||
rules: [
|
||||
{
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "gt",
|
||||
value: "string",
|
||||
},
|
||||
@@ -628,7 +628,7 @@ medusaIntegrationTestRunner({
|
||||
amount: 5,
|
||||
rules: [
|
||||
{
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "gt",
|
||||
value: 200,
|
||||
},
|
||||
@@ -704,7 +704,7 @@ medusaIntegrationTestRunner({
|
||||
amount: 5,
|
||||
price_rules: [
|
||||
expect.objectContaining({
|
||||
attribute: "total",
|
||||
attribute: "item_total",
|
||||
operator: "gt",
|
||||
value: "200",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user