Skip to content

Commit

Permalink
Refactoring the test
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-kyzyma committed Mar 12, 2021
1 parent 7a72b6b commit ea063e0
Showing 1 changed file with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,20 @@
<group value="product"/>
</annotations>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage url="{{AdminProductCreatePage.url(SimpleProduct.visibility, SimpleProduct.type_id)}}" stepKey="goToCreateProduct"/>
<waitForPageLoad stepKey="wait1"/>
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="fillName"/>
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="-42" stepKey="fillPrice"/>
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateProduct"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait1"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillName"/>
<actionGroup ref="FillMainProductFormByStringActionGroup" stepKey="fillPrice">
<argument name="productName" value="{{SimpleProduct.name}}"/>
<argument name="productSku" value="{{SimpleProduct.sku}}"/>
<argument name="productPrice" value="-42"/>
<argument name="productQuantity" value="{{SimpleProduct.quantity}}"/>
<argument name="productStatus" value="{{SimpleProduct.status}}"/>
<argument name="productWeight" value="{{SimpleProduct.weight}}"/>
</actionGroup>
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSave"/>
<see selector="{{AdminProductFormSection.priceFieldError}}" userInput="Please enter a number 0 or greater in this field." stepKey="seePriceValidationError"/>
<actionGroup ref="AssertAdminValidationErrorAppearedForPriceFieldOnProductEditPageActionGroup" stepKey="seePriceValidationError">
<argument name="errorMessage" value="Please enter a number 0 or greater in this field."/>
</actionGroup>
</test>
</tests>

0 comments on commit ea063e0

Please sign in to comment.