Skip to content

Commit e6c39ac

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/2.3-develop' into MC-5574
2 parents ecaf14e + f032485 commit e6c39ac

File tree

70 files changed

+1251
-264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1251
-264
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
11+
<actionGroup name="AdminOrderBraintreeFillActionGroup">
12+
<!--Select Braintree Payment method on Admin Order Create Page-->
13+
<click stepKey="chooseBraintree" selector="{{NewOrderSection.creditCardBraintree}}"/>
14+
<waitForPageLoad stepKey="waitForBraintreeConfigs" time="5"/>
15+
<click stepKey="openCardTypes" selector="{{NewOrderSection.openCardTypes}}"/>
16+
<waitForPageLoad stepKey="waitForCardTypes" time="3"/>
17+
<click stepKey="chooseCardType" selector="{{NewOrderSection.masterCard}}"/>
18+
<waitForPageLoad stepKey="waitForCardSelected" time="3"/>
19+
20+
<!--Choose Master Card from drop-down list-->
21+
<switchToIFrame stepKey="switchToCardNumber" selector="{{NewOrderSection.cardFrame}}"/>
22+
<fillField stepKey="fillCardNumber" selector="{{NewOrderSection.creditCardNumber}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
23+
<waitForPageLoad stepKey="waitForFillCardNumber" time="1"/>
24+
<switchToIFrame stepKey="switchBackFromCard"/>
25+
26+
<!--Fill expire date-->
27+
<switchToIFrame stepKey="switchToExpirationMonth" selector="{{NewOrderSection.monthFrame}}"/>
28+
<fillField stepKey="fillMonth" selector="{{NewOrderSection.expirationMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
29+
<waitForPageLoad stepKey="waitForFillMonth" time="1"/>
30+
<switchToIFrame stepKey="switchBackFromMonth"/>
31+
<switchToIFrame stepKey="switchToExpirationYear" selector="{{NewOrderSection.yearFrame}}"/>
32+
<fillField stepKey="fillYear" selector="{{NewOrderSection.expirationYear}}" userInput="{{PaymentAndShippingInfo.year}}"/>
33+
<waitForPageLoad stepKey="waitForFillYear" time="1"/>
34+
<switchToIFrame stepKey="switchBackFromYear"/>
35+
36+
<!--Fill CVW code-->
37+
<switchToIFrame stepKey="switchToCVV" selector="{{NewOrderSection.cvvFrame}}"/>
38+
<fillField stepKey="fillCVV" selector="{{NewOrderSection.cvv}}" userInput="{{PaymentAndShippingInfo.cvv}}"/>
39+
<wait stepKey="waitForFillCVV" time="1"/>
40+
<switchToIFrame stepKey="switchBackFromCVV"/>
41+
</actionGroup>
42+
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/ActionGroup/ConfigureBraintreeActionGroup.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010

1111
<actionGroup name="ConfigureBraintree">
1212
<!-- GoTo ConfigureBraintree fields -->
@@ -46,4 +46,8 @@
4646
<waitForElementVisible selector="{{BraintreeConfiguraionSection.successfulMessage}}" stepKey="waitForSuccessfullyConfigured" time="10"/>
4747
</actionGroup>
4848

49+
<actionGroup name="DisableBrainTree">
50+
<magentoCLI stepKey="disableBrainTree" command="config:set payment/braintree/active 0"/>
51+
<magentoCLI stepKey="disableBrainTreePaypal" command="config:set payment/braintree_paypal/active 0"/>
52+
</actionGroup>
4953
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/ActionGroup/CreateNewOrderActionGroup.xml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,7 @@
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1010

11-
<actionGroup name="CreateNewOrderActionGroup">
12-
<click stepKey="createNewOrder" selector="{{NewOrderSection.createNewOrder}}"/>
13-
<waitForPageLoad stepKey="waitForCustomersList" time="3"/>
14-
<click stepKey="chooseCustomer" selector="{{NewOrderSection.customer}}"/>
15-
<waitForPageLoad stepKey="waitForOrderPage" time="3"/>
16-
<click stepKey="addProducts" selector="{{NewOrderSection.addProducts}}"/>
17-
<waitForPageLoad stepKey="waitForProducts" time="3"/>
18-
<click stepKey="chooseProducts" selector="{{NewOrderSection.chooseProduct}}"/>
19-
<waitForPageLoad stepKey="waitForProductChoose" time="3"/>
20-
<click stepKey="addSelectedProduct" selector="{{NewOrderSection.addSelectedProduct}}"/>
21-
<waitForAjaxLoad stepKey="waitForChoose" time="3"/>
22-
<click stepKey="openAddresses" selector="{{NewOrderSection.openAddresses}}"/>
23-
<click stepKey="chooseAddress" selector="{{NewOrderSection.chooseAddress}}"/>
24-
<fillField stepKey="fillState" selector="{{NewOrderSection.state}}" userInput="Yerevan"/>
25-
<scrollTo stepKey="scrollTo" selector="#order-methods"/>
26-
<waitForPageLoad stepKey="waitForMethods" time="3"/>
27-
<click stepKey="startJSMethodExecution" selector="{{NewOrderSection.openShippingMethods}}"/>
28-
<waitForPageLoad stepKey="waitForJSMethodExecution" time="3"/>
29-
<click stepKey="openShippingMethods" selector="{{NewOrderSection.openShippingMethods}}"/>
30-
<waitForPageLoad stepKey="waitForShippingMethods" time="3"/>
31-
<click stepKey="chooseShippingMethods" selector="{{NewOrderSection.shippingMethod}}"/>
32-
<waitForPageLoad stepKey="waitForShippingMethodChoose" time="4"/>
11+
<actionGroup name="useBraintreeForMasterCard">
3312
<click stepKey="chooseBraintree" selector="{{NewOrderSection.creditCardBraintree}}"/>
3413
<waitForPageLoad stepKey="waitForBraintreeConfigs" time="5"/>
3514
<click stepKey="openCardTypes" selector="{{NewOrderSection.openCardTypes}}"/>
@@ -56,11 +35,5 @@
5635
<fillField stepKey="fillCVV" selector="{{NewOrderSection.cvv}}" userInput="{{PaymentAndShippingInfo.cvv}}"/>
5736
<wait stepKey="waitForFillCVV" time="1"/>
5837
<switchToIFrame stepKey="switchBackFromCVV"/>
59-
60-
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
61-
<waitForPageLoad stepKey="waitForSaveConfig" time="5"/>
62-
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage" time="1"/>
63-
6438
</actionGroup>
65-
6639
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Data/BraintreeData.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<requiredEntity type="merchant_id">MerchantId</requiredEntity>
4343
<requiredEntity type="public_key">PublicKey</requiredEntity>
4444
<requiredEntity type="private_key">PrivateKey</requiredEntity>
45+
<requiredEntity type="active">Status</requiredEntity>
4546
</entity>
4647
<entity name="BraintreeTitle" type="title">
4748
<data key="value">Credit Card (Braintree)</data>
@@ -128,7 +129,7 @@
128129
<data key="firstName">John</data>
129130
<data key="lastName">Smith</data>
130131
<data key="password">admin123</data>
131-
<data key="email">mail@mail.com</data>
132+
<data key="email" unique="prefix">mail@mail.com</data>
132133
</entity>
133134

134135
<entity name="PaymentAndShippingInfo" type="data">

app/code/Magento/Braintree/Test/Mftf/Section/AdminMenuSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
1414
<element name="catalog" type="button" selector="//li[@id='menu-magento-catalog-catalog']"/>
1515
<element name="customers" type="button" selector="//li[@id='menu-magento-customer-customer']"/>
16-
<element name="marketing" type="button" selector="//li[@id='//li[@id='menu-magento-backend-marketing']']"/>
16+
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
1717
<element name="content" type="button" selector="//li[@id='menu-magento-backend-content']"/>
1818
<element name="reports" type="button" selector="//li[@id='menu-magento-reports-report']"/>
1919
<element name="stores" type="button" selector="//li[@id='menu-magento-backend-stores']"/>

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-93677"/>
1919
<group value="braintree"/>
20-
<skip>
21-
<issueId value="MQE-1187" />
22-
</skip>
2320
</annotations>
2421

2522

@@ -28,11 +25,13 @@
2825
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2926

3027
<!--CreateNewProduct-->
31-
<actionGroup ref="CreateNewProductActionGroup" stepKey="CreateNewProduct"/>
28+
<createData entity="_defaultCategory" stepKey="createCategory"/>
29+
<createData entity="_defaultProduct" stepKey="createProduct">
30+
<requiredEntity createDataKey="createCategory"/>
31+
</createData>
3232

3333
<!--Create New Customer-->
34-
<actionGroup ref="CreateCustomerActionGroup" stepKey="CreateCustomer"/>
35-
34+
<createData stepKey="createCustomer" entity="Simple_US_Customer"/>
3635
</before>
3736

3837

@@ -48,30 +47,49 @@
4847
<actionGroup ref="AdminCreateUserAction" stepKey="AdminCreateNewUser"/>
4948

5049
<!--SignOut-->
51-
<actionGroup ref="SignOut" stepKey="signOutFromAdmin"/>
50+
<actionGroup ref="logout" stepKey="signOutFromAdmin"/>
5251

5352
<!--SignIn New User-->
5453
<actionGroup ref="LoginNewUser" stepKey="signInNewUser"/>
5554
<waitForPageLoad stepKey="waitForLogin" time="3"/>
5655

5756
<!--Create New Order-->
58-
<actionGroup ref="CreateNewOrderActionGroup" stepKey="createNewOrder"/>
57+
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrder">
58+
<argument name="customer" value="Simple_US_Customer"/>
59+
</actionGroup>
60+
61+
<actionGroup ref="addSimpleProductToOrder" stepKey="addProduct">
62+
<argument name="product" value="_defaultProduct"/>
63+
</actionGroup>
64+
65+
<actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress">
66+
<argument name="customer" value="Simple_US_Customer"/>
67+
<argument name="address" value="US_Address_TX"/>
68+
</actionGroup>
69+
70+
<actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/>
71+
72+
<waitForPageLoad stepKey="waitForShippingToFinish"/>
5973

74+
<actionGroup ref="useBraintreeForMasterCard" stepKey="selectCardWithBraintree"/>
75+
76+
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
77+
<waitForPageLoad stepKey="waitForSaveConfig" time="5"/>
78+
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage" time="1"/>
6079

6180
<after>
81+
<!-- Disable BrainTree -->
82+
<actionGroup ref="DisableBrainTree" stepKey="disableBrainTree"/>
83+
6284
<!--SignOut-->
6385
<actionGroup ref="SignOut" stepKey="signOutFromNewUser"/>
6486
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
6587

6688
<!--Delete Product-->
67-
<actionGroup ref="DeleteProductActionGroup" stepKey="DeleteAllProducts">
68-
<argument name="productName" value="NewProductData.ProductName"/>
69-
</actionGroup>
89+
<deleteData stepKey="deleteProduct" createDataKey="createProduct"/>
7090

7191
<!--Delete Customer-->
72-
<actionGroup ref="DeleteCustomerActionGroup" stepKey="DeleteCustomer">
73-
<argument name="lastName" value="NewCustomerData.LastName"/>
74-
</actionGroup>
92+
<deleteData stepKey="deleteCustomer" createDataKey="createCustomer"/>
7593

7694
<!--Delete User -->
7795
<actionGroup ref="GoToAllUsers" stepKey="GoBackToAllUsers"/>
@@ -80,8 +98,6 @@
8098
<!--Delete Role-->
8199
<actionGroup ref="GoToUserRoles" stepKey="GoBackToUserRoles"/>
82100
<actionGroup ref="AdminDeleteRoleActionGroup" stepKey="AdminDeleteRoleActionGroup"/>
83-
84101
</after>
85-
86102
</test>
87103
</tests>
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscount">
12+
<annotations>
13+
<features value="Braintree"/>
14+
<stories value="Get access to a New Credit Memo Page from Invocie for Order payed with online payment via Admin"/>
15+
<title value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
16+
<description value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MAGETWO-94472"/>
19+
<group value="braintree"/>
20+
</annotations>
21+
22+
<before>
23+
<!--Create Default Category-->
24+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
25+
26+
<!--Create Simple product-->
27+
<createData entity="_defaultProduct" stepKey="simpleProduct">
28+
<requiredEntity createDataKey="createCategory"/>
29+
</createData>
30+
31+
<!--Create Tax Rule is based on default tax rates (Stores>Tax Rule) US-CA-*-Rate 1 = 8.2500 US-NY-*-Rate 1 = 8.3750 -->
32+
<createData entity="SimpleTaxRule" stepKey="createTaxRule"/>
33+
34+
<!--Configure Braintree Payment method-->
35+
<createData entity="BraintreeConfig" stepKey="BraintreeConfigurationData"/>
36+
<createData entity="CustomBraintreeConfigurationData" stepKey="enableBraintree"/>
37+
38+
<!--Create Retailer Customer with US_CA address-->
39+
<createData entity="Simple_US_Customer_CA" stepKey="simpleCustomer">
40+
<field key="group_id">3</field>
41+
</createData>
42+
43+
<!--Login as Admin User-->
44+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
45+
</before>
46+
47+
<after>
48+
<!--Delete Cart Price Rule-->
49+
<actionGroup ref="AdminDeleteCartPriceRuleForRetailerActionGroup" stepKey="deleteSalesRule"/>
50+
51+
<!--Set to default configuration Tax Shipping Class-->
52+
<actionGroup ref="setDefaultShippingTaxClass" stepKey="setdefaultClass"/>
53+
54+
<!--Delete Simple Sub Category-->
55+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
56+
57+
<!--Delete Simple Product-->
58+
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
59+
60+
<!-- Delete Tax Rule -->
61+
<deleteData createDataKey="createTaxRule" stepKey="deleteTaxRule"/>
62+
63+
<!-- Rollback Braintree to Default -->
64+
<createData entity="RollBackCustomBraintreeConfigurationData" stepKey="rollbackBraintreeConfig"/>
65+
66+
<!--Delete Customer-->
67+
<deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/>
68+
69+
<!--Log Out-->
70+
<actionGroup ref="logout" stepKey="logout"/>
71+
</after>
72+
73+
<!-- Create a cart price rule with 10% discount for whole cart -->
74+
<click selector="{{AdminMenuSection.marketing}}" stepKey="clickOnMarketing" />
75+
<waitForPageLoad stepKey="waitForMarketing" time="3"/>
76+
<click selector="{{CartPriceRulesSubmenuSection.cartPriceRules}}" stepKey="clickOnCartPriceRules"/>
77+
<waitForPageLoad stepKey="waitForCartPriceRules" time="3"/>
78+
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
79+
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{SimpleSalesRule.name}}" stepKey="fillRuleName"/>
80+
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/>
81+
<actionGroup ref="selectRetailerCustomerGroup" stepKey="selectRetailerCustomerGroup"/>
82+
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
83+
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/>
84+
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/>
85+
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
86+
<waitForPageLoad stepKey="waitForCartRuleLoad" time="3"/>
87+
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
88+
89+
<!--Set Taxable Goods for Shipping Tax Class-->
90+
<actionGroup ref="changeShippingTaxClass" stepKey="changeShippingTaxClass"/>
91+
92+
<!--Adding Special price to product-->
93+
<amOnPage url="{{AdminProductEditPage.url($$simpleProduct.id$$)}}" stepKey="openAdminProductEditPage"/>
94+
<actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice"/>
95+
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>
96+
97+
<!--Create New Order-->
98+
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer">
99+
<argument name="customer" value="$$simpleCustomer$$"/>
100+
</actionGroup>
101+
102+
<!--Add a product to order-->
103+
<actionGroup ref="addSimpleProductToOrder" stepKey="addProductToOrder">
104+
<argument name="product" value="$$simpleProduct$$"/>
105+
</actionGroup>
106+
107+
<!--Select FlatRate shipping method-->
108+
<actionGroup ref="orderSelectFlatRateShipping" stepKey="orderSelectFlatRateShippingMethod"/>
109+
110+
<!--Select Braintree online Payment method -->
111+
<actionGroup ref="AdminOrderBraintreeFillActionGroup" stepKey="selectCreditCardPayment"/>
112+
113+
<!--Submit Order-->
114+
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
115+
<waitForPageLoad stepKey="waitForSubmitOrder" time="5"/>
116+
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeOrderSuccessMessage" after="waitForSubmitOrder"/>
117+
118+
<!-- Create New invoice-->
119+
<actionGroup ref="adminFastCreateInvoice" stepKey="createInvoice"/>
120+
121+
<!--Get access to Credit Memo page from Invoice page-->
122+
<click selector="{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}" stepKey="clickCreateNewCreditMemo"/>
123+
<waitForPageLoad stepKey="waitForLoadNewCreditMemoPage" time="5"/>
124+
<see selector="{{AdminCreditMemoOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeNewCreditMemo"/>
125+
</test>
126+
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
<description value="Admin should be able to set/edit all the basic product attributes when creating/editing a bundle product"/>
1616
<severity value="CRITICAL"/>
1717
<testCaseId value="MC-222"/>
18-
<skip>
19-
<issueId value="MQE-1214"/>
20-
</skip>
2118
<group value="Bundle"/>
2219
</annotations>
2320
<before>

0 commit comments

Comments
 (0)