Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MFTF] Adding AdminSetStockStatusActionGroup #31013

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToProductQuantity" after="waitForProductPageToLoad"/>
<remove keyForRemoval="disableProduct"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="selectOutOfStock" after="scrollToProductQuantity"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectOutOfStock" after="scrollToProductQuantity">
<argument name="stockStatus" value="Out of Stock"/>
</actionGroup>

</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<waitForPageLoad stepKey="waitForProductToLoad"/>

<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="selectStockStatus"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus"/>

<!-- Create New Product Attribute -->
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<waitForPageLoad stepKey="waitForProductToLoad"/>

<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="selectStockStatus"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, specify values explicitly instead of using the default parameter value of the action group. In that way, we will make the test much more readable (don't need to go and check the default value for the parameter in the action group to figure out what value will be set in this action).

Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have addressed this, thank you.


<!-- Create Product Attribute -->
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@
<argument name="productId" value="$$createConfigChildProduct2.id$$"/>
</actionGroup>
<waitForPageLoad stepKey="waitForSecondChildProductPageLoad"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="outOfStockStatus"/>

<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="outOfStockStatus">
<argument name="stockStatus" value="Out of Stock"/>
</actionGroup>

<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSecondProductForm"/>
<!-- Go to created customer page -->
<comment userInput="Go to created customer page" stepKey="goToCreatedCustomerPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@
<click selector="{{AdminProductGridFilterSection.nthRow('1')}}" stepKey="selectFirstRow"/>
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToProductQuantity"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="disableProduct"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="disableProduct">
<argument name="stockStatus" value="Out of Stock"/>
</actionGroup>
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickOnSaveButton"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductForm"/>
<click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="clickEnableProduct"/>
<fillField selector="{{AdminProductFormSection.productName}}" userInput="$$createConfigProduct.name$$-Updated" stepKey="fillProductName"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="1" stepKey="selectInStock"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectInStock"/>
<!--Change product image-->
<comment userInput="Change product image" stepKey="commentChangeProductImage"/>
<actionGroup ref="RemoveProductImageActionGroup" stepKey="removeProductImage"/>
Expand Down