Skip to content

Commit 76a5004

Browse files
committed
Refactoring the test
1 parent 36ad6b7 commit 76a5004

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@
6868
<argument name="inputType" value="{{BundleProduct.optionInputType1}}"/>
6969
</actionGroup>
7070

71-
<!--&lt;!&ndash; Check that Bundle Options initialized with default quantity &ndash;&gt;-->
72-
<!--<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantity"/>-->
73-
<!--<assertEquals stepKey="assertFirstBundleOptionDefaultQuantity">-->
74-
<!--<expectedResult type="string">1</expectedResult>-->
75-
<!--<actualResult type="string">$grabbedFirstBundleOptionQuantity</actualResult>-->
76-
<!--</assertEquals>-->
77-
<!--<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" stepKey="grabbedSecondBundleOptionQuantity"/>-->
78-
<!--<assertEquals stepKey="assertSecondBundleOptionDefaultQuantity">-->
79-
<!--<expectedResult type="string">1</expectedResult>-->
80-
<!--<actualResult type="string">$grabbedSecondBundleOptionQuantity</actualResult>-->
81-
<!--</assertEquals>-->
71+
<!-- Check that Bundle Options initialized with proper quantity -->
72+
<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantity"/>
73+
<assertEquals stepKey="assertFirstBundleOptionDefaultQuantity">
74+
<expectedResult type="string">50</expectedResult>
75+
<actualResult type="string">$grabbedFirstBundleOptionQuantity</actualResult>
76+
</assertEquals>
77+
<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" stepKey="grabbedSecondBundleOptionQuantity"/>
78+
<assertEquals stepKey="assertSecondBundleOptionDefaultQuantity">
79+
<expectedResult type="string">50</expectedResult>
80+
<actualResult type="string">$grabbedSecondBundleOptionQuantity</actualResult>
81+
</assertEquals>
8282

8383
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty1"/>
8484
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty2"/>
@@ -97,7 +97,7 @@
9797
<!--Checking on admin side-->
9898
<scrollToTopOfPage stepKey="scroll"/>
9999
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems2"/>
100-
<seeElement stepKey="LookingForBundleItemPresence" selector="{{AdminProductFormBundleSection.listedBundleItem}}"/>
100+
<seeElement selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="LookingForBundleItemPresence"/>
101101

102102
<!--Checking on customer side-->
103103
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage">
@@ -162,7 +162,8 @@
162162
<!--Checking on admin side-->
163163
<scrollToTopOfPage stepKey="scrollAgain"/>
164164
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenNewSectionBundleItems2"/>
165-
<seeElement selector="{{AdminProductFormBundleSection.listedBundleItem2}}" stepKey="LookingForNewBundleItemPresence"/>
165+
<seeElement selector="{{AdminProductFormBundleSection.bundleOptionXTitle('1')}}" stepKey="LookingForNewBundleItemPresence"/>
166+
166167
<!--Checking on customer side-->
167168
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain">
168169
<argument name="productUrl" value="{{BundleProduct.urlKey}}"/>

0 commit comments

Comments
 (0)