Skip to content

Commit 6a36742

Browse files
MAGETWO-71375: Zero Subtotal Orders have incorrect status
- Update automation test
1 parent 91cb80b commit 6a36742

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,21 @@
99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1111
<!--Fill shipment form for free shipping-->
12-
<actionGroup name="ShipmentFormFreeShippingActionGroup" extends="ShipmentFormActionGroup">
12+
<actionGroup name="ShipmentFormFreeShippingActionGroup">
13+
<fillField selector="{{CheckoutShippingSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="setCustomerEmail"/>
14+
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="SetCustomerFirstName"/>
15+
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="SetCustomerLastName"/>
16+
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{CustomerAddressSimple.street}}" stepKey="SetCustomerStreetAddress"/>
17+
<fillField selector="{{CheckoutShippingSection.city}}" userInput="{{CustomerAddressSimple.city}}" stepKey="SetCustomerCity"/>
18+
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="SetCustomerZipCode"/>
19+
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="SetCustomerPhoneNumber"/>
20+
<click selector="{{CheckoutShippingSection.region}}" stepKey="clickToSetState"/>
21+
<click selector="{{CheckoutShippingSection.state}}" stepKey="clickToChooseState"/>
1322
<see userInput="$0.00 Free Free Shipping" selector="{{CheckoutShippingMethodsSection.shippingMethodRowByName('Free Shipping')}}" stepKey="seeShippingMethod" after="clickToChooseState"/>
1423
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Free Shipping')}}" stepKey="selectFlatShippingMethod" after="seeShippingMethod"/>
1524
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask" after="selectFlatShippingMethod"/>
25+
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickToSaveShippingInfo"/>
26+
<waitForPageLoad time="5" stepKey="waitForReviewAndPaymentsPageIsLoaded"/>
27+
<seeInCurrentUrl url="payment" stepKey="reviewAndPaymentIsShown"/>
1628
</actionGroup>
1729
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/>
3232
<element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/>
3333
<element name="defaultShipping" type="button" selector=".billing-address-details"/>
34+
<element name="state" type="button" selector="//*[text()='Alabama']"/>
3435
<element name="stateInput" type="input" selector="input[name=region]"/>
3536
</section>
3637
</sections>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@
6666
</actionGroup>
6767

6868
<!--Proceed to shipment-->
69-
<click selector="{{ProductCardSection.showCard}}" stepKey="clickToOpenCard"/>
70-
<click selector="{{ProductCardSection.proceed}}" stepKey="clickToProceedToCheckout"/>
69+
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickToOpenCard"/>
70+
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickToProceedToCheckout"/>
7171
<waitForPageLoad stepKey="waitForTheFormIsOpened"/>
7272

7373
<!--Fill shipping form-->
7474
<actionGroup ref="ShipmentFormFreeShippingActionGroup" stepKey="shipmentFormFreeShippingActionGroup"/>
7575

76-
<click selector="{{ProductCardSection.addCoupon}}" stepKey="clickToAddDiscount"/>
77-
<fillField selector="{{ProductCardSection.addCode}}" userInput="{{_defaultCoupon.code}}" stepKey="TypeDiscountCode"/>
78-
<click selector="{{ProductCardSection.applyDiscount}}" stepKey="clickToApplyDiscount"/>
76+
<click selector="{{DiscountSection.DiscountTab}}" stepKey="clickToAddDiscount"/>
77+
<fillField selector="{{DiscountSection.DiscountInput}}" userInput="{{_defaultCoupon.code}}" stepKey="TypeDiscountCode"/>
78+
<click selector="{{DiscountSection.ApplyCodeBtn}}" stepKey="clickToApplyDiscount"/>
7979
<waitForPageLoad stepKey="WaitForDiscountToBeAdded"/>
8080
<see userInput="Your coupon was successfully applied." stepKey="verifyText"/>
8181

app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<element name="customerGroups" type="multiselect" selector="select[name='customer_group_ids']"/>
2121
<element name="coupon" type="select" selector="select[name='coupon_type']"/>
2222
<element name="couponCode" type="input" selector="input[name='coupon_code']"/>
23-
<element name="userPerCoupon" type="input" selector="input[name='uses_per_coupon']"/>
2423
<element name="useAutoGeneration" type="checkbox" selector="input[name='use_auto_generation']"/>
2524
<element name="userPerCoupon" type="input" selector="//input[@name='uses_per_coupon']"/>
2625
<element name="userPerCustomer" type="input" selector="//input[@name='uses_per_customer']"/>

app/code/Magento/SalesRule/Test/Mftf/Section/DiscountSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="DiscountSection">
11-
<element name="DiscountTab" type="button" selector="//strong[text()='Apply Discount Code']"/>
11+
<element name="DiscountTab" type="button" selector="//*[text()='Apply Discount Code']"/>
1212
<element name="CouponInput" type="input" selector="#coupon_code"/>
13+
<element name="DiscountInput" type="input" selector="#discount-code"/>
1314
<element name="ApplyCodeBtn" type="button" selector="//span[text()='Apply Discount']"/>
1415
</section>
1516
</sections>

0 commit comments

Comments
 (0)