Skip to content

Commit d3511ca

Browse files
Merge pull request #9313 from magento-gl/ACQE-7108-mftf-test-mainline-deployment
[Bengals Team] Test Automation & Test Fix Tasks Release
2 parents 30d0b82 + bebdf33 commit d3511ca

File tree

9 files changed

+272
-14
lines changed

9 files changed

+272
-14
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAddProductCustomOptionActionGroup.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

9-
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<!-- Add custom option, title and type -->
1212
<actionGroup name="AdminAddProductCustomOptionActionGroup">
@@ -17,9 +17,10 @@
1717
<argument name="customOptionTitle" type="string"/>
1818
<argument name="customOptionType" type="string"/>
1919
</arguments>
20-
20+
2121
<scrollTo selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="scrollToCustomizableOptionsSection"/>
2222
<waitForPageLoad stepKey="waitForScrolling"/>
23+
<conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSection"/>
2324
<click stepKey="clickAddOptions" selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}"/>
2425
<waitForPageLoad stepKey="waitForAddProductPageLoad"/>
2526
<fillField stepKey="fillInOptionTitle" selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput="{{customOptionTitle}}"/>

app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -475,5 +475,16 @@
475475
<data key="is_filterable_in_grid">true</data>
476476
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity>
477477
</entity>
478+
<entity name="productAttributeAgeGroupDropdown" type="ProductAttribute">
479+
<data key="default_frontend_label" unique="suffix">Age Group</data>
480+
<data key="attribute_code" unique="suffix">agegroup</data>
481+
<data key="frontend_input">select</data>
482+
<data key="scope">website</data>
483+
<data key="is_required">false</data>
484+
<data key="is_unique">false</data>
485+
<data key="is_searchable">false</data>
486+
<data key="is_used_for_promo_rules">true</data>
487+
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity>
488+
</entity>
478489
</entities>
479490

app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeOptionData.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -125,4 +125,16 @@
125125
<data key="sort_order">3</data>
126126
<requiredEntity type="StoreLabel">Option14Store1</requiredEntity>
127127
</entity>
128+
<entity name="productAttributeOptionAdult" type="ProductAttributeOption">
129+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
130+
<data key="label">Adult</data>
131+
<data key="is_default">false</data>
132+
<data key="sort_order">0</data>
133+
</entity>
134+
<entity name="productAttributeOptionChildren" type="ProductAttributeOption">
135+
<var key="attribute_code" entityKey="attribute_code" entityType="ProductAttribute"/>
136+
<data key="label">children</data>
137+
<data key="is_default">false</data>
138+
<data key="sort_order">0</data>
139+
</entity>
128140
</entities>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -91,6 +91,6 @@
9191
<element name="customTextAttribute" type="input" selector="//input[@name='product[{{attribute_code}}]']" parameterized="true"/>
9292
<element name="customSelectAttribute" type="select" selector="//select[@name='product[{{attribute_code}}]']" parameterized="true"/>
9393
<element name="customSwitcherAttribute" type="checkbox" selector="//input[@name='product[{{attribute_code}}]' and @value='{{checked_value}}']/parent::div[@data-role='switcher']" parameterized="true"/>
94-
94+
<element name="attributeOptionUncheckDefaultValue" type="checkbox" selector="input[name='use_default[{{attribute_code}}]']" parameterized="true"/>
9595
</section>
9696
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontVerifySingleProductCatalogPriceRuleAcrossWebsitesTest">
11+
<annotations>
12+
<features value="CatalogRule"/>
13+
<stories value="Apply catalog price rule"/>
14+
<title value="Catalog rule should apply for product on multiple websites"/>
15+
<description value="Testcase verifies On storefront catalog price rule applied for product on multiple websites"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-7409"/>
18+
</annotations>
19+
<before>
20+
<!--Create dropdown product attribute-->
21+
<createData entity="productAttributeAgeGroupDropdown" stepKey="createDropdownAttribute"/>
22+
<!--Create attribute options-->
23+
<createData entity="productAttributeOptionAdult" stepKey="createFirstAttributeOption">
24+
<requiredEntity createDataKey="createDropdownAttribute"/>
25+
</createData>
26+
<createData entity="productAttributeOptionChildren" stepKey="createSecondAttributeOption">
27+
<requiredEntity createDataKey="createDropdownAttribute"/>
28+
</createData>
29+
<!--Add attribute to default attribute set-->
30+
<createData entity="AddToDefaultSet" stepKey="addAttributeToDefaultSet">
31+
<requiredEntity createDataKey="createDropdownAttribute"/>
32+
</createData>
33+
<!-- Create Simple Product -->
34+
<createData entity="SimpleProduct" stepKey="createProduct">
35+
<field key="price">100.00</field>
36+
</createData>
37+
<!-- Login as Admin -->
38+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
39+
<!--Create custom website -->
40+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createCustomWebsite">
41+
<argument name="newWebsiteName" value="{{NewWebSiteData.name}}"/>
42+
<argument name="websiteCode" value="{{NewWebSiteData.code}}"/>
43+
</actionGroup>
44+
<!-- Create custom store-->
45+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createCustomStore">
46+
<argument name="website" value="{{NewWebSiteData.name}}"/>
47+
<argument name="storeGroupName" value="{{NewWebSiteData.name}}"/>
48+
<argument name="storeGroupCode" value="{{NewWebSiteData.code}}"/>
49+
</actionGroup>
50+
<!-- Create custom store view-->
51+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
52+
<argument name="StoreGroup" value="NewWebSiteData"/>
53+
<argument name="customStore" value="NewWebSiteData"/>
54+
</actionGroup>
55+
</before>
56+
<after>
57+
<!--set main website as default-->
58+
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setMainWebsiteAsDefault">
59+
<argument name="websiteName" value="Main Website"/>
60+
</actionGroup>
61+
<!-- Delete product -->
62+
<deleteData createDataKey="createProduct" stepKey="deleteFirstProduct"/>
63+
<deleteData createDataKey="createDropdownAttribute" stepKey="deleteDropdownAttribute"/>
64+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteCustomWebsite">
65+
<argument name="websiteName" value="{{NewWebSiteData.name}}"/>
66+
</actionGroup>
67+
<!-- Delete created price rules -->
68+
<actionGroup ref="RemoveCatalogPriceRuleActionGroup" stepKey="deleteCatalogPriceRule">
69+
<argument name="ruleName" value="{{_defaultCatalogRule.name}}"/>
70+
</actionGroup>
71+
<!-- Logout -->
72+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
73+
</after>
74+
<!--Assign product to custom website-->
75+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
76+
<argument name="productId" value="$$createProduct.id$$"/>
77+
</actionGroup>
78+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
79+
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectWebsiteInProduct">
80+
<argument name="website" value="{{NewWebSiteData.name}}"/>
81+
</actionGroup>
82+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
83+
<!--Switch scope to Default store view-->
84+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreView">
85+
<argument name="storeViewName" value="'Default Store View'"/>
86+
</actionGroup>
87+
<uncheckOption selector="{{AdminProductFormSection.attributeOptionUncheckDefaultValue('$$createDropdownAttribute.attribute_code$$')}}" stepKey="unCheckDefaultValueInDefaultStoreview"/>
88+
<selectOption selector="{{AdminProductFormSection.customSelectAttribute('$$createDropdownAttribute.attribute_code$$')}}" userInput="Adult" stepKey="selectValueForAttributeInDefaultStoreview"/>
89+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductInDefaultStoreView"/>
90+
<!--Switch scope to custom store view-->
91+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="switchScopeToCustomStoreView">
92+
<argument name="storeViewName" value="{{NewWebSiteData.name}}"/>
93+
</actionGroup>
94+
<uncheckOption selector="{{AdminProductFormSection.attributeOptionUncheckDefaultValue('$$createDropdownAttribute.attribute_code$$')}}" stepKey="unCheckDefaultValueInCustomStoreview"/>
95+
<selectOption selector="{{AdminProductFormSection.customSelectAttribute('$$createDropdownAttribute.attribute_code$$')}}" userInput="children" stepKey="selectValueForAttributeInCustomStoreview"/>
96+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductInCustomStoreView"/>
97+
<!-- create catalog price with 50% discount and condition -->
98+
<actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="openNewCatalogPriceRulePage"/>
99+
<actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForSecondCatalogPriceRule">
100+
<argument name="websites" value="'Main Website',{{NewWebSiteData.name}}"/>
101+
</actionGroup>
102+
<actionGroup ref="AdminFillCatalogRuleConditionWithSelectAttributeActionGroup" stepKey="fillConditionsForCatalogPriceRule">
103+
<argument name="condition" value="$$createDropdownAttribute.default_frontend_label$$"/>
104+
<argument name="conditionValue" value="Adult"/>
105+
</actionGroup>
106+
<actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForCatalogPriceRule">
107+
<argument name="discountAmount" value="50"/>
108+
</actionGroup>
109+
<actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
110+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
111+
<argument name="indices" value=""/>
112+
</actionGroup>
113+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
114+
<argument name="tags" value="config full_page"/>
115+
</actionGroup>
116+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
117+
<argument name="product" value="$$createProduct$$"/>
118+
</actionGroup>
119+
<waitForText selector="{{StorefrontProductInfoMainSection.updatedPrice}}" userInput="$50.00" stepKey="assertProductPriceAmountOnMainWebsite"/>
120+
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setSecondaryWebsiteAsDefault">
121+
<argument name="websiteName" value="{{NewWebSiteData.name}}"/>
122+
</actionGroup>
123+
<!-- Clean config and full page cache-->
124+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
125+
<argument name="tags" value="config full_page"/>
126+
</actionGroup>
127+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductOnStorefront">
128+
<argument name="product" value="$$createProduct$$"/>
129+
</actionGroup>
130+
<waitForText selector="{{StorefrontProductInfoMainSection.updatedPrice}}" userInput="$100.00" stepKey="assertProductPriceAmountOnCustomWebsite"/>
131+
</test>
132+
</tests>

app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/StorefrontFillFormAdvancedSearchActionGroup.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -17,11 +17,17 @@
1717
<argument name="price_from" type="string" defaultValue=""/>
1818
<argument name="price_to" type="string" defaultValue=""/>
1919
</arguments>
20+
<clearField selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" stepKey="clearName"/>
2021
<fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" userInput="{{productName}}" stepKey="fillName"/>
22+
<clearField selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" stepKey="clearSku"/>
2123
<fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" userInput="{{sku}}" stepKey="fillSku"/>
24+
<clearField selector="{{StorefrontCatalogSearchAdvancedFormSection.Description}}" stepKey="clearDescription"/>
2225
<fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.Description}}" userInput="{{description}}" stepKey="fillDescription"/>
26+
<clearField selector="{{StorefrontCatalogSearchAdvancedFormSection.ShortDescription}}" stepKey="clearShortDescription"/>
2327
<fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.ShortDescription}}" userInput="{{short_description}}" stepKey="fillShortDescription"/>
28+
<clearField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" stepKey="clearPriceFrom"/>
2429
<fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" userInput="{{price_from}}" stepKey="fillPriceFrom"/>
30+
<clearField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" stepKey="clearPriceTo"/>
2531
<fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" userInput="{{price_to}}" stepKey="fillPriceTo"/>
2632
<scrollTo selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="scrollToSubmitButton"/>
2733
<click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="clickSubmit"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</actionGroup>
3232
<actionGroup ref="PreviewEmailTemplateActionGroup" stepKey="previewTemplate"/>
3333
<actionGroup ref="AssertEmailTemplateContentActionGroup" stepKey="assertContent">
34-
<argument name="expectedContent" value="{{EmailTemplateWithStoreddXSS.expectedTemplate}}"/>
34+
<argument name="expectedContent" value=""/>
3535
</actionGroup>
3636
</test>
3737
</tests>

app/code/Magento/SalesRule/Test/Mftf/Data/SalesRuleData.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,4 +704,21 @@
704704
<data key="apply">Percent of product price discount</data>
705705
<data key="discountAmount">10</data>
706706
</entity>
707+
<entity name="CartPriceRuleWithMaximumQuantity1">
708+
<data key="name" unique="suffix">Cart Price Rule WithMaximum Quantity 1</data>
709+
<data key="description">Description for Cart Price Rule</data>
710+
<data key="is_active">Yes</data>
711+
<data key="websites">Main Website</data>
712+
<data key="customerGroups">NOT LOGGED IN</data>
713+
<data key="coupon_type">No Coupon</data>
714+
<data key="totalItemQuantity">3</data>
715+
<data key="simple_action">Percent of product price discount</data>
716+
<data key="discount_amount">60</data>
717+
<data key="maximumQtyDiscount">1</data>
718+
<data key="discount_step">1</data>
719+
<data key="apply_to_shipping">0</data>
720+
<data key="simple_free_shipping">No</data>
721+
<data key="defaultRuleLabelAllStoreViews">Total Items Quantity-Not Applied test</data>
722+
<data key="defaultStoreView">Total Items Quantity-Not Applied test</data>
723+
</entity>
707724
</entities>

0 commit comments

Comments
 (0)