File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
app/code/Magento/Checkout/Test/Mftf Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 21
21
<waitForText userInput =" {{productCount}}" selector =" {{StorefrontMinicartSection.productCount}}" time =" 30" stepKey =" assertProductCount" />
22
22
</actionGroup >
23
23
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
+
24
42
<!-- Add Product to Cart from the product page and check message and product count in Minicart -->
25
43
<actionGroup name =" StorefrontAddProductToCartActionGroup" >
26
44
<arguments >
Original file line number Diff line number Diff line change 23
23
<element name =" viewAndEditCart" type =" button" selector =" .action.viewcart" timeout =" 30" />
24
24
<element name =" miniCartItemsText" type =" text" selector =" .minicart-items" />
25
25
<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" />
26
28
</section >
27
29
</sections >
You can’t perform that action at this time.
0 commit comments