Skip to content

Commit

Permalink
ENGCOM-7991: [MFTF] Add new ActionGroup #29472
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka committed Aug 14, 2020
2 parents 74416c0 + 36adde9 commit 32b50a3
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
<waitForLoadingMaskToDisappear stepKey="waitForLoadingCheckoutPageWithShippingMethod"/>
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask1"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
<!-- Checkout select Check/Money Order payment -->
<comment userInput="Select Check/Money payment" stepKey="checkoutSelectCheckMoneyPayment"/>
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontCheckoutClickNextButtonActionGroup">
<annotations>
<description>Clicks on the 'Next' button on checkout.</description>
</annotations>

<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
<!-- Checkout select Check/Money Order payment -->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
<!--Click Place Order button-->
Expand All @@ -78,8 +77,7 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2"/>
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod2"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask3"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton2"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext2"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext2"/>
<!-- Checkout select Check/Money Order payment -->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment2"/>

Expand All @@ -103,8 +101,7 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart3"/>
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod3"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask4"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton3"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext3"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext3"/>

<!-- Checkout select Check/Money Order payment -->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment3"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>

<!-- Customer placed order with payment method save -->
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/>

<!-- Fill Paypal card data -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<!--Select Shipping Rate "Flat Rate" and click "Next" button-->
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShipping"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
<!--Verify that "My billing and shipping address are the same" is unchecked and billing address is preselected-->
<dontSeeCheckboxIsChecked selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="shippingAndBillingAddressIsSameUnchecked"/>
<see selector="{{CheckoutPaymentSection.billingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="assertBillingAddress"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

<!-- Go to *Next* -->
<scrollTo selector="{{CheckoutShippingMethodsSection.next}}" stepKey="scrollToButtonNext"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="goNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="goNext"/>

<!-- Select payment solution -->
<checkOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2"/>
<waitForPageLoad stepKey="waitForShippingMethods"/>
<click stepKey="chooseFreeShipping" selector="{{CheckoutShippingMethodsSection.shippingMethodRowByName('Free')}}"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext1"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext1"/>
<waitForPageLoad stepKey="waitForReviewAndPayments1"/>
<conditionalClick selector="{{DiscountSection.DiscountTab}}" dependentSelector="{{DiscountSection.CouponInput}}" visible="false" stepKey="clickIfDiscountTabClosed2"/>
<waitForPageLoad stepKey="waitForCouponTabOpen2"/>
Expand All @@ -92,7 +92,7 @@
<amOnPage stepKey="navigateToShippingPage" url="{{CheckoutShippingPage.url}}"/>
<waitForPageLoad stepKey="waitForShippingPageLoad"/>
<click stepKey="chooseFlatRateShipping" selector="{{CheckoutShippingMethodsSection.shippingMethodRowByName('Flat Rate')}}"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext2"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext2"/>
<waitForPageLoad stepKey="waitForReviewAndPayments2"/>
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder2"/>
<waitForPageLoad stepKey="waitForSuccessfullyPlacedOrder"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@
<argument name="customer" value="UKCustomer"/>
<argument name="customerAddress" value="updateCustomerUKAddress"/>
</actionGroup>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.bankTransfer}}" stepKey="waitForPlaceOrderButton"/>
<checkOption selector="{{CheckoutPaymentSection.bankTransfer}}" stepKey="selectBankTransfer"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.billingAddressNotSameBankTransferCheckbox}}" stepKey="waitForElementToBeVisible"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
<argument name="customer" value="UKCustomer"/>
<argument name="customerAddress" value="updateCustomerUKAddress"/>
</actionGroup>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="waitForElementToBeVisible"/>
<uncheckOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="uncheckSameBillingAndShippingAddress"/>
<conditionalClick selector="{{CheckoutShippingSection.editAddressButton}}" dependentSelector="{{CheckoutShippingSection.editAddressButton}}" visible="true" stepKey="clickEditButton"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@
<fillField selector="{{CheckoutShippingSection.password}}" userInput="$$createCustomer.password$$" stepKey="fillPassword"/>
<click selector="{{CheckoutShippingSection.loginButton}}" stepKey="clickLoginButton"/>
<waitForPageLoad stepKey="waitForLoginPageToLoad"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>

<!-- Place order and Assert success message -->
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
</actionGroup>
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="goToCheckout1"/>
<waitForPageLoad stepKey="waitForShippingMethodSectionToLoad"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>

<!-- Verify order summary on payment page -->
<actionGroup ref="VerifyCheckoutPaymentOrderSummaryActionGroup" stepKey="verifyCheckoutPaymentOrderSummary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart1"/>

<click stepKey="selectFirstShippingMethod1" selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}"/>
<waitForElement stepKey="waitForShippingMethodSelect1" selector="{{CheckoutShippingMethodsSection.next}}" time="30"/>
<click stepKey="clickNextOnShippingMethodLoad1" selector="{{CheckoutShippingMethodsSection.next}}"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNextOnShippingMethodLoad1"/>
<!-- Checkout select Check/Money Order payment -->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
<waitForElement stepKey="waitForPlaceOrderButton1" selector="{{CheckoutPaymentSection.placeOrder}}" time="30"/>
Expand All @@ -114,8 +113,7 @@
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" time="30" stepKey="waitForShippingMethodRadioToBeVisible"/>
<waitForPageLoad stepKey="waitForPageLoad23"/>
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod2"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForShippingMethodSelect2"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNextOnShippingMethodLoad2"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNextOnShippingMethodLoad2"/>
<!-- Checkout select Check/Money Order payment -->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment2"/>
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@

<!-- Select address -->
<click stepKey="selectAddress" selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}"/>
<waitForElement stepKey="waitNextButton" selector="{{CheckoutShippingMethodsSection.next}}" time="30"/>
<click stepKey="clickNextButton" selector="{{CheckoutShippingMethodsSection.next}}"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNextButton"/>
<waitForPageLoad stepKey="waitBillingForm"/>
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
<dontSee selector="{{CheckoutPaymentSection.paymentMethodByName('Check / Money order')}}" stepKey="paymentMethodDoesNotAvailable"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@

<!-- Proceed to checkout -->
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="goToCheckout1"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>

<!-- Verify order summary on payment page -->
<actionGroup ref="VerifyCheckoutPaymentOrderSummaryActionGroup" stepKey="verifyCheckoutPaymentOrderSummary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@

<!--Close Popup and click next-->
<click selector="{{StorefrontCheckoutAddressPopupSection.closeAddressModalPopup}}" stepKey="closePopup"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>

<!--Refresh Page and Place Order-->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@
<argument name="customer" value="Simple_US_Customer"/>
<argument name="customerAddress" value="US_Address_NY_Default_Shipping"/>
</actionGroup>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>

<!-- Place order and Assert success message -->
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
<argument name="customer" value="UKCustomer"/>
<argument name="customerAddress" value="updateCustomerUKAddress"/>
</actionGroup>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.bankTransfer}}" stepKey="waitForPlaceOrderButton"/>
<click selector="{{CheckoutPaymentSection.bankTransfer}}" stepKey="selectBankTransfer"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
<argument name="customer" value="UKCustomer"/>
<argument name="customerAddress" value="UK_Not_Default_Address"/>
</actionGroup>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>

<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
<!-- Place order and Assert success message -->
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@

<!-- Fill the guest form -->
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillGuestForm"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickOnNextButton"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.bankTransfer}}" stepKey="waitForPlaceOrderButton"/>
<checkOption selector="{{CheckoutPaymentSection.bankTransfer}}" stepKey="selectBankTransfer"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Free Shipping')}}" stepKey="selectFlatShippingMethod"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/>

<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>

<!--Assert grand total-->
<actionGroup ref="VerifyCheckoutPaymentOrderSummaryActionGroup" stepKey="verifyCheckoutPaymentOrderSummary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
<!-- Checkout select Check/Money Order payment -->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
<!-- Choose Shippping - Flat Rate Shipping -->
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>

<!-- Checkout select Check/Money Order payment -->
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment3"/>
Expand Down
Loading

0 comments on commit 32b50a3

Please sign in to comment.