Skip to content

Commit fed6e3f

Browse files
committed
- updating tests
1 parent d3f202a commit fed6e3f

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminConfigurableProductTypeSwitchingToVirtualProductTest.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@
4343
<seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Virtual Product',$createProduct.name$)}}" stepKey="seeVirtualProductInGrid"/>
4444
<!--Assert virtual product on storefront-->
4545
<comment userInput="Assert virtual product on storefront" stepKey="commentAssertVirtualProductOnStorefront"/>
46-
<amOnPage url="{{StorefrontProductPage.url($createProduct.name$)}}" stepKey="openVirtualProductPage"/>
47-
<waitForPageLoad stepKey="waitForStorefrontVirtualProductPageLoad"/>
48-
<see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertVirtualProductInStock"/>
46+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openVirtualProductPage">
47+
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
48+
</actionGroup>
49+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForStorefrontVirtualProductPageLoad"/>
50+
<actionGroup ref="AssertStorefrontProductStockStatusOnProductPageActionGroup" stepKey="assertVirtualProductInStock">
51+
<argument name="productStockStatus" value="In Stock"/>
52+
</actionGroup>
4953
</test>
5054
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,23 @@
6868
<seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Configurable Product',$createProduct.name$)}}" stepKey="seeConfigurableProductInGrid"/>
6969
<seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Simple Product',$createProduct.name$-option1)}}" stepKey="seeSimpleProduct1NameInGrid"/>
7070
<seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Simple Product',$createProduct.name$-option2)}}" stepKey="seeSimpleProduct2NameInGrid"/>
71+
7172
<!--Assert configurable product on storefront-->
7273
<comment userInput="Assert configurable product on storefront" stepKey="commentAssertConfigProductOnStorefront"/>
73-
<amOnPage url="{{StorefrontProductPage.url($createProduct.name$)}}" stepKey="openProductPage"/>
74-
<waitForPageLoad stepKey="waitForStorefrontProductPageLoad"/>
75-
<see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/>
76-
<click selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="clickAttributeDropDown"/>
77-
<see userInput="option1" stepKey="verifyOption1Exists"/>
78-
<see userInput="option2" stepKey="verifyOption2Exists"/>
74+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
75+
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
76+
</actionGroup>
77+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForStorefrontProductPageLoad"/>
78+
<actionGroup ref="AssertStorefrontProductStockStatusOnProductPageActionGroup" stepKey="assertInStock">
79+
<argument name="productStockStatus" value="In Stock"/>
80+
</actionGroup>
81+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAttributeDropDown"/>
82+
<actionGroup ref="AssertStorefrontProductAttributeOptionVisibleActionGroup" stepKey="verifyOption1Exists">
83+
<argument name="productAttributeOption" value="option1"/>
84+
</actionGroup>
85+
<actionGroup ref="AssertStorefrontProductAttributeOptionVisibleActionGroup" stepKey="verifyOption2Exists">
86+
<argument name="productAttributeOption" value="option2"/>
87+
</actionGroup>
88+
7989
</test>
8090
</tests>

0 commit comments

Comments
 (0)