Skip to content

Commit d10d88f

Browse files
author
Prabhu Ram
committed
Merge remote-tracking branch 'mainline/2.4-develop' into MC-38927
2 parents b11da0f + af3e2e4 commit d10d88f

File tree

46 files changed

+827
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+827
-197
lines changed
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup">
11+
<annotations>
12+
<description>Validates that the provided Product Name is NOT present on a Storefront page.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="productName" type="string"/>
16+
</arguments>
17+
18+
<waitForPageLoad stepKey="waitForTheProductPageToLoad"/>
19+
<dontSee selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{productName}}" stepKey="dontSeeProductName"/>
20+
</actionGroup>
21+
</actionGroups>

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

+10-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
5656
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus">
5757
<argument name="stockStatus" value="In Stock"/>
58-
</actionGroup>
58+
</actionGroup>
5959

6060
<!-- Create New Product Attribute -->
6161
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>
@@ -128,10 +128,14 @@
128128
<!--Verify Product Attribute present in search page -->
129129
<amOnPage url="$$createCategory.name$$.html" stepKey="goToStorefrontPage1"/>
130130
<waitForPageLoad stepKey="waitForProductFrontPageToLoad1"/>
131-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{ProductAttributeOption8.value}}" stepKey="fillAttribute"/>
132-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
133-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
134-
<waitForPageLoad stepKey="waitForSearch"/>
135-
<see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductNameInCategoryPage"/>
131+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillAttribute">
132+
<argument name="phrase" value="{{ProductAttributeOption8.value}}"/>
133+
</actionGroup>
134+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
135+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
136+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
137+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductNameInCategoryPage">
138+
<argument name="productName" value="{{SimpleProduct.name}}"/>
139+
</actionGroup>
136140
</test>
137141
</tests>

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

+9-5
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,15 @@
125125
<!-- Verify customer see created virtual product with custom options suite and import options(from above step) on storefront page and is searchable by sku -->
126126
<amOnPage url="{{StorefrontProductPage.url(virtualProductCustomImportOptions.urlKey)}}" stepKey="goToProductPage"/>
127127
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
128-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{virtualProductCustomImportOptions.sku}}" stepKey="fillVirtualProductName"/>
129-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
130-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
131-
<waitForPageLoad stepKey="waitForSearch"/>
132-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{virtualProductCustomImportOptions.name}}" stepKey="seeVirtualProductName"/>
128+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillVirtualProductName">
129+
<argument name="phrase" value="{{virtualProductCustomImportOptions.sku}}"/>
130+
</actionGroup>
131+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
132+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
133+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
134+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeVirtualProductName">
135+
<argument name="productName" value="{{virtualProductCustomImportOptions.name}}"/>
136+
</actionGroup>
133137
<click selector="{{StorefrontQuickSearchResultsSection.productLink}}" stepKey="openSearchedProduct"/>
134138

135139
<!-- Verify we see created virtual product with custom options suite and import options on the storefront page -->

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

+10-5
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@
102102

103103
<!-- Verify customer see created virtual product with tier price(from above step) on storefront page and is searchable by sku -->
104104
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
105-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{virtualProductBigQty.sku}}" stepKey="fillVirtualProductName"/>
106-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
107-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
108-
<waitForPageLoad stepKey="waitForSearch"/>
109-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{virtualProductBigQty.name}}" stepKey="seeVirtualProductName"/>
105+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillVirtualProductName">
106+
<argument name="phrase" value="{{virtualProductBigQty.sku}}"/>
107+
</actionGroup>
108+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
109+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
110+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
111+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeVirtualProductName">
112+
<argument name="productName" value="{{virtualProductBigQty.name}}"/>
113+
</actionGroup>
114+
110115
<grabTextFrom selector="{{StorefrontQuickSearchResultsSection.asLowAsLabel}}" stepKey="tierPriceTextOnStorefrontPage"/>
111116
<assertEquals stepKey="assertTierPriceTextOnCategoryPage">
112117
<expectedResult type="string">As low as ${{tierPriceOnVirtualProduct.price}}</expectedResult>

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

+21-10
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,31 @@
7171
<!--Verify customer see default simple product name on magento storefront page -->
7272
<amOnPage url="{{StorefrontProductPage.url($$initialSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="goToMagentoStorefrontPage"/>
7373
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
74-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearchTextBox"/>
75-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
76-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
77-
<waitForPageLoad stepKey="waitForSearch"/>
78-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="$$initialSimpleProduct.name$$" stepKey="seeDefaultProductName"/>
74+
75+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearchTextBox">
76+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
77+
</actionGroup>
78+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
79+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
80+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
81+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeDefaultProductName">
82+
<argument name="productName" value="$$initialSimpleProduct.name$$"/>
83+
</actionGroup>
7984

8085
<!--Verify customer see simple product with updated name on magento storefront page under store view section -->
8186
<click selector="{{StorefrontHeaderSection.storeViewSwitcher}}" stepKey="clickStoreViewSwitcher"/>
8287
<waitForPageLoad stepKey="waitForStoreSwitcherLoad"/>
8388
<click selector="{{StorefrontHeaderSection.storeView(customStoreFR.name)}}" stepKey="clickStoreViewOption"/>
84-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearch"/>
85-
<waitForPageLoad stepKey="waitForSearchTextBoxLoad"/>
86-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextButton"/>
87-
<waitForPageLoad stepKey="waitForTextSearchLoad"/>
88-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{simpleProductDataOverriding.name}}" stepKey="seeUpdatedSimpleProductName"/>
89+
90+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearch">
91+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
92+
</actionGroup>
93+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBoxLoad"/>
94+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextButton"/>
95+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForTextSearchLoad"/>
96+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeUpdatedSimpleProductName">
97+
<argument name="productName" value="{{simpleProductDataOverriding.name}}"/>
98+
</actionGroup>
99+
89100
</test>
90101
</tests>

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

+12-8
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,24 @@
6969
<!-- Verify customer see simple product with updated price on magento storefront page -->
7070
<amOnPage url="{{StorefrontProductPage.url($$initialSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="goToMagentoStorefrontPage"/>
7171
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
72-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearchTextBox"/>
73-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
74-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
75-
<waitForPageLoad stepKey="waitForSearch"/>
72+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearchTextBox">
73+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
74+
</actionGroup>
75+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
76+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
77+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
7678
<see selector="{{StorefrontQuickSearchResultsSection.regularPrice}}" userInput="{{simpleProductDataOverriding.price}}" stepKey="seeUpdatedProductPriceOnStorefrontPage"/>
7779

7880
<!-- Verify customer see simple product with updated price on magento storefront page under store view section -->
7981
<click selector="{{StorefrontHeaderSection.storeViewSwitcher}}" stepKey="clickStoreViewSwitcher"/>
8082
<waitForPageLoad stepKey="waitForStoreSwitcherLoad"/>
8183
<click selector="{{StorefrontHeaderSection.storeView(customStoreFR.name)}}" stepKey="clickStoreViewOption"/>
82-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearch"/>
83-
<waitForPageLoad stepKey="waitForSearchTextBoxLoad"/>
84-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextButton"/>
85-
<waitForPageLoad stepKey="waitForTextSearchLoad"/>
84+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearch">
85+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
86+
</actionGroup>
87+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBoxLoad"/>
88+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextButton"/>
89+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForTextSearchLoad"/>
8690
<see selector="{{StorefrontQuickSearchResultsSection.regularPrice}}" userInput="{{simpleProductDataOverriding.price}}" stepKey="seeUpdatedProductPriceOnStorefrontPageUnderStoreViewSection"/>
8791
</test>
8892
</tests>

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

+10-6
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
<actionGroup ref="AssertAdminProductIsAssignedToCategoryActionGroup" stepKey="seeSelectedCategories">
113113
<argument name="categoryName" value="$$categoryEntity.name$$"/>
114114
</actionGroup>
115-
116115
<scrollTo selector="{{AdminProductSEOSection.sectionHeader}}" x="0" y="-80" stepKey="scrollToAdminProductSEOSection1"/>
117116
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection1"/>
118117
<seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductTierPrice300InStock.urlKey}}" stepKey="seeUrlKey"/>
@@ -144,10 +143,15 @@
144143
<!--Verify customer see updated simple product link on magento storefront page and is searchable by sku -->
145144
<amOnPage url="{{StorefrontProductPage.url(simpleProductTierPrice300InStock.urlKey)}}" stepKey="goToMagentoStorefrontPage"/>
146145
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
147-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{simpleProductTierPrice300InStock.sku}}" stepKey="fillSimpleProductSkuInSearchTextBox"/>
148-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
149-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
150-
<waitForPageLoad stepKey="waitForSearch"/>
151-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{simpleProductTierPrice300InStock.name}}" stepKey="seeProductName"/>
146+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillSimpleProductSkuInSearchTextBox">
147+
<argument name="phrase" value="{{simpleProductTierPrice300InStock.sku}}"/>
148+
</actionGroup>
149+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
150+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
151+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
152+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductName">
153+
<argument name="productName" value="{{simpleProductTierPrice300InStock.name}}"/>
154+
</actionGroup>
155+
152156
</test>
153157
</tests>

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

+9-5
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,14 @@
8181
<!--Verify customer don't see updated simple product link on magento storefront page -->
8282
<amOnPage url="{{StorefrontProductPage.url(simpleProductDisabled.urlKey)}}" stepKey="goToMagentoStorefrontPage"/>
8383
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
84-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{simpleProductDisabled.sku}}" stepKey="fillSimpleProductSkuInSearchTextBox"/>
85-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
86-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
87-
<waitForPageLoad stepKey="waitForSearch"/>
88-
<dontSee selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{simpleProductDisabled.name}}" stepKey="dontSeeProductNameOnStorefrontPage"/>
84+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillSimpleProductSkuInSearchTextBox">
85+
<argument name="phrase" value="{{simpleProductDisabled.sku}}"/>
86+
</actionGroup>
87+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
88+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
89+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
90+
<actionGroup ref="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup" stepKey="dontSeeProductNameOnStorefrontPage">
91+
<argument name="productName" value="{{simpleProductDisabled.name}}"/>
92+
</actionGroup>
8993
</test>
9094
</tests>

0 commit comments

Comments
 (0)