Skip to content

Commit 9310311

Browse files
committed
Merge branch 'ACP2E-1937' of https://github.com/adobe-commerce-tier-4/magento2ce into 2.4-develop
2 parents 83c5895 + 82db6dc commit 9310311

File tree

3 files changed

+57
-11
lines changed

3 files changed

+57
-11
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/************************************************************************
4+
* Copyright 2023 Adobe
5+
* All Rights Reserved.
6+
*
7+
* NOTICE: All information contained herein is, and remains
8+
* the property of Adobe and its suppliers, if any. The intellectual
9+
* and technical concepts contained herein are proprietary to Adobe
10+
* and its suppliers and are protected by all applicable intellectual
11+
* property laws, including trade secret and copyright laws.
12+
* Dissemination of this information or reproduction of this material
13+
* is strictly forbidden unless prior written permission is obtained
14+
* from Adobe.
15+
* ************************************************************************
16+
*/
17+
-->
18+
19+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
21+
<actionGroup name="AdminOrderStatusToStateAssignActionGroup" extends="AdminGoToOrderStatusPageActionGroup">
22+
<annotations>
23+
<description>Order Default Status assignation to Order State.</description>
24+
</annotations>
25+
<arguments>
26+
<argument name="orderStatus" type="string"/>
27+
<argument name="orderState" type="string" />
28+
</arguments>
29+
<click selector="{{AdminOrderStatusGridSection.assignStatusToStateBtn}}" stepKey="clickAssignStatusBtn" after="waitForPageLoaded"/>
30+
<selectOption selector="{{AdminAssignOrderStatusToStateSection.orderStatus}}" userInput="{{orderStatus}}" stepKey="selectOrderStatus"/>
31+
<selectOption selector="{{AdminAssignOrderStatusToStateSection.orderState}}" userInput="{{orderState}}" stepKey="selectOrderState"/>
32+
<checkOption selector="{{AdminAssignOrderStatusToStateSection.orderStatusAsDefault}}" stepKey="orderStatusAsDefault"/>
33+
<checkOption selector="{{AdminAssignOrderStatusToStateSection.visibleOnStorefront}}" stepKey="visibleOnStorefront"/>
34+
<click selector="{{AdminAssignOrderStatusToStateSection.saveStatusAssignment}}" stepKey="clickSaveStatus"/>
35+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForMessageVisible"/>
36+
<see userInput="You assigned the order status." selector="{{AdminMessagesSection.success}}" stepKey="assertSaveSuccessMessage"/>
37+
</actionGroup>
38+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckZeroSubtotalOrderWithCustomStatus.xml renamed to app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckZeroSubtotalOrderWithCustomStatusTest.xml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCheckZeroSubtotalOrderWithCustomStatus">
11+
<test name="AdminCheckZeroSubtotalOrderWithCustomStatusTest">
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="Zero Subtotal Checkout Order"/>
@@ -18,8 +18,6 @@
1818
<useCaseId value="ACP2E-1120"/>
1919
<severity value="AVERAGE"/>
2020
<group value="checkout"/>
21-
<!-- @TODO: Remove "pr_exclude" group when issue ACQE-4977 is resolved -->
22-
<group value="pr_exclude" />
2321
</annotations>
2422
<before>
2523
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" />
@@ -42,6 +40,12 @@
4240
</before>
4341

4442
<after>
43+
<!-- Assign default pending status to state new -->
44+
<actionGroup ref="AdminOrderStatusToStateAssignActionGroup" stepKey="resetDefaultStatusToState">
45+
<argument name="orderStatus" value="{{OrderStatus.pending}}" />
46+
<argument name="orderState" value="{{defaultOrderStatus.label}}" />
47+
</actionGroup>
48+
4549
<magentoCLI command="config:set {{EnableFreeOrderStatusPending.path}} {{EnableFreeOrderStatusPending.value}}" stepKey="disablePaymentMethodsSettingConfig"/>
4650
<magentoCLI command="config:set {{EnableFreeOrderPaymentAutomaticInvoiceAction.path}} {{EnableFreeOrderPaymentAutomaticInvoiceAction.value}}" stepKey="enableFreeOrderPaymentAutomaticInvoiceAction"/>
4751
<actionGroup ref="CliDisableFreeShippingMethodActionGroup" stepKey="disableFreeShippingConfig"/>
@@ -77,14 +81,17 @@
7781
</actionGroup>
7882

7983
<!-- Assign status to state -->
80-
<click selector="{{AdminOrderStatusGridSection.assignStatusToStateBtn}}" stepKey="clickAssignStatusBtn"/>
81-
<selectOption selector="{{AdminAssignOrderStatusToStateSection.orderStatus}}" userInput="{{defaultOrderStatus.label}}" stepKey="selectOrderStatus"/>
82-
<selectOption selector="{{AdminAssignOrderStatusToStateSection.orderState}}" userInput="{{OrderState.new}}" stepKey="selectOrderState"/>
83-
<checkOption selector="{{AdminAssignOrderStatusToStateSection.orderStatusAsDefault}}" stepKey="orderStatusAsDefault"/>
84-
<uncheckOption selector="{{AdminAssignOrderStatusToStateSection.visibleOnStorefront}}" stepKey="visibleOnStorefront"/>
85-
<click selector="{{AdminAssignOrderStatusToStateSection.saveStatusAssignment}}" stepKey="clickSaveStatus"/>
86-
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeSuccess">
87-
<argument name="message" value="You assigned the order status." />
84+
<comment userInput="BIC workaround" stepKey="clickAssignStatusBtn"/>
85+
<comment userInput="BIC workaround" stepKey="selectOrderStatus"/>
86+
<comment userInput="BIC workaround" stepKey="selectOrderState"/>
87+
<comment userInput="BIC workaround" stepKey="orderStatusAsDefault"/>
88+
<comment userInput="BIC workaround" stepKey="visibleOnStorefront"/>
89+
<comment userInput="BIC workaround" stepKey="clickSaveStatus"/>
90+
<comment userInput="BIC workaround" stepKey="seeSuccess"/>
91+
92+
<actionGroup ref="AdminOrderStatusToStateAssignActionGroup" stepKey="resetDefaultStatusToState">
93+
<argument name="orderStatus" value="{{defaultOrderStatus.label}}" />
94+
<argument name="orderState" value="{{OrderState.new}}" />
8895
</actionGroup>
8996

9097
<!-- Prepare data for constraints -->

app/code/Magento/Shipping/Test/Mftf/ActionGroup/StorefrontSetShippingMethodActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<argument name="shippingMethodName" type="string" defaultValue="Flat Rate"/>
1717
</arguments>
1818
<waitForPageLoad stepKey="waitForShippingToLoad"/>
19+
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethodName)}}" stepKey="waitForShippingButtonToLoad" />
1920
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethodName)}}" stepKey="waitForShippingButton"/>
2021
<checkOption selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethodName)}}" stepKey="selectFlatRateShippingMethod"/>
2122
<waitForPageLoad stepKey="waitForLoadingMaskForNextButton"/>

0 commit comments

Comments
 (0)