Skip to content

Commit 9f093a3

Browse files
authored
Merge pull request #5388 from magento-tsg/2.4-develop-pr19
[TSG] TESTs Fixes for 2.4 (pr19) (2.4-develop)
2 parents 24c2169 + c0bc92c commit 9f093a3

8 files changed

+112
-47
lines changed

app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@
1111
<test name="EndToEndB2CLoggedInUserTest">
1212
<annotations>
1313
<features value="End to End scenarios"/>
14-
<stories value="B2C logged in user - MAGETWO-72524"/>
14+
<stories value="B2C logged in user - MC-25681"/>
1515
<group value="e2e"/>
1616
<title value="You should be able to pass End to End B2C Logged In User scenario"/>
1717
<description value="New user signup and browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/>
1818
<severity value="CRITICAL"/>
19-
<testCaseId value="MAGETWO-87653"/>
20-
<skip>
21-
<issueId value="MC-17140"/>
22-
</skip>
19+
<testCaseId value="MC-25681"/>
20+
<group value="SearchEngineMysql"/>
2321
</annotations>
2422
<before>
2523
<resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/>
2624
</before>
2725
<after>
26+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
27+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
28+
<actionGroup ref="DeleteCustomerFromAdminActionGroup" stepKey="deleteCustomerFromAdmin"/>
2829
<actionGroup ref="logout" stepKey="adminLogout"/>
2930
</after>
3031
<!-- Step 0: User signs up an account -->
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
<actionGroup name="AdminUploadTransactionEmailsImageActionGroup">
12+
<annotations>
13+
<description>Upload logo image for email</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="image" type="string" defaultValue="{{MagentoLogo.file}}"/>
17+
<argument name="width" type="string" defaultValue="200"/>
18+
<argument name="height" type="string" defaultValue="100"/>
19+
</arguments>
20+
21+
<conditionalClick selector="{{AdminDesignConfigSection.transactionalEmailSectionHeader}}" dependentSelector="{{AdminDesignConfigSection.transactionalEmailSectionBody}}" visible="false" stepKey="openTransactionalEmailSection"/>
22+
<waitForElementVisible selector="{{AdminDesignConfigSection.logoImageAlt}}" stepKey="waitVisibleUploadLogo"/>
23+
<attachFile selector="{{AdminDesignConfigSection.logoUpload}}" userInput="{{image}}" stepKey="attachLogo"/>
24+
<waitForElementVisible selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="waitingForLogoToUpload"/>
25+
<seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="logoPreviewIsVisible"/>
26+
<fillField selector="{{AdminDesignConfigSection.logoImageAlt}}" userInput="{{image}}" stepKey="fillFieldImageAlt"/>
27+
<fillField selector="{{AdminDesignConfigSection.logoImageWidth}}" userInput="{{width}}" stepKey="fillFieldImageWidth"/>
28+
<fillField selector="{{AdminDesignConfigSection.logoImageHeight}}" userInput="{{height}}" stepKey="fillFieldImageHeight"/>
29+
</actionGroup>
30+
</actionGroups>

app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,44 @@
1111
<test name="TransactionalEmailsLogoUploadTest">
1212
<annotations>
1313
<features value="Email"/>
14-
<stories value="Email"/>
15-
<title value="MC-13908: Uploading a Transactional Emails logo"/>
14+
<stories value="Transactional Emails logo"/>
15+
<title value="Uploading a Transactional Emails logo"/>
1616
<description value="Transactional Emails Logo should be able to be uploaded in the admin and previewed"/>
1717
<severity value="CRITICAL"/>
18-
<testCaseId value="MC-13908"/>
19-
<group value="LogoUpload"/>
20-
<skip>
21-
<issueId value="MC-18496"/>
22-
</skip>
18+
<testCaseId value="MC-27620"/>
19+
<useCaseId value="MC-10932"/>
20+
<group value="theme"/>
21+
<group value="email"/>
2322
</annotations>
24-
<!--Login to Admin Area-->
2523
<before>
26-
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/>
24+
<!--Login to Admin Area-->
25+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2726
</before>
28-
<!--Logout from Admin Area-->
2927
<after>
30-
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
28+
<!-- Clear filter on Design Config Page -->
29+
<amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" />
30+
<waitForPageLoad stepKey="waitForPageLoadToViewDesignConfigPage"/>
31+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
32+
<!--Logout from Admin Area-->
33+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
3134
</after>
3235
<!--Navigate to content->Design->Config page-->
3336
<amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" />
34-
<waitForPageLoad stepKey="waitForPageloadToViewDesignConfigPage"/>
35-
<click selector="{{AdminDesignConfigSection.scopeRow('3')}}" stepKey="editStoreView"/>
37+
<waitForPageLoad stepKey="waitForPageLoadToViewDesignConfigPage"/>
38+
<actionGroup ref="AdminGridFilterSearchResultsBySelectActionGroup" stepKey="filterThemeDesignConfiguration">
39+
<argument name="attributeSelector" value="store_id"/>
40+
<argument name="attributeValue" value="{{_defaultStore.name}}"/>
41+
</actionGroup>
42+
<click selector="{{AdminDesignConfigSection.scopeRow('1')}}" stepKey="editStoreView"/>
3643
<waitForPageLoad stepKey="waitForPageLoadToOpenStoreViewEditPage"/>
37-
<!--Click Upload logo in Transactional Emails and upload the image and preview it-->
38-
<click selector="{{AdminDesignConfigSection.logoWrapperOpen}}" stepKey="openTab" />
39-
<attachFile selector="{{AdminDesignConfigSection.logoUpload}}" userInput="{{MagentoLogo.file}}" stepKey="attachLogo"/>
40-
<wait time="5" stepKey="waitingForLogoToUpload" />
41-
<seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="LogoPreviewIsVisible"/>
44+
<!-- Upload Image -->
45+
<actionGroup ref="AdminUploadTransactionEmailsImageActionGroup" stepKey="uploadImage">
46+
<argument name="width" value="200"/>
47+
<argument name="height" value="100"/>
48+
</actionGroup>
49+
<!--Save Design Configuration -->
50+
<actionGroup ref="ClickSaveButtonActionGroup" stepKey="saveDesignConfiguration">
51+
<argument name="message" value="You saved the configuration."/>
52+
</actionGroup>
4253
</test>
4354
</tests>

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@
1414
<title value="Create Credit Memo for Offline Payment Methods"/>
1515
<description value="Create CreditMemo return to stock only one unit of configurable product"/>
1616
<severity value="CRITICAL"/>
17-
<testCaseId value="MC-15865"/>
17+
<testCaseId value="MC-28444"/>
1818
<group value="sales"/>
1919
<group value="mtf_migrated"/>
2020
</annotations>
2121
<before>
22-
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
23-
24-
<!-- Create Data -->
2522
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
26-
27-
<!-- Create the category -->
2823
<createData entity="ApiCategory" stepKey="createCategory"/>
2924

3025
<!-- Create the configurable product and add it to the category -->
@@ -88,6 +83,7 @@
8883
<!-- Enable payment method one of "Check/Money Order" and shipping method one of "Flat Rate" -->
8984
<magentoCLI command="config:set {{enabledCheckMoneyOrder.label}} {{enabledCheckMoneyOrder.value}}" stepKey="enableCheckMoneyOrder"/>
9085
<createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/>
86+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
9187
</before>
9288
<after>
9389
<!-- Delete data -->
@@ -97,8 +93,10 @@
9793
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
9894
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
9995
<deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/>
100-
<actionGroup ref="logout" stepKey="logout"/>
10196

97+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
98+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductGridFilters"/>
99+
<actionGroup ref="logout" stepKey="logout"/>
102100
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
103101
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/>
104102
</after>
@@ -109,9 +107,9 @@
109107

110108
<!--Add configurable product to order-->
111109
<actionGroup ref="AddConfigurableProductToOrderFromAdminActionGroup" stepKey="addConfigurableProductToOrder">
112-
<argument name="product" value="$$createConfigProduct$$"/>
113-
<argument name="attribute" value="$$createConfigProductAttribute$$"/>
114-
<argument name="option" value="$$getConfigAttributeOption1$$"/>
110+
<argument name="product" value="$createConfigProduct$"/>
111+
<argument name="attribute" value="$createConfigProductAttribute$"/>
112+
<argument name="option" value="$getConfigAttributeOption1$"/>
115113
</actionGroup>
116114

117115
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerInfo">
@@ -121,19 +119,16 @@
121119
<actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="selectFlatRate"/>
122120
<click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/>
123121
<waitForPageLoad stepKey="waitForSubmitOrderPage"/>
124-
<see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/>
122+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageForOrderAppears"/>
123+
<see selector="{{AdminMessagesSection.success}}" userInput="You created the order." stepKey="seeSuccessMessageForOrder"/>
125124

126125
<!-- Create Invoice -->
127126
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startInvoice"/>
128-
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
129-
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForMessageAppears"/>
130-
<see selector="{{AdminMessagesSection.success}}" userInput="The invoice has been created." stepKey="seeInvoiceCreateSuccess"/>
127+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="clickSubmitInvoice"/>
131128

132129
<!-- Go to Sales > Orders > find out placed order and open -->
133-
<grabTextFrom selector="|Order # (\d+)|" stepKey="grabOrderId" />
134-
<assertNotEmpty actual="$grabOrderId" stepKey="assertOrderIdIsNotEmpty" after="grabOrderId"/>
135-
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder">
136-
<argument name="orderId" value="{$grabOrderId}"/>
130+
<actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrder">
131+
<argument name="entityId" value="{$grabOrderIdClickSubmitInvoice}"/>
137132
</actionGroup>
138133

139134
<!-- Click 'Credit Memo' button and fill data from dataset: partial refund -->
@@ -143,11 +138,7 @@
143138
</actionGroup>
144139

145140
<!-- On order's page click 'Refund offline' button -->
146-
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/>
147-
<waitForPageLoad stepKey="waitForResultPage"/>
148-
149-
<!-- Perform all assertions: assert refund success create message -->
150-
<see selector="{{AdminIndexManagementSection.successMessage}}" userInput="You created the credit memo." stepKey="assertRefundSuccessCreateMessage"/>
141+
<actionGroup ref="SubmitCreditMemoActionGroup" stepKey="clickRefundOffline"/>
151142

152143
<!-- Assert product Qty decreased after CreditMemo -->
153144
<actionGroup ref="AdminAssertProductQtyInGridActionGroup" stepKey="assertQtyDecreased">

app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<title value="Category rules should apply to grouped product with invisible individual products"/>
1515
<description value="Category rules should apply to grouped product with invisible individual products"/>
1616
<severity value="CRITICAL"/>
17-
<testCaseId value="MC-13608"/>
17+
<testCaseId value="MC-31863"/>
1818
<group value="SalesRule"/>
1919
</annotations>
2020
<before>

app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
<element name="logoUpload" type ="input" selector="[name='email_logo']" />
2727
<element name="logoWrapperOpen" type ="text" selector="[data-index='email'] [data-state-collapsible ='closed']"/>
2828
<element name="logoPreview" type ="text" selector="[alt ='magento-logo.png']"/>
29+
<element name="logoImageAlt" type ="text" selector="[name='email_logo_alt']"/>
30+
<element name="logoImageWidth" type ="text" selector="[name='email_logo_width']"/>
31+
<element name="logoImageHeight" type ="text" selector="[name='email_logo_height']"/>
2932
<element name="faviconArrow" type="button" selector="#ZmF2aWNvbg-- > .jstree-icon" />
3033
<element name="checkIfFaviconArrowExpand" type="button" selector="//li[@id='ZmF2aWNvbg--' and contains(@class,'jstree-closed')]" />
3134
<element name="storesArrow" type="button" selector="#ZmF2aWNvbi9zdG9yZXM- > .jstree-icon" />
@@ -34,5 +37,7 @@
3437
<element name="imageWatermarkType" type="text" selector="//div[contains(@class, 'fieldset-wrapper-title')]//span[contains(text(), '{{watermarkType}}')]" parameterized="true"/>
3538
<element name="appliedTheme" type="select" selector="select[name='theme_theme_id']"/>
3639
<element name="scopeEditLinkByName" type="button" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[normalize-space(.)= '{{scope}}']/preceding-sibling::th)+1][contains(.,'{{scopeName}}')]/..//a[contains(@class, 'action-menu-item')]" timeout="30" parameterized="true"/>
40+
<element name="transactionalEmailSectionHeader" type="button" selector="[data-index='email'] .fieldset-wrapper-title" timeout="30"/>
41+
<element name="transactionalEmailSectionBody" type="block" selector="[data-index='email'] .admin__fieldset-wrapper-content" timeout="30"/>
3742
</section>
3843
</sections>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<actionGroup name="AdminGridFilterSearchResultsBySelectActionGroup">
12+
<annotations>
13+
<description>Filters an Admin Grid page using the provided Filter Selector and Search Value.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeSelector" type="string" defaultValue="store_id"/>
17+
<argument name="attributeValue" type="string" defaultValue="{{_defaultStore.name}}"/>
18+
</arguments>
19+
20+
<conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector="{{AdminGridFilterControls.clearAll}}" visible="true" stepKey="clearTheFiltersIfPresent"/>
21+
<waitForPageLoad time="30" stepKey="waitForFilterApplied"/>
22+
<click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters"/>
23+
<selectOption selector="{{AdminDataGridFilterSection.filterSelectFieldByName(attributeSelector)}}" userInput="{{attributeValue}}" stepKey="setAttributeValue"/>
24+
<click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters"/>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="filterExpand" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//button[@data-action='grid-filter-expand']" />
1414
<element name="inputFieldByNameAttr" type="input" selector="//*[@data-part='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true" />
1515
<element name="inputFieldByNameAttrInGrid" type="input" selector="//*[@data-role='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true"/>
16+
<element name="filterSelectFieldByName" type="select" selector="//*[@data-part='filter-form']//select[@name='{{fieldName}}']" parameterized="true"/>
1617
<element name="apply" type="button" selector="//*[@data-part='filter-form']//button[@data-action='grid-filter-apply']" />
1718
<element name="clear" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" />
1819
</section>

0 commit comments

Comments
 (0)