Skip to content

Commit 4deeab3

Browse files
committed
ACP2E-1937: fix revert of data for order status after test run
1 parent 1819863 commit 4deeab3

File tree

3 files changed

+56
-8
lines changed

3 files changed

+56
-8
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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
</before>
4343

4444
<after>
45+
<!-- Assign default pending status to state new -->
46+
<actionGroup ref="AdminOrderStatusToStateAssignActionGroup" stepKey="resetDefaultStatusToState">
47+
<argument name="orderStatus" value="{{OrderStatus.pending}}" />
48+
<argument name="orderState" value="{{defaultOrderStatus.label}}" />
49+
</actionGroup>
50+
4551
<magentoCLI command="config:set {{EnableFreeOrderStatusPending.path}} {{EnableFreeOrderStatusPending.value}}" stepKey="disablePaymentMethodsSettingConfig"/>
4652
<magentoCLI command="config:set {{EnableFreeOrderPaymentAutomaticInvoiceAction.path}} {{EnableFreeOrderPaymentAutomaticInvoiceAction.value}}" stepKey="enableFreeOrderPaymentAutomaticInvoiceAction"/>
4753
<actionGroup ref="CliDisableFreeShippingMethodActionGroup" stepKey="disableFreeShippingConfig"/>
@@ -77,14 +83,17 @@
7783
</actionGroup>
7884

7985
<!-- 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." />
86+
<comment userInput="BIC workaround" stepKey="clickAssignStatusBtn"/>
87+
<comment userInput="BIC workaround" stepKey="selectOrderStatus"/>
88+
<comment userInput="BIC workaround" stepKey="selectOrderState"/>
89+
<comment userInput="BIC workaround" stepKey="orderStatusAsDefault"/>
90+
<comment userInput="BIC workaround" stepKey="visibleOnStorefront"/>
91+
<comment userInput="BIC workaround" stepKey="clickSaveStatus"/>
92+
<comment userInput="BIC workaround" stepKey="seeSuccess"/>
93+
94+
<actionGroup ref="AdminOrderStatusToStateAssignActionGroup" stepKey="resetDefaultStatusToState">
95+
<argument name="orderStatus" value="{{defaultOrderStatus.label}}" />
96+
<argument name="orderState" value="{{OrderState.new}}" />
8897
</actionGroup>
8998

9099
<!-- 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)