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

app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
<element name="resetFilter" type="button" selector=".action-tertiary[title='Reset Filter']"/>
1515
<element name="emailInput" type="input" selector="#sales_order_create_customer_grid_filter_email"/>
1616
<element name="firstRow" type="button" selector="tr:nth-of-type(1)[data-role='row']"/>
17+
<element name="resetButton" type="button" selector="#sales_order_create_customer_grid [data-action='grid-filter-reset']" timeout="30"/>
1718
</section>
1819
</sections>
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<!--Search grid with keyword search-->
12+
<actionGroup name="AdminFilterCartPriceRuleActionGroup">
13+
<arguments>
14+
<argument name="ruleName"/>
15+
</arguments>
16+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
17+
<fillField selector="{{AdminCartPriceRulesSection.filterByNameInput}}" userInput="{{ruleName}}" stepKey="filterByName"/>
18+
<click selector="{{AdminCartPriceRulesSection.searchButton}}" stepKey="doFilter"/>
19+
<click selector="{{AdminCartPriceRulesSection.rowByIndex('1')}}" stepKey="goToEditRulePage"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateWebsiteActionGroup.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,18 @@
2222
<waitForElementVisible selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="waitForStoreGridToReload"/>
2323
<see userInput="You saved the website." stepKey="seeSavedMessage" />
2424
</actionGroup>
25+
26+
<!--Get Website_id-->
27+
<actionGroup name="AdminGetWebsiteIdActionGroup">
28+
<arguments>
29+
<argument name="website"/>
30+
</arguments>
31+
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnTheStorePage"/>
32+
<click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters"/>
33+
<fillField selector="{{AdminStoresGridSection.websiteFilterTextField}}" userInput="{{website.name}}" stepKey="fillSearchWebsiteField"/>
34+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickApplyFilters" />
35+
<see selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" userInput="{{website.name}}" stepKey="verifyThatCorrectWebsiteFound"/>
36+
<click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clickEditExistingWebsite"/>
37+
<grabFromCurrentUrl regex="~(\d+)/~" stepKey="grabFromCurrentUrl"/>
38+
</actionGroup>
2539
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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="ProductAssignToWebsite" type="product_website_link">
12+
<var key="sku" entityKey="sku" entityType="product"/>
13+
</entity>
14+
</entities>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
11+
<operation name="ProductWebsiteLink" dataType="product_website_link" type="create" auth="adminOauth" url="/V1/products/{sku}/websites" method="POST">
12+
<contentType>application/json</contentType>
13+
<object dataType="product_website_link" key="productWebsiteLink">
14+
<field key="sku">string</field>
15+
<field key="websiteId">integer</field>
16+
</object>
17+
</operation>
18+
</operations>

app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetGridToDefaultKeywordSearch"/>
6464
</before>
6565
<after>
66+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
6667
<deleteData createDataKey="createTaxRule" stepKey="deleteTaxRule"/>
6768
<deleteData createDataKey="createProductFPTAttribute" stepKey="deleteProductFPTAttribute"/>
6869
<createData entity="DefaultTaxConfig" stepKey="defaultTaxConfiguration"/>
@@ -88,9 +89,13 @@
8889
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingCartFromMinicart"/>
8990
<!-- Step 4: Open Estimate Shipping and Tax section -->
9091
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingandTax" />
91-
<see selector="{{CheckoutCartSummarySection.country}}" userInput="$$createCustomer.country_id$$" stepKey="checkCustomerCountry" />
92-
<see selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="$$createCustomer.state$$" stepKey="checkCustomerRegion" />
93-
<see selector="{{CheckoutCartSummarySection.postcode}}" userInput="$$createCustomer.postcode$$" stepKey="checkCustomerPostcode" />
92+
<see selector="{{CheckoutCartSummarySection.country}}" userInput="{{US_Address_CA.country_id}}" stepKey="checkCustomerCountry" />
93+
<see selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{US_Address_CA.state}}" stepKey="checkCustomerRegion" />
94+
<grabValueFrom selector="{{CheckoutCartSummarySection.postcode}}" stepKey="grabTextPostCode"/>
95+
<assertEquals message="Customer postcode is invalid" stepKey="checkCustomerPostcode">
96+
<expectedResult type="string">{{US_Address_CA.postcode}}</expectedResult>
97+
<actualResult type="variable">grabTextPostCode</actualResult>
98+
</assertEquals>
9499
<see selector="{{CheckoutCartSummarySection.amountFPT}}" userInput="$10" stepKey="checkFPTAmountCA" />
95100
<see selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="$0.83" stepKey="checkTaxAmountCA" />
96101
<scrollTo selector="{{CheckoutCartSummarySection.taxSummary}}" stepKey="scrollToTaxSummary" />

0 commit comments

Comments
 (0)