From bedf482e1e8fcb805b388a4199472a88094a745d Mon Sep 17 00:00:00 2001 From: Vasyl Kozyrenko <vkozyrenko@magento.com> Date: Wed, 4 Jan 2017 19:12:17 +0200 Subject: [PATCH] MTA-3901: Add variation for Partial Refund an order placed through Braintree with Partial capture --- dev/tests/functional/composer.json | 2 +- .../Test/TestStep/PlaceOrderWithPaypalStep.php | 2 +- .../Magento/Checkout/Test/TestStep/PlaceOrderStep.php | 10 +++++----- .../Sales/Test/Repository/OrderInjectable/Price.xml | 6 +++++- .../Magento/Sales/Test/TestStep/SubmitOrderStep.php | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json index 3567ec530f4..cfa06fbf604 100644 --- a/dev/tests/functional/composer.json +++ b/dev/tests/functional/composer.json @@ -1,6 +1,6 @@ { "require": { - "magento/mtf": "1.0.0-rc51", + "magento/mtf": "1.0.0-rc52", "php": "~5.6.5|7.0.2|~7.0.6", "phpunit/phpunit": "~4.8.0|~5.5.0", "phpunit/phpunit-selenium": ">=1.2" diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/PlaceOrderWithPaypalStep.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/PlaceOrderWithPaypalStep.php index 93b4ae77e7c..f538052808a 100644 --- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/PlaceOrderWithPaypalStep.php +++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/PlaceOrderWithPaypalStep.php @@ -81,7 +81,7 @@ class PlaceOrderWithPaypalStep implements TestStepInterface * @param CheckoutOnepageSuccess $checkoutOnepageSuccess * @param FixtureFactory $fixtureFactory * @param array $products - * @param array|null $prices + * @param array $prices * @param OrderInjectable|null $order */ public function __construct( diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php index 7da3383014c..a56f98b8023 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php @@ -72,26 +72,26 @@ class PlaceOrderStep implements TestStepInterface * @param AssertGrandTotalOrderReview $assertGrandTotalOrderReview * @param CheckoutOnepageSuccess $checkoutOnepageSuccess * @param FixtureFactory $fixtureFactory + * @param array $products + * @param array $prices * @param OrderInjectable|null $order - * @param array|null $products - * @param array|null $prices */ public function __construct( CheckoutOnepage $checkoutOnepage, AssertGrandTotalOrderReview $assertGrandTotalOrderReview, CheckoutOnepageSuccess $checkoutOnepageSuccess, FixtureFactory $fixtureFactory, - OrderInjectable $order = null, array $products = [], - array $prices = [] + array $prices = [], + OrderInjectable $order = null ) { $this->checkoutOnepage = $checkoutOnepage; $this->assertGrandTotalOrderReview = $assertGrandTotalOrderReview; $this->checkoutOnepageSuccess = $checkoutOnepageSuccess; $this->fixtureFactory = $fixtureFactory; - $this->order = $order; $this->products = $products; $this->prices = $prices; + $this->order = $order; } /** diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml index 8c3f31343a9..be727952f42 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml @@ -66,8 +66,12 @@ </dataset> <dataset name="full_flow"> + <field name="refund" xsi:type="array"> + <item name="0" xsi:type="array"> + <item name="grand_creditmemo_total" xsi:type="string">565</item> + </item> + </field> <field name="0" xsi:type="array"> - <item name="grand_creditmemo_total" xsi:type="string">565</item> <item name="grand_invoice_total" xsi:type="string">565</item> <item name="grand_order_total" xsi:type="string">565</item> </field> diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php index 3390d579cc3..3967b6571ba 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/SubmitOrderStep.php @@ -61,6 +61,7 @@ class SubmitOrderStep implements TestStepInterface private $products; /** + * @constructor * @param OrderCreateIndex $orderCreateIndex * @param SalesOrderView $salesOrderView * @param FixtureFactory $fixtureFactory @@ -80,7 +81,6 @@ class SubmitOrderStep implements TestStepInterface $this->salesOrderView = $salesOrderView; $this->fixtureFactory = $fixtureFactory; $this->customer = $customer; - $this->products = $products; $this->billingAddress = $billingAddress; $this->products = $products; } -- GitLab