forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into working
- Loading branch information
Showing
51 changed files
with
900 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © 2013-2017 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../vendor/magento/mtf/Magento/Mtf/Repository/etc/repository.xsd"> | ||
<repository class="Magento\Braintree\Test\Repository\BraintreeSandboxCustomer"> | ||
<dataset name="braintree_sandbox_default"> | ||
<field name="environment" xsi:type="string">BRAINTREEE_ENVIRONMENT</field> | ||
<field name="merchantId" xsi:type="string">BRAINTREEE_MERCHANT_ID</field> | ||
<field name="publicKey" xsi:type="string">BRAINTREE_PUBLIC_KEY</field> | ||
<field name="privateKey" xsi:type="string">BRAINTREE_PRIVATE_KEY</field> | ||
</dataset> | ||
</repository> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
dev/tests/functional/tests/app/Magento/Braintree/Test/Fixture/BraintreeSandboxCustomer.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/** | ||
* Copyright © 2013-2017 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd"> | ||
<fixture name="braintree_sandbox_customer" | ||
module="Magento_Braintree" | ||
type="virtual" | ||
repository_class="Magento\Braintree\Test\Repository\BraintreeSandboxCustomer" | ||
class="Magento\Braintree\Test\Fixture\BraintreeSandboxCustomer"> | ||
<field name="environment" /> | ||
<field name="merchantId" /> | ||
<field name="publicKey" /> | ||
<field name="privateKey" /> | ||
</fixture> | ||
</config> |
17 changes: 17 additions & 0 deletions
17
...tests/functional/tests/app/Magento/Braintree/Test/Repository/BraintreeSandboxCustomer.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" ?> | ||
<!-- | ||
/** | ||
* Copyright © 2013-2017 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Repository/etc/repository.xsd"> | ||
<repository class="Magento\Braintree\Test\Repository\BraintreeSandboxCustomer"> | ||
<dataset name="braintree_sandbox_default"> | ||
<field name="environment" xsi:type="string">BRAINTREEE_ENVIRONMENT</field> | ||
<field name="merchantId" xsi:type="string">BRAINTREEE_MERCHANT_ID</field> | ||
<field name="publicKey" xsi:type="string">BRAINTREE_PUBLIC_KEY</field> | ||
<field name="privateKey" xsi:type="string">BRAINTREE_PRIVATE_KEY</field> | ||
</dataset> | ||
</repository> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...ctional/tests/app/Magento/Braintree/Test/TestCase/CreateOnlineCreditMemoBraintreeTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Copyright © 2013-2017 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Braintree\Test\TestCase; | ||
|
||
use Magento\Mtf\TestCase\Scenario; | ||
|
||
/** | ||
* Preconditions: | ||
* 1. Full capture of order placed within Braintree. | ||
* | ||
* Steps: | ||
* 1. Log in to Admin. | ||
* 2. Open created order. | ||
* 3. Create credit memo. | ||
* 4. Perform assertions. | ||
* | ||
* @group Braintree | ||
* @ZephyrId MAGETWO-38324 | ||
*/ | ||
class CreateOnlineCreditMemoBraintreeTest extends Scenario | ||
{ | ||
/* tags */ | ||
const MVP = 'yes'; | ||
const TEST_TYPE = '3rd_party_test'; | ||
const SEVERITY = 'S1'; | ||
/* end tags */ | ||
|
||
/** | ||
* Runs test for online credit memo creation for order placed via Braintree Credit Card. | ||
* | ||
* @return void | ||
*/ | ||
public function test() | ||
{ | ||
$this->executeScenario(); | ||
} | ||
} |
102 changes: 102 additions & 0 deletions
102
...ctional/tests/app/Magento/Braintree/Test/TestCase/CreateOnlineCreditMemoBraintreeTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/** | ||
* Copyright © 2013-2017 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd"> | ||
<testCase name="Magento\Braintree\Test\TestCase\CreateOnlineCreditMemoBraintreeTest" summary="Create online credit memo for Braintree credit card" ticketId="MAGETWO-38324"> | ||
<variation name="CreateOnlineCreditMemoBraintreeTestVariation1" summary="Refund an order placed through Braintree with full capture" ticketId="MAGETWO-38324"> | ||
<data name="tag" xsi:type="string">test_type:3rd_party_test, severity:S1</data> | ||
<data name="products" xsi:type="array"> | ||
<item name="0" xsi:type="string">catalogProductSimple::product_10_dollar</item> | ||
<item name="1" xsi:type="string">configurableProduct::with_one_option</item> | ||
<item name="2" xsi:type="string">bundleProduct::bundle_fixed_100_dollar_product</item> | ||
</data> | ||
<data name="customer/dataset" xsi:type="string">default</data> | ||
<data name="braintreeSandboxCustomer/dataset" xsi:type="string">braintree_sandbox_default</data> | ||
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data> | ||
<data name="shippingAddress/dataset" xsi:type="string">US_address_1_without_email</data> | ||
<data name="checkoutMethod" xsi:type="string">guest</data> | ||
<data name="shipping" xsi:type="array"> | ||
<item name="shipping_service" xsi:type="string">Flat Rate</item> | ||
<item name="shipping_method" xsi:type="string">Fixed</item> | ||
</data> | ||
<data name="payment/method" xsi:type="string">braintree</data> | ||
<data name="creditCard/dataset" xsi:type="string">visa_default</data> | ||
<data name="creditCard/data/payment_code" xsi:type="string">braintree</data> | ||
<data name="configData" xsi:type="string">braintree</data> | ||
<data name="status" xsi:type="string">Closed</data> | ||
<data name="order/data/refund" xsi:type="array"> | ||
<item name="0" xsi:type="array"> | ||
<item name="invoiceId" xsi:type="string">0</item> | ||
</item> | ||
</data> | ||
<data name="order/data/price/refund" xsi:type="array"> | ||
<item name="0" xsi:type="array"> | ||
<item name="grand_creditmemo_total" xsi:type="string">145.98</item> | ||
</item> | ||
</data> | ||
<data name="transactions/refund" xsi:type="array"> | ||
<item name="transactionType" xsi:type="string">Refund</item> | ||
<item name="statusIsClosed" xsi:type="string">Yes</item> | ||
</data> | ||
<constraint name="Magento\Sales\Test\Constraint\AssertRefundSuccessCreateMessage" /> | ||
<constraint name="Magento\Sales\Test\Constraint\AssertRefundInCommentsHistory" /> | ||
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" /> | ||
<constraint name="Magento\Sales\Test\Constraint\AssertTransactionStatus" /> | ||
</variation> | ||
<variation name="CreateOnlineCreditMemoBraintreeTestVariation2" summary="Partial Refund an order placed through Braintree with Partial capture" ticketId="MAGETWO-38325"> | ||
<data name="tag" xsi:type="string">test_type:3rd_party_test, severity:S1</data> | ||
<data name="products" xsi:type="array"> | ||
<item name="0" xsi:type="string">catalogProductSimple::product_10_dollar</item> | ||
<item name="1" xsi:type="string">configurableProduct::with_one_option</item> | ||
<item name="2" xsi:type="string">bundleProduct::bundle_fixed_100_dollar_product</item> | ||
</data> | ||
<data name="customer/dataset" xsi:type="string">default</data> | ||
<data name="braintreeSandboxCustomer/dataset" xsi:type="string">braintree_sandbox_default</data> | ||
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data> | ||
<data name="shippingAddress/dataset" xsi:type="string">US_address_1_without_email</data> | ||
<data name="checkoutMethod" xsi:type="string">guest</data> | ||
<data name="shipping" xsi:type="array"> | ||
<item name="shipping_service" xsi:type="string">Flat Rate</item> | ||
<item name="shipping_method" xsi:type="string">Fixed</item> | ||
</data> | ||
<data name="payment/method" xsi:type="string">braintree</data> | ||
<data name="creditCard/dataset" xsi:type="string">visa_default</data> | ||
<data name="creditCard/data/payment_code" xsi:type="string">braintree</data> | ||
<data name="configData" xsi:type="string">braintree</data> | ||
<data name="status" xsi:type="string">Processing</data> | ||
<data name="order/data/refund" xsi:type="array"> | ||
<item name="0" xsi:type="array"> | ||
<item name="invoiceId" xsi:type="string">0</item> | ||
<item name="items_data" xsi:type="array"> | ||
<item name="1" xsi:type="array"> | ||
<item name="qty" xsi:type="string">0</item> | ||
</item> | ||
</item> | ||
</item> | ||
<item name="1" xsi:type="array"> | ||
<item name="invoiceId" xsi:type="string">0</item> | ||
</item> | ||
</data> | ||
<data name="order/data/price/refund" xsi:type="array"> | ||
<item name="0" xsi:type="array"> | ||
<item name="grand_creditmemo_total" xsi:type="string">134.07</item> | ||
</item> | ||
<item name="1" xsi:type="array"> | ||
<item name="grand_creditmemo_total" xsi:type="string">1.08</item> | ||
</item> | ||
</data> | ||
<data name="data/items_data" xsi:type="array"> | ||
<item name="0" xsi:type="array"> | ||
<item name="qty" xsi:type="string">0</item> | ||
</item> | ||
</data> | ||
<constraint name="Magento\Sales\Test\Constraint\AssertRefundSuccessCreateMessage" /> | ||
<constraint name="Magento\Sales\Test\Constraint\AssertRefundInCommentsHistory" /> | ||
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" /> | ||
</variation> | ||
</testCase> | ||
</config> |
Oops, something went wrong.