Skip to content

Commit cd1bcb6

Browse files
authored
Merge pull request #3556 from magento-tsg/2.3-develop-mftf-pr10
[TSG] MFTF for 2.3 (pr10) (2.3.1)
2 parents 2b27bc0 + 828fc3e commit cd1bcb6

19 files changed

+264
-9
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminSlideOutDialogSection">
12+
<element name="closeButton" type="button" selector=".modal-slide._show [data-role='closeBtn']" timeout="30"/>
13+
<element name="cancelButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Cancel']" timeout="30"/>
14+
<element name="doneButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Done']" timeout="30"/>
15+
<element name="saveButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Save']" timeout="30"/>
16+
</section>
17+
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontMessagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="StorefrontMessagesSection">
1212
<element name="success" type="text" selector="div.message-success.success.message"/>
1313
<element name="error" type="text" selector="div.message-error.error.message"/>
14+
<element name="noticeMessage" type="text" selector="div.message-notice"/>
1415
</section>
1516
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@
147147
<!--Create new order-->
148148
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="CreateNewOrder">
149149
<argument name="customer" value="Simple_US_Customer"/>
150+
<argument name="storeView" value="customStoreView"/>
150151
</actionGroup>
151-
<click selector="{{OrdersGridSection.website('secondStoreView')}}" stepKey="ClickToSelectStore"/>
152-
<waitForPageLoad stepKey="waitForPageOpened"/>
152+
153153
<click selector="{{OrdersGridSection.addProducts}}" stepKey="clickToAddProduct"/>
154154
<waitForPageLoad stepKey="waitForProductsOpened"/>
155155
<!--TEST CASE #1-->

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCheckoutPaymentMethodSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="StorefrontCheckoutPaymentMethodSection">
1212
<element name="billingAddress" type="text" selector=".checkout-billing-address"/>
1313
<element name="checkPaymentMethodByName" type="radio" selector="//div[@id='checkout-payment-method-load']//div[@class='payment-method']//label//span[contains(., '{{methodName}}')]/../..//input" parameterized="true"/>
14+
<element name="billingAddressSameAsShipping" type="checkbox" selector=".payment-method._active [name='billing-address-same-as-shipping']"/>
1415
</section>
1516
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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="StorefrontShoppingCartCheckCustomerDefaultShippingAddressForVirtualQuoteTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Estimator in Shopping cart must be pre-filled by Customer default shipping address for virtual quote"/>
15+
<title value="Estimator in Shopping cart must be pre-filled by Customer default shipping address for virtual quote"/>
16+
<description value="Estimator in Shopping cart must be pre-filled by Customer default shipping address for virtual quote"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MAGETWO-46795"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<createData entity="defaultVirtualProduct" stepKey="createVirtualProduct">
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
<createData entity="Simple_US_Customer_CA" stepKey="createCustomer">
27+
<field key="group_id">1</field>
28+
</createData>
29+
</before>
30+
<after>
31+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
32+
<deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProduct"/>
33+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
34+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
35+
</after>
36+
<!-- Steps -->
37+
<!-- Step 1: Go to Storefront as Customer -->
38+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
39+
<argument name="Customer" value="$$createCustomer$$" />
40+
</actionGroup>
41+
<!-- Step 2: Add virtual product to cart -->
42+
<amOnPage url="{{StorefrontProductPage.url($$createVirtualProduct.custom_attributes[url_key]$)}}" stepKey="amOnPage"/>
43+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
44+
<argument name="product" value="$$createVirtualProduct$$"/>
45+
<argument name="productCount" value="1"/>
46+
</actionGroup>
47+
<!-- Step 3: Go to Shopping Cart -->
48+
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingcart"/>
49+
<!-- Step 4: Open Estimate Tax section -->
50+
<click selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="openEstimateTaxSection"/>
51+
<see selector="{{CheckoutCartSummarySection.country}}" userInput="{{US_Address_CA.country_id}}" stepKey="checkCountry"/>
52+
<see selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{US_Address_CA.state}}" stepKey="checkState"/>
53+
<scrollTo selector="{{CheckoutCartSummarySection.postcode}}" stepKey="scrollToPostCodeField"/>
54+
<grabValueFrom selector="{{CheckoutCartSummarySection.postcode}}" stepKey="grabTextPostCode"/>
55+
<assertEquals message="Customer postcode is invalid" stepKey="checkCustomerPostcode">
56+
<expectedResult type="string">{{US_Address_CA.postcode}}</expectedResult>
57+
<actualResult type="variable">grabTextPostCode</actualResult>
58+
</assertEquals>
59+
</test>
60+
</tests>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="DefaultWebUrlOptionsConfig" type="web_url_use_store">
12+
<requiredEntity type="url_use_store_value">DefaultConfigWebUrlOptions</requiredEntity>
13+
</entity>
14+
<entity name="DefaultConfigWebUrlOptions" type="url_use_store_value">
15+
<data key="value">0</data>
16+
</entity>
17+
18+
<entity name="EnableWebUrlOptionsConfig" type="web_url_use_store">
19+
<requiredEntity type="url_use_store_value">WebUrlOptionsYes</requiredEntity>
20+
</entity>
21+
<entity name="WebUrlOptionsYes" type="url_use_store_value">
22+
<data key="value">1</data>
23+
</entity>
24+
</entities>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
10+
<operation name="WebUrlOptionsConfig" dataType="web_url_use_store" type="create" auth="adminFormKey" url="/admin/system_config/save/section/web/"
11+
method="POST" successRegex="/messages-message-success/" returnRegex="">
12+
<object key="groups" dataType="web_url_use_store">
13+
<object key="url" dataType="web_url_use_store">
14+
<object key="fields" dataType="web_url_use_store">
15+
<object key="use_store" dataType="url_use_store_value">
16+
<field key="value">string</field>
17+
</object>
18+
</object>
19+
</object>
20+
</object>
21+
</operation>
22+
</operations>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="CustomerAccountSharingDefault" type="customer_account_sharing_config">
12+
<requiredEntity type="account_share_scope_value">CustomerAccountSharingPerWebsite</requiredEntity>
13+
</entity>
14+
<entity name="CustomerAccountSharingPerWebsite" type="account_share_scope_value">
15+
<data key="value">1</data>
16+
</entity>
17+
18+
<entity name="CustomerAccountSharingGlobal" type="customer_account_sharing_config">
19+
<requiredEntity type="account_share_scope_value">GlobalCustomerAccountSharing</requiredEntity>
20+
</entity>
21+
<entity name="GlobalCustomerAccountSharing" type="account_share_scope_value">
22+
<data key="value">0</data>
23+
</entity>
24+
</entities>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
9+
<operation name="CustomerAccountShareConfig" dataType="customer_account_sharing_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/customer/"
10+
successRegex="/messages-message-success/" returnRegex="" method="POST">
11+
<object key="groups" dataType="customer_account_sharing_config">
12+
<object key="account_share" dataType="customer_account_sharing_config">
13+
<object key="fields" dataType="customer_account_sharing_config">
14+
<object key="scope" dataType="account_share_scope_value">
15+
<field key="value">string</field>
16+
</object>
17+
</object>
18+
</object>
19+
</object>
20+
</operation>
21+
</operations>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,23 @@
3939
<actionGroup name="navigateToNewOrderPageExistingCustomer">
4040
<arguments>
4141
<argument name="customer"/>
42+
<argument name="storeView" defaultValue="_defaultStore"/>
4243
</arguments>
4344
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
4445
<waitForPageLoad stepKey="waitForIndexPageLoad"/>
4546
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
4647
<click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
4748
<waitForPageLoad stepKey="waitForCustomerGridLoad"/>
49+
<!--Clear grid filters-->
50+
<conditionalClick selector="{{AdminOrderCustomersGridSection.resetButton}}" dependentSelector="{{AdminOrderCustomersGridSection.resetButton}}" visible="true" stepKey="clearExistingCustomerFilters"/>
4851
<fillField userInput="{{customer.email}}" selector="{{AdminOrderCustomersGridSection.emailInput}}" stepKey="filterEmail"/>
4952
<click selector="{{AdminOrderCustomersGridSection.apply}}" stepKey="applyFilter"/>
5053
<waitForPageLoad stepKey="waitForFilteredCustomerGridLoad"/>
5154
<click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/>
5255
<waitForPageLoad stepKey="waitForCreateOrderPageLoad" />
56+
<!-- Select store view if appears -->
57+
<conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/>
58+
<waitForPageLoad stepKey="waitForCreateOrderPageLoadAfterStoreSelect" />
5359
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
5460
</actionGroup>
5561

0 commit comments

Comments
 (0)