Skip to content

Commit 098c50e

Browse files
authored
ENGCOM-7789: [MFTF] Use action group for QuickSearch #29002
2 parents fa6d291 + 1de60e9 commit 098c50e

File tree

9 files changed

+25
-32
lines changed

9 files changed

+25
-32
lines changed

app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@
4040
<amOnPage url="{{StorefrontProductPage.url($$createDynamicBundleProduct.name$$)}}" stepKey="amOnBundleProductPage"/>
4141
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
4242
<!-- Search for the product by sku -->
43-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createDynamicBundleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
44-
<waitForPageLoad stepKey="waitForSearchButton"/>
45-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
46-
<waitForPageLoad stepKey="waitForSearchResults"/>
43+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
44+
<argument name="query" value="$$createDynamicBundleProduct.sku$$"/>
45+
</actionGroup>
4746
<!-- Should not see any search results -->
4847
<dontSee userInput="$$createDynamicBundleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
4948
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@
3737
<amOnPage url="{{StorefrontProductPage.url($$createFixedBundleProduct.name$$)}}" stepKey="amOnBundleProductPage"/>
3838
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
3939
<!-- Search for the product by sku -->
40-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createFixedBundleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
41-
<waitForPageLoad stepKey="waitForSearchButton"/>
42-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
43-
<waitForPageLoad stepKey="waitForSearchResults"/>
40+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
41+
<argument name="query" value="$$createFixedBundleProduct.sku$$"/>
42+
</actionGroup>
4443
<!-- Should not see any search results -->
4544
<dontSee userInput="$$createFixedBundleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
4645
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@
3838
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.name$$)}}" stepKey="amOnSimpleProductPage"/>
3939
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
4040
<!-- Search for the product by sku -->
41-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createSimpleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
42-
<waitForPageLoad stepKey="waitForSearchButton"/>
43-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
44-
<waitForPageLoad stepKey="waitForSearchResults"/>
41+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
42+
<argument name="query" value="$$createSimpleProduct.sku$$"/>
43+
</actionGroup>
4544
<!-- Should not see any search results -->
4645
<dontSee userInput="$$createSimpleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
4746
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@
3737
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.name$$)}}" stepKey="amOnSimpleProductPage"/>
3838
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
3939
<!-- Search for the product by sku -->
40-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createSimpleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
41-
<waitForPageLoad stepKey="waitForSearchButton"/>
42-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
43-
<waitForPageLoad stepKey="waitForSearchResults"/>
40+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
41+
<argument name="query" value="$$createSimpleProduct.sku$$"/>
42+
</actionGroup>
4443
<!-- Should not see any search results -->
4544
<dontSee userInput="$$createSimpleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
4645
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@
3838
<amOnPage url="{{StorefrontProductPage.url($$createVirtualProduct.name$$)}}" stepKey="amOnVirtualProductPage"/>
3939
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
4040
<!-- Search for the product by sku -->
41-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createVirtualProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
42-
<waitForPageLoad stepKey="waitForSearchButton"/>
43-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
44-
<waitForPageLoad stepKey="waitForSearchResults"/>
41+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
42+
<argument name="query" value="$$createVirtualProduct.sku$$"/>
43+
</actionGroup>
4544
<!-- Should not see any search results -->
4645
<dontSee userInput="$$createVirtualProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
4746
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@
3636
<amOnPage url="{{StorefrontProductPage.url($$createConfigurableProduct.name$$)}}" stepKey="amOnConfigurableProductPage"/>
3737
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
3838
<!-- Search for the product by sku -->
39-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createConfigurableProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
40-
<waitForPageLoad stepKey="waitForSearchButton"/>
41-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
42-
<waitForPageLoad stepKey="waitForSearchResults"/>
39+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchBarByProductSku">
40+
<argument name="query" value="$$createConfigurableProduct.sku$$"/>
41+
</actionGroup>
4342
<!-- Should not see any search results -->
4443
<dontSee userInput="$$createConfigurableProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
4544
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@
4444
<amOnPage url="{{StorefrontProductPage.url($$createDownloadableProduct.name$$)}}" stepKey="amOnDownloadableProductPage"/>
4545
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
4646
<!-- Search for the product by sku -->
47-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createDownloadableProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
48-
<waitForPageLoad stepKey="waitForSearchButton"/>
49-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
50-
<waitForPageLoad stepKey="waitForSearchResults"/>
47+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
48+
<argument name="query" value="$$createDownloadableProduct.sku$$"/>
49+
</actionGroup>
5150
<!-- Should not see any search results -->
5251
<dontSee userInput="$$createDownloadableProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
5352
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@
4242
<amOnPage url="{{StorefrontProductPage.url($$createGroupedProduct.name$$)}}" stepKey="amOnGroupedProductPage"/>
4343
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
4444
<!--Search for the product by sku-->
45-
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createGroupedProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
46-
<waitForPageLoad stepKey="waitForSearchButton"/>
47-
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
48-
<waitForPageLoad stepKey="waitForSearchResults"/>
45+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
46+
<argument name="query" value="$$createGroupedProduct.sku$$"/>
47+
</actionGroup>
4948
<!-- Should not see any search results -->
5049
<dontSee userInput="$$createGroupedProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
5150
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
<fillField stepKey="fillSearchField" selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="{{query}}"/>
1717
<waitForElementVisible selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="waitForSubmitButton"/>
1818
<click stepKey="clickSearchButton" selector="{{StorefrontQuickSearchSection.searchButton}}"/>
19+
<waitForPageLoad stepKey="waitForSearchResults"/>
1920
</actionGroup>
2021
</actionGroups>

0 commit comments

Comments
 (0)