Skip to content

Commit fb6370c

Browse files
rostilosengcom-Charlie
authored andcommitted
mftf test rewrite
1 parent daaace1 commit fb6370c

6 files changed

+9
-5
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutSelectFlatRateShippingMethodActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
<!-- Checkout select Flat Rate shipping method -->
1212
<actionGroup name="CheckoutSelectFlatRateShippingMethodActionGroup">
1313
<annotations>
14-
<description>Clicks on the 'Flat Rate' Shipping Method on the Storefront Checkout page.</description>
14+
<description>Waits for Shipping Section load. Clicks on the 'Flat Rate' Shipping Method on the Storefront Checkout page.</description>
1515
</annotations>
1616

17+
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodFlatRate}}" stepKey="waitForFlatRateShippingMethod"/>
1718
<conditionalClick selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" dependentSelector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" visible="true" stepKey="selectFlatRateShippingMethod"/>
1819
<waitForPageLoad stepKey="waitForLoadingMaskForNextButton"/>
1920
</actionGroup>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontGuestCheckoutProceedToPaymentStepActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="StorefrontGuestCheckoutProceedToPaymentStepActionGroup">
1212
<annotations>
13-
<description>Clicks next on Checkout Shipping step. Waits for Payment step</description>
13+
<description>Waits for Shipping Section load. Clicks next on Checkout Shipping step. Waits for Payment step</description>
1414
</annotations>
1515

16+
<waitForElementClickable selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="waitForNextButtonClickable"/>
1617
<click selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="clickNext"/>
1718
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded" after="clickNext"/>
1819
<seeCurrentUrlMatches regex="~/checkout/?#payment~" stepKey="assertCheckoutPaymentUrl"/>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontSelectFirstShippingMethodActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="StorefrontSelectFirstShippingMethodActionGroup">
1212
<annotations>
13-
<description>Select first shipping method.</description>
13+
<description>Waits for Shipping Section load. Select first shipping method.</description>
1414
</annotations>
15-
15+
16+
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForShippingMethod"/>
1617
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
1718
<waitForLoadingMaskToDisappear stepKey="waitForMaskDisappear"/>
1819
</actionGroup>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
<argument name="customer" value="UKCustomer"/>
5959
<argument name="customerAddress" value="updateCustomerUKAddress"/>
6060
</actionGroup>
61-
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodFlatRate}}" stepKey="waitForShippingMethod"/>
6261
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShipping"/>
6362
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToBillingStep"/>
6463
<waitForElementVisible selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="waitForSameBillingAndShippingAddressCheckboxVisible"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<fillField selector="{{CheckoutShippingGuestInfoSection.regionInput}}" userInput="" stepKey="changeStateProvinceField"/>
6868
<fillField selector="{{CheckoutShippingGuestInfoSection.postcode}}" userInput="KW1 7NQ" stepKey="changeZipPostalCodeField"/>
6969
<!-- 8. Change shipping rate, select Free Shipping -->
70+
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingShippingMethod"/>
7071
<checkOption selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Free Shipping')}}" stepKey="checkFreeShippingAsShippingMethod"/>
7172
<!-- 9. Fill other fields -->
7273
<actionGroup ref="StorefrontFillGuestShippingInfoActionGroup" stepKey="fillOtherFieldsInCheckoutShippingSection"/>

app/code/Magento/Shipping/Test/Mftf/Test/StorefrontAssertShippingPricesPresentAfterApplyingCartRuleTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
</actionGroup>
8383
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Fixed')}}" userInput="$5.00" stepKey="assertFlatRatedMethodPrice"/>
8484
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Table Rate')}}" userInput="$7.99" stepKey="assertTableRatedMethodPrice"/>
85+
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodFlatRate}}" stepKey="waitForFlatRateShippingMethod"/>
8586
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" stepKey="selectFlatRateShippingMethod"/>
8687
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="goToPaymentStep"/>
8788
<actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyCoupon">

0 commit comments

Comments
 (0)