Skip to content

Commit 25e998f

Browse files
committed
ACP2E-2501: Broken AdminSimpleProductwithTextandVisualSwatchTest test
- adjusted existing test
1 parent bc1c7ba commit 25e998f

File tree

3 files changed

+40
-38
lines changed

3 files changed

+40
-38
lines changed

app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddTextSwatchToProductWithTwoOptionsActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AddTextSwatchToProductWithTwoOptionsActionGroup">
1212
<annotations>
1313
<description>Add text swatch property attribute.</description>
@@ -39,6 +39,7 @@
3939
<!-- Set Use In Layered Navigation -->
4040
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
4141
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="goToStorefrontProperties"/>
42+
<selectOption selector="{{AdminNewAttributePanel.useInSearch}}" userInput="Yes" stepKey="selectYesForUseInSearch"/>
4243
<selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="1" stepKey="selectUseInLayeredNavigation"/>
4344
<selectOption selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" userInput="{{usedInProductListing}}" stepKey="useInProductListing"/>
4445
<click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSave"/>

app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AddVisualSwatchActionGroup">
1212
<annotations>
1313
<description>Add visual image swatch property attribute.</description>
@@ -50,6 +50,7 @@
5050
<scrollToTopOfPage stepKey="scrollToTop2"/>
5151
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="goToStorefrontProperties"/>
5252
<selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="1" stepKey="selectUseInLayeredNavigation"/>
53+
<selectOption selector="{{AdminNewAttributePanel.useInSearch}}" userInput="Yes" stepKey="selectYesForUseInSearch"/>
5354
<!-- Save the new product attribute -->
5455
<click selector="{{AttributePropertiesSection.Save}}" stepKey="clickSaveAndEdit"/>
5556
<wait stepKey="waitToLoad" time="3"/>

app/code/Magento/Swatches/Test/Mftf/Test/AdminSimpleProductwithTextandVisualSwatchTest.xml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -106,41 +106,41 @@
106106
</actionGroup>
107107
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
108108
</after>
109-
<!--Assert that attribute values present in layered navigation -->
110-
<amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage"/>
111-
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
112-
<click selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategoryTextSwatch}}" stepKey="clickTextSwatch"/>
113-
<click selector="{{StorefrontCategorySidebarSection.seeTextSwatchOption}}" stepKey="seeTextSwatch"/>
114-
<see userInput="{{SimpleProduct.name}}" stepKey="assertTextSwatchProduct"/>
115-
<!--Assert that attribute values present in layered navigation -->
116-
<amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage1"/>
117-
<waitForPageLoad stepKey="waitForCategoryPageLoad1"/>
118-
<click selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategoryVisualSwatch}}" stepKey="clickVisualSwatch"/>
119-
<click selector="{{StorefrontCategorySidebarSection.seeVisualSwatchOption}}" stepKey="seeVisualSwatch"/>
120-
<see userInput="{{DownloadableProduct.name}}" stepKey="assertVisualSwatchProduct"/>
121-
<!--Verfiy the text swatch attribute product appears in search option with option one -->
122-
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/>
123-
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionOne">
124-
<argument name="phrase" value="textSwatchOption1"/>
125-
</actionGroup>
126-
<see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeTextSwatchAttributeProductName"/>
127-
<!--Verfiy the text swatch attribute product does not appears in search option with option two -->
128-
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage1"/>
129-
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionTwo">
130-
<argument name="phrase" value="textSwatchOption2"/>
131-
</actionGroup>
132-
<dontSee selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="{{SimpleProduct.name}}" stepKey="doNotSeeProduct"/>
133-
<!--Verfiy the visual swatch attribute product appears in search option with option two -->
134-
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage2"/>
135-
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionTwo1">
136-
<argument name="phrase" value="visualSwatchOption2"/>
137-
</actionGroup>
138-
<waitForText selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{DownloadableProduct.name}}" stepKey="seeVisualSwatchAttributeProductName"/>
139-
<!--Verfiy the visual swatch attribute product does not appears in search option with option one -->
140-
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage3"/>
141-
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionOne1">
142-
<argument name="phrase" value="visualSwatchOption1"/>
143-
</actionGroup>
144-
<dontSee selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="{{DownloadableProduct.name}}" stepKey="doNotSeeProduct1"/>
109+
<!--Assert that attribute values present in layered navigation -->
110+
<amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage"/>
111+
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
112+
<click selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategoryTextSwatch}}" stepKey="clickTextSwatch"/>
113+
<click selector="{{StorefrontCategorySidebarSection.seeTextSwatchOption}}" stepKey="seeTextSwatch"/>
114+
<see userInput="{{SimpleProduct.name}}" stepKey="assertTextSwatchProduct"/>
115+
<!--Assert that attribute values present in layered navigation -->
116+
<amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage1"/>
117+
<waitForPageLoad stepKey="waitForCategoryPageLoad1"/>
118+
<click selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategoryVisualSwatch}}" stepKey="clickVisualSwatch"/>
119+
<click selector="{{StorefrontCategorySidebarSection.seeVisualSwatchOption}}" stepKey="seeVisualSwatch"/>
120+
<see userInput="{{DownloadableProduct.name}}" stepKey="assertVisualSwatchProduct"/>
121+
<!--Verfiy the text swatch attribute product appears in search option with option one -->
122+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/>
123+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionOne">
124+
<argument name="phrase" value="textSwatchOption1"/>
125+
</actionGroup>
126+
<see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeTextSwatchAttributeProductName"/>
127+
<!--Verfiy the text swatch attribute product does not appears in search option with option two -->
128+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage1"/>
129+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionTwo">
130+
<argument name="phrase" value="textSwatchOption2"/>
131+
</actionGroup>
132+
<dontSee selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="{{SimpleProduct.name}}" stepKey="doNotSeeProduct"/>
133+
<!--Verfiy the visual swatch attribute product appears in search option with option two -->
134+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage2"/>
135+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionTwo1">
136+
<argument name="phrase" value="visualSwatchOption2"/>
137+
</actionGroup>
138+
<waitForText selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{DownloadableProduct.name}}" stepKey="seeVisualSwatchAttributeProductName"/>
139+
<!--Verfiy the visual swatch attribute product does not appear in search option with option one -->
140+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage3"/>
141+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForOptionOne1">
142+
<argument name="phrase" value="visualSwatchOption1"/>
143+
</actionGroup>
144+
<dontSee selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="{{DownloadableProduct.name}}" stepKey="doNotSeeProduct1"/>
145145
</test>
146146
</tests>

0 commit comments

Comments
 (0)