Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Feb 3, 2025
2 parents e359a4a + 3d2fb47 commit abec433
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions packages/Webkul/Shop/tests/Feature/Checkout/CheckoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,6 @@
],
])
->assertOk()
->assertJsonPath('data.payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('data.payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('data.payment_methods.0.description', 'PayPal')
->assertJsonPath('data.payment_methods.0.sort', 0)
->assertJsonPath('data.payment_methods.1.method', 'moneytransfer')
->assertJsonPath('data.payment_methods.1.method_title', 'Money Transfer')
->assertJsonPath('data.payment_methods.1.description', 'Money Transfer')
Expand All @@ -468,6 +464,10 @@
->assertJsonPath('data.payment_methods.2.method_title', 'PayPal Standard')
->assertJsonPath('data.payment_methods.2.description', 'PayPal Standard')
->assertJsonPath('data.payment_methods.2.sort', 3)
->assertJsonPath('data.payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('data.payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('data.payment_methods.0.description', 'PayPal')
->assertJsonPath('data.payment_methods.0.sort', 4)
->assertJsonPath('redirect', false);

$this->assertModelWise([
Expand Down Expand Up @@ -784,10 +784,6 @@
],
])
->assertOk()
->assertJsonPath('data.payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('data.payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('data.payment_methods.0.description', 'PayPal')
->assertJsonPath('data.payment_methods.0.sort', 0)
->assertJsonPath('data.payment_methods.1.method', 'moneytransfer')
->assertJsonPath('data.payment_methods.1.method_title', 'Money Transfer')
->assertJsonPath('data.payment_methods.1.description', 'Money Transfer')
Expand All @@ -796,6 +792,10 @@
->assertJsonPath('data.payment_methods.2.method_title', 'PayPal Standard')
->assertJsonPath('data.payment_methods.2.description', 'PayPal Standard')
->assertJsonPath('data.payment_methods.2.sort', 3)
->assertJsonPath('data.payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('data.payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('data.payment_methods.0.description', 'PayPal')
->assertJsonPath('data.payment_methods.0.sort', 4)
->assertJsonPath('redirect', false);

$this->assertModelWise([
Expand Down Expand Up @@ -1170,10 +1170,6 @@
'shipping_method' => 'free_free',
])
->assertOk()
->assertJsonPath('payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('payment_methods.0.description', 'PayPal')
->assertJsonPath('payment_methods.0.sort', 0)
->assertJsonPath('payment_methods.1.method', 'cashondelivery')
->assertJsonPath('payment_methods.1.method_title', 'Cash On Delivery')
->assertJsonPath('payment_methods.1.description', 'Cash On Delivery')
Expand All @@ -1185,7 +1181,11 @@
->assertJsonPath('payment_methods.3.method', 'paypal_standard')
->assertJsonPath('payment_methods.3.method_title', 'PayPal Standard')
->assertJsonPath('payment_methods.3.description', 'PayPal Standard')
->assertJsonPath('payment_methods.3.sort', 3);
->assertJsonPath('payment_methods.3.sort', 3)
->assertJsonPath('payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('payment_methods.0.description', 'PayPal')
->assertJsonPath('payment_methods.0.sort', 4);
});

it('should store the shipping method for customer', function () {
Expand Down Expand Up @@ -1260,10 +1260,6 @@
'shipping_method' => 'free_free',
])
->assertOk()
->assertJsonPath('payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('payment_methods.0.description', 'PayPal')
->assertJsonPath('payment_methods.0.sort', 0)
->assertJsonPath('payment_methods.1.method', 'cashondelivery')
->assertJsonPath('payment_methods.1.method_title', 'Cash On Delivery')
->assertJsonPath('payment_methods.1.description', 'Cash On Delivery')
Expand All @@ -1275,7 +1271,11 @@
->assertJsonPath('payment_methods.3.method', 'paypal_standard')
->assertJsonPath('payment_methods.3.method_title', 'PayPal Standard')
->assertJsonPath('payment_methods.3.description', 'PayPal Standard')
->assertJsonPath('payment_methods.3.sort', 3);
->assertJsonPath('payment_methods.3.sort', 3)
->assertJsonPath('payment_methods.0.method', 'paypal_smart_button')
->assertJsonPath('payment_methods.0.method_title', 'PayPal Smart Button')
->assertJsonPath('payment_methods.0.description', 'PayPal')
->assertJsonPath('payment_methods.0.sort', 4);
});

it('should fails the validation error when store the payment method for guest user', function () {
Expand Down

0 comments on commit abec433

Please sign in to comment.