Skip to content

Commit 13f7969

Browse files
committed
MQE-920: MSI MFTF Test Cases 2
- Merging necessary Checkout Action Group/Section to the Checkout module. - Moving necessary Checkout files to the "app/code" directory.
1 parent 64af22f commit 13f7969

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@
2121
<waitForText userInput="{{productCount}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
2222
</actionGroup>
2323

24+
<!-- Add Product to Cart from the category page with specified quantity and check message and product count in Minicart -->
25+
<actionGroup name="StorefrontAddCategoryProductToCartWithQuantityActionGroup">
26+
<arguments>
27+
<argument name="product"/>
28+
<argument name="quantity" defaultValue="1" type="string"/>
29+
<argument name="checkQuantity" defaultValue="1" type="string"/>
30+
</arguments>
31+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
32+
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" />
33+
<!-- @TODO: Use general message selector after MQE-694 is fixed -->
34+
<waitForElement selector="{{StorefrontMessagesSection.messageProductAddedToCart(product.name)}}" time="30" stepKey="assertMessage"/>
35+
<waitForText userInput="{{checkQuantity}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
36+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
37+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
38+
<fillField selector="{{StorefrontMinicartSection.itemQuantity(product.name)}}" userInput="{{quantity}}" stepKey="setProductQtyToFiftyInMiniCart"/>
39+
<click selector="{{StorefrontMinicartSection.itemQuantityUpdate(product.name)}}" stepKey="updateQtyInMiniCart"/>
40+
</actionGroup>
41+
2442
<!-- Add Product to Cart from the product page and check message and product count in Minicart -->
2543
<actionGroup name="StorefrontAddProductToCartActionGroup">
2644
<arguments>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
<element name="viewAndEditCart" type="button" selector=".action.viewcart" timeout="30"/>
2424
<element name="miniCartItemsText" type="text" selector=".minicart-items"/>
2525
<element name="deleteMiniCartItem" type="button" selector=".action.delete" timeout="30"/>
26+
<element name="itemQuantity" type="input" selector="//a[text()='{{productName}}']/../..//input[contains(@class,'cart-item-qty')]" parameterized="true"/>
27+
<element name="itemQuantityUpdate" type="button" selector="//a[text()='{{productName}}']/../..//span[text()='Update']" parameterized="true"/>
2628
</section>
2729
</sections>

0 commit comments

Comments
 (0)