Skip to content

Commit 03c0107

Browse files
Sahil.kumarManjusha.S
authored andcommitted
MQE-3332:Created New ActionGroups
1 parent 107451c commit 03c0107

File tree

4 files changed

+55
-30
lines changed

4 files changed

+55
-30
lines changed

app/code/Magento/Checkout/Test/Mftf/Test/CustomerOrderSimpleProductTest.xml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,38 +37,23 @@
3737
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin">
3838
<argument name="Customer" value="$$createCustomer$$"/>
3939
</actionGroup>
40-
<!-- Go to category -->
41-
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage">
42-
<argument name="category" value="$$testCategory$$"/>
43-
</actionGroup>
44-
<waitForPageLoad stepKey="waitForCatalogPageLoad"/>
45-
46-
47-
<!-- Open product detail page-->
48-
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName($testProduct.name$)}}" stepKey="openProduct"/>
49-
<waitForPageLoad time="30" stepKey="waitForFirstProduct"/>
5040

51-
<!-- add to cart -->
52-
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
53-
<argument name="productName" value="$$testProduct.name$$"/>
41+
<!-- Customer placed order from storefront with payment method -->
42+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
43+
<argument name="product" value="$testProduct$"/>
5444
</actionGroup>
55-
56-
<!-- click on cart icon and proceed to checkout -->
5745
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
46+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="setShippingMethodFlatRate"/>
47+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentStep"/>
5848

59-
60-
<!-- Steps to perform checkout -->
61-
<actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/>
62-
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/>
63-
<waitForElementVisible selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="waitForPlaceOrderButton"/>
64-
65-
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" after="clickNext" stepKey="waitForPaymentSectionLoaded2"/>
66-
<conditionalClick selector="{{CheckoutPaymentSection.checkMoneyOrderPayment}}" dependentSelector="{{CheckoutPaymentSection.billingAddress}}" visible="false" before="waitForPlaceOrderButton" stepKey="clickCheckMoneyOrderPayment"/>
67-
68-
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrderButton"/>
69-
<seeElement selector="{{CheckoutSuccessMainSection.success}}" stepKey="orderIsSuccessfullyPlaced"/>
49+
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder">
50+
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/>
51+
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
52+
</actionGroup>
7053

7154
<!-- order number is captured for future validation -->
7255
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="getOrderNumber"/>
56+
57+
7358
</test>
7459
</tests>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminResetColumnDropDownActionGroup">
12+
<annotations>
13+
<description>Reset the column dropdown ot its original state on the Orders grid page.</description>
14+
</annotations>
15+
<!-- Resetting column checkbox -->
16+
<click selector="{{AdminOrdersGridSection.columnsDropdown}}" stepKey="openColumnsDropdown"/>
17+
<click selector="{{AdminOrdersGridSection.resetColumnCheckbox}}" stepKey="resetColumnCheckbox"/>
18+
<click selector="{{AdminOrdersGridSection.columnsDropdown}}" stepKey="closeColumnsDropdown" />
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminVerifyPaymentInformationTitleActionGroup">
12+
<annotations>
13+
<description>Verify the Payment Information title on the Orders grid</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="paymentText" type="string"/>
17+
</arguments>
18+
<seeElement selector="{{AdminOrdersGridSection.paymentInformation(paymentText)}}" stepKey="seePaymentMethod"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Test/AdminUpdatePaymentMethodTitleTest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
</actionGroup>
4242

4343
<!-- Resetting column checkbox -->
44-
<click selector="{{AdminOrdersGridSection.columnsDropdown}}" stepKey="openColumnsDropdown"/>
45-
<click selector="{{AdminOrdersGridSection.resetColumnCheckbox}}" stepKey="resetColumnCheckbox"/>
46-
<click selector="{{AdminOrdersGridSection.columnsDropdown}}" stepKey="closeColumnsDropdown" />
44+
<actionGroup ref="AdminResetColumnDropDownActionGroup" stepKey="ResetColumnDropdown"/>
4745
<!--Enabling Payment Method option from Column dropdown-->
4846
<actionGroup ref="AdminSelectFieldToColumnActionGroup" stepKey="EnablePaymentMethodOption">
4947
<argument name="column" value="Payment Method"/>
5048
</actionGroup>
5149

5250
<!--Verifying the updated Payment Method title -->
53-
<seeElement selector="{{AdminOrdersGridSection.paymentInformation('Test')}}" stepKey="seePaymentMethod"/>
51+
<actionGroup ref="AdminVerifyPaymentInformationTitleActionGroup" stepKey="seePaymentMethod">
52+
<argument name="paymentText" value="Test"/>
53+
</actionGroup>
5454

5555
</test>
5656
</tests>

0 commit comments

Comments
 (0)