Skip to content

Commit 9cb846b

Browse files
Merge pull request #4698 from magento-epam/EPAM-PR-69
EPAM-PR-69
2 parents 0a92770 + 5816123 commit 9cb846b

18 files changed

+137
-25
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteTestWebsite">
4141
<argument name="websiteName" value="{{customWebsite.name}}"/>
4242
</actionGroup>
43+
<actionGroup ref="GoToProductCatalogPage" stepKey="goToProductCatalogPage"/>
44+
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGridColumnsInitial"/>
4345
<actionGroup ref="ResetWebUrlOptions" stepKey="resetUrlOption"/>
4446
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
4547
<magentoCLI command="cache:flush" stepKey="flushCache"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<description value="Admin should be able to see the full title of the selected custom option value in the order"/>
1818
<severity value="MAJOR"/>
1919
<testCaseId value="MC-3043"/>
20+
<skip>
21+
<issueId value="MQE-1128"/>
22+
</skip>
2023
</annotations>
2124
<before>
2225
<!--Create Simple Product with Custom Options-->

app/code/Magento/CatalogSearch/Test/Mftf/Section/AdminCatalogSearchTermIndexSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
<element name="emptyRecords" type="text" selector="//tr[@class='data-grid-tr-no-data even']/td[@class='empty-text']"/>
2222
<element name="gridRow" type="text" selector="//tr[@data-role='row']"/>
2323
<element name="numberOfSearchTermResults" type="text" selector="//tr[@data-role='row']/td[@data-column='num_results']"/>
24+
<element name="selectMassActionCheckbox" type="select" selector="//select[@id='search_term_grid_massaction-mass-select']"/>
2425
</section>
2526
</sections>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/OtherPayPalConfigurationActionGroup.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,21 @@
2828
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
2929
<waitForPageLoad stepKey="waitForPageLoad2"/>
3030
</actionGroup>
31-
31+
<actionGroup name="EnablePayPalSolutionWithoutSave" >
32+
<annotations>
33+
<description>Expands the 'OTHER PAYPAL PAYMENT SOLUTIONS' tab on the Admin Configuration page. Enables the provided PayPal Config type for the provided Country Code without saving.</description>
34+
</annotations>
35+
<arguments>
36+
<argument name="payPalConfigType"/>
37+
<argument name="countryCode" type="string" defaultValue="us"/>
38+
</arguments>
39+
<waitForElementVisible selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForOtherPayPalPaymentsSection"/>
40+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="clickOtherPayPalPaymentsSection"/>
41+
<waitForElementVisible selector="{{payPalConfigType.configureBtn(countryCode)}}" stepKey="waitForWPSExpressConfigureBtn"/>
42+
<click selector="{{payPalConfigType.configureBtn(countryCode)}}" stepKey="clickWPSExpressConfigureBtn"/>
43+
<waitForElementVisible selector="{{payPalConfigType.enableSolution(countryCode)}}" stepKey="waitForWPSExpressEnable"/>
44+
<selectOption selector="{{payPalConfigType.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableWPSExpressSolution"/>
45+
</actionGroup>
3246
<actionGroup name="CheckEnableOptionPayPalConfiguration">
3347
<annotations>
3448
<description>Expands the 'OTHER PAYPAL PAYMENT SOLUTIONS' tab on the Admin Configuration page. Enables the provided PayPal Config type for the provided Country Code.</description>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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="AdminOnePayPalSolutionsEnabledAtTheSameTimeTest">
12+
<annotations>
13+
<features value="Paypal"/>
14+
<stories value="Payment methods configuration"/>
15+
<title value="Only one PayPal solution enabled at the same time"/>
16+
<description value="Verify that only one PayPal solution can be enabled"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-17776"/>
19+
<useCaseId value=" MC-15140"/>
20+
<group value="paypal"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
<!--Set PayPal Payments Standard Configs-->
25+
<comment userInput="Set PayPal Payments Standard Configs" stepKey="commentsetConfigs"/>
26+
<magentoCLI command="config:set paypal/wpp/api_authentication 0" stepKey="setApiAuthentication"/>
27+
<magentoCLI command="config:set paypal/wpp/api_username username" stepKey="setApiUserName"/>
28+
<magentoCLI command="config:set paypal/wpp/api_password password" stepKey="setApiPassword"/>
29+
<magentoCLI command="config:set paypal/wpp/api_signature signature" stepKey="setApiSignature"/>
30+
<magentoCLI command="config:set paypal/wpp/sandbox_flag 1" stepKey="setSandBox"/>
31+
<magentoCLI command="config:set paypal/wpp/use_proxy 0" stepKey="setUseProxy"/>
32+
<magentoCLI command="config:set payment/wps_express/active 1" stepKey="enableWPSExpress"/>
33+
</before>
34+
<after>
35+
<actionGroup ref="logout" stepKey="logout"/>
36+
<magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/>
37+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disableExpressCheckout"/>
38+
</after>
39+
<!--Try to enable express checkout Solution-->
40+
<comment userInput="Try to enable express checkout Solution" stepKey="commentTryEnableExpressCheckout"/>
41+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
42+
<actionGroup ref="EnablePayPalSolutionWithoutSave" stepKey="enableExpressCheckout">
43+
<argument name="payPalConfigType" value="WPSExpressConfigSection"/>
44+
<argument name="countryCode" value="us"/>
45+
</actionGroup>
46+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
47+
<waitForPageLoad stepKey="waitForPageLoad2"/>
48+
<actionGroup ref="EnablePayPalSolutionWithoutSave" stepKey="enableExpressCheckout2">
49+
<argument name="payPalConfigType" value="PayPalExpressCheckoutConfigSection"/>
50+
<argument name="countryCode" value="us"/>
51+
</actionGroup>
52+
<seeInPopup userInput="There is already another PayPal solution enabled. Enable this solution instead?" stepKey="seeAlertMessage"/>
53+
<cancelPopup stepKey="cancelPopup"/>
54+
<!--Check only the correct solution is enabled -->
55+
<comment userInput="Check only the correct solution is enabled" stepKey="commentCheckOnlyTheCorrectSolutionIsEnabled"/>
56+
<conditionalClick selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" dependentSelector="{{PayPalExpressCheckoutConfigSection.enableSolution('us')}}" visible="false" stepKey="clickPayPalExpressCheckoutSection"/>
57+
<seeOptionIsSelected selector="{{PayPalExpressCheckoutConfigSection.enableSolution('us')}}" userInput="No" stepKey="seeSelectedOption"/>
58+
</test>
59+
</tests>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_ca.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
193193
<argument name="wps_other">wps_other</argument>
194194
<argument name="payflow_link_ca">payflow_link_ca</argument>
195195
</rule>
196+
<rule type="simpleDisable" event="deactivate-rule"/>
196197
<rule type="inContextEnable" event="activate-rule"/>
197198
<rule type="inContextDisable" event="deactivate-rule"/>
198199
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_es.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<rule type="paypalExpressMarkDisable" event="deactivate-rule">
8686
<argument name="wps_other">wps_other</argument>
8787
</rule>
88+
<rule type="simpleDisable" event="deactivate-rule"/>
8889
<rule type="inContextEnable" event="activate-rule"/>
8990
<rule type="inContextDisable" event="deactivate-rule"/>
9091
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_fr.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<rule type="paypalExpressMarkDisable" event="deactivate-rule">
8686
<argument name="wps_other">wps_other</argument>
8787
</rule>
88+
<rule type="simpleDisable" event="deactivate-rule"/>
8889
<rule type="inContextEnable" event="activate-rule"/>
8990
<rule type="inContextDisable" event="deactivate-rule"/>
9091
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_gb.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<rule type="paypalExpressMarkDisable" event="deactivate-rule">
8686
<argument name="wps_express">wps_express</argument>
8787
</rule>
88+
<rule type="simpleDisable" event="deactivate-rule"/>
8889
<rule type="inContextEnable" event="activate-rule"/>
8990
<rule type="inContextDisable" event="deactivate-rule"/>
9091
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_hk.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<rule type="paypalExpressMarkDisable" event="deactivate-rule">
8686
<argument name="wps_other">wps_other</argument>
8787
</rule>
88+
<rule type="simpleDisable" event="deactivate-rule"/>
8889
<rule type="inContextEnable" event="activate-rule"/>
8990
<rule type="inContextDisable" event="deactivate-rule"/>
9091
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_it.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<rule type="paypalExpressMarkDisable" event="deactivate-rule">
8686
<argument name="wps_other">wps_other</argument>
8787
</rule>
88+
<rule type="simpleDisable" event="deactivate-rule"/>
8889
<rule type="inContextEnable" event="activate-rule"/>
8990
<rule type="inContextDisable" event="deactivate-rule"/>
9091
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_jp.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<rule type="paypalExpressMarkDisable" event="deactivate-rule">
8686
<argument name="wps_other">wps_other</argument>
8787
</rule>
88+
<rule type="simpleDisable" event="deactivate-rule"/>
8889
<rule type="inContextEnable" event="activate-rule"/>
8990
<rule type="inContextDisable" event="deactivate-rule"/>
9091
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_nz.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<rule type="paypalExpressMarkDisable" event="deactivate-rule">
8686
<argument name="wps_other">wps_other</argument>
8787
</rule>
88+
<rule type="simpleDisable" event="deactivate-rule"/>
8889
<rule type="inContextEnable" event="activate-rule"/>
8990
<rule type="inContextDisable" event="deactivate-rule"/>
9091
<rule type="inContextShowMerchantId" event="activate-rule"/>

app/code/Magento/Paypal/etc/adminhtml/rules/payment_us.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@
414414
<argument name="paypal_payflowpro_with_express_checkout">paypal_payflowpro_with_express_checkout</argument>
415415
<argument name="payflow_link_us">payflow_link_us</argument>
416416
</rule>
417+
<rule type="simpleDisable" event="deactivate-rule"/>
417418
<rule type="inContextEnable" event="activate-rule"/>
418419
<rule type="inContextDisable" event="deactivate-rule"/>
419420
<rule type="inContextShowMerchantId" event="activate-rule"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,4 +535,7 @@
535535
<waitForPageLoad stepKey="waitForSubmitOrder"/>
536536
<see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/>
537537
</actionGroup>
538+
<actionGroup name="CreateOrderFilteringCustomerByEmailActionGroup" extends="CreateOrderActionGroup">
539+
<click stepKey="chooseCustomer" selector="{{AdminOrdersGridSection.customerInOrdersSection(customer.email)}}"/>
540+
</actionGroup>
538541
</actionGroups>

app/code/Magento/Search/Test/Mftf/ActionGroup/AdminSearchTermActionGroup.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,12 @@
3636
<click selector="{{AdminCatalogSearchTermIndexSection.okButton}}" stepKey="clickOkButton"/>
3737
<waitForElementVisible selector="{{AdminCatalogSearchTermMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/>
3838
</actionGroup>
39+
40+
<!-- Delete all existing search terms -->
41+
<actionGroup name="DeleteAllSearchTerms">
42+
<selectOption userInput="selectAll" selector="{{AdminCatalogSearchTermIndexSection.selectMassActionCheckbox}}" stepKey="checkAllSearchTerms"/>
43+
<selectOption selector="{{AdminCatalogSearchTermIndexSection.massActions}}" userInput="delete" stepKey="selectDeleteOption"/>
44+
<click selector="{{AdminCatalogSearchTermIndexSection.submit}}" stepKey="clickSubmitButton"/>
45+
<click selector="{{AdminCatalogSearchTermIndexSection.okButton}}" stepKey="clickOkButton"/>
46+
</actionGroup>
3947
</actionGroups>

app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,64 +16,69 @@
1616
<severity value="CRITICAL"/>
1717
<testCaseId value="MC-14765"/>
1818
<group value="mtf_migrated"/>
19-
<skip>
20-
<issueId value="MC-17012"/>
21-
</skip>
2219
</annotations>
23-
2420
<before>
2521
<!-- Login as admin -->
22+
<comment userInput="Login as admin" stepKey="loginAsAdminComment"/>
2623
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
27-
24+
<!-- Go to the catalog search term page -->
25+
<comment userInput="Go to the catalog search term page" stepKey="goToSearchTermPageComment"/>
26+
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage"/>
27+
<waitForPageLoad stepKey="waitForAdminCatalogSearchTermIndexPageLoad"/>
28+
<!-- Delete all search terms -->
29+
<comment userInput="Delete all search terms" stepKey="deleteAllSearchTermsComment"/>
30+
<actionGroup ref="DeleteAllSearchTerms" stepKey="deleteAllSearchTerms"/>
2831
<!-- Create product with description -->
32+
<comment userInput="Create product with description" stepKey="createProductWithDescriptionComment"/>
2933
<createData entity="SimpleProductWithDescription" stepKey="simpleProduct"/>
3034
</before>
3135
<after>
32-
<!--Delete create product -->
33-
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
34-
35-
<!--Go to the catalog search term page -->
36+
<!-- Delete created product -->
37+
<comment userInput="Delete created product" stepKey="deleteCreatedProductComment"/>
38+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
39+
<!-- Go to the catalog search term page -->
40+
<comment userInput="Go to the catalog search term page" stepKey="goToSearchTermPageComment2"/>
3641
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage"/>
3742
<waitForPageLoad stepKey="waitForAdminCatalogSearchTermIndexPageLoad"/>
38-
39-
<!--Filter the search term -->
43+
<!-- Filter the search term -->
44+
<comment userInput="Filter search term" stepKey="filterSearchTermComment"/>
4045
<actionGroup ref="searchTermFilterBySearchQuery" stepKey="filterByThirdSearchQuery">
4146
<argument name="searchQuery" value="{{ApiProductDescription.value}}"/>
4247
</actionGroup>
43-
4448
<!-- Delete created below search terms -->
49+
<comment userInput="Delete created below search terms" stepKey="deleteCreatedBelowSearchTermsComment"/>
4550
<actionGroup ref="deleteSearchTerm" stepKey="deleteSearchTerms"/>
4651
<actionGroup ref="logout" stepKey="logout"/>
4752
</after>
48-
4953
<!-- Go to storefront home page -->
54+
<comment userInput="Go to storefront home page" stepKey="goToStorefrontHomePageComment"/>
5055
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
51-
52-
<!--Storefront quick search by product name -->
56+
<!-- Storefront quick search by product name -->
57+
<comment userInput="Storefront quick search by product name" stepKey="storefrontQuickSearchByProductNameComment"/>
5358
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName">
5459
<argument name="phrase" value="{{ApiProductDescription.value}}"/>
5560
</actionGroup>
56-
57-
<!--Verify search suggestions and select the suggestion from dropdown options -->
61+
<!-- Verify search suggestions and select the suggestion from dropdown options -->
62+
<comment userInput="Verify search suggestions and select the suggestion from dropdown options" stepKey="verifySearchSuggestionsComment"/>
5863
<actionGroup ref="StoreFrontSelectDropDownSearchSuggestionActionGroup" stepKey="seeDropDownSearchSuggestion">
5964
<argument name="searchQuery" value="{{ApiProductDescription.value}}"/>
6065
</actionGroup>
61-
6266
<!-- Assert Product storefront main page -->
67+
<comment userInput="See product name" stepKey="seeProductNameComment"/>
6368
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductName">
6469
<argument name="productName" value="$$simpleProduct.name$$"/>
6570
</actionGroup>
66-
67-
<!--Go to the catalog search term page -->
71+
<!-- Go to the catalog search term page -->
72+
<comment userInput="Go to the catalog search term page" stepKey="goToSearchTermPageComment3"/>
6873
<amOnPage url="{{AdminCatalogSearchTermIndexPage.url}}" stepKey="openAdminCatalogSearchTermIndexPage"/>
6974
<waitForPageLoad stepKey="waitForAdminCatalogSearchTermIndexPageLoad"/>
70-
71-
<!--Filter the search term -->
75+
<!-- Filter the search term -->
76+
<comment userInput="Filter search term" stepKey="filterSearchTermComment2"/>
7277
<actionGroup ref="searchTermFilterBySearchQuery" stepKey="filterByThirdSearchQuery">
7378
<argument name="searchQuery" value="{{ApiProductDescription.value}}"/>
7479
</actionGroup>
75-
76-
<!--Assert Search Term in grid -->
80+
<!-- Assert Search Term in grid -->
81+
<comment userInput="Check is search term in grid or not" stepKey="isSearchTermInGridComment"/>
7782
<see stepKey="seeSearchTermInGrid" selector="{{AdminCatalogSearchTermIndexSection.gridRow}}" userInput="{{ApiProductDescription.value}}" />
7883
<see selector="{{AdminCatalogSearchTermIndexSection.numberOfSearchTermResults}}" userInput="1" stepKey="seeNumberOfSearchTermResultInGrid"/>
7984
</test>

app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupTest.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
<createData stepKey="b2" entity="customStoreGroup"/>
2222
</before>
2323
<after>
24+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStoreGroup">
25+
<argument name="storeGroupName" value="customStoreGroup.name" />
26+
</actionGroup>
27+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStoreGroup2">
28+
<argument name="storeGroupName" value="customStoreGroup.name" />
29+
</actionGroup>
30+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
31+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
2432
<amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/>
2533
</after>
2634

0 commit comments

Comments
 (0)