Skip to content

Commit

Permalink
ENGCOM-9277: [MFTF] Refactoring StorefrontVerifyOrderHistoryCommentsT…
Browse files Browse the repository at this point in the history
…est #33667
  • Loading branch information
sidolov committed Jan 31, 2022
2 parents d2c03eb + 518a56f commit 93cce98
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Quote/Test/Mftf/Data/CustomerCartData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
<entity name="GetOrderData" type="CustomerCart">
<var key="cart_id" entityKey="return" entityType="CustomerCart"/>
</entity>

</entities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="StorefrontVerifyOrderHistoryCommentsWithHTMLTagsTest">
<annotations>
<features value="Sales"/>
<stories value="Storefront Customer Order History Comments"/>
<title value="Verify Customer Order History Comments On Storefront"/>
<description value="Verify that comment with HTML tag is displayed properly on the Order View Page on Storefront"/>
<testCaseId value="MC-42694"/>
<useCaseId value="MC-42531"/>
<severity value="MINOR"/>
<group value="Sales"/>
</annotations>
<before>
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
<createData entity="SimpleProduct2" stepKey="createProduct"/>
<createData entity="CustomerCart" stepKey="createCustomerCart">
<requiredEntity createDataKey="createCustomer"/>
</createData>
<createData entity="CustomerCartItem" stepKey="addCartItem">
<requiredEntity createDataKey="createCustomerCart"/>
<requiredEntity createDataKey="createProduct"/>
</createData>
<createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress">
<requiredEntity createDataKey="createCustomerCart"/>
</createData>
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="submitOrder">
<requiredEntity createDataKey="createCustomerCart"/>
</updateData>
</before>
<after>
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
</after>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

<actionGroup ref="AdminOpenOrderViewPageByOrderIdActionGroup" stepKey="openOrder">
<argument name="orderId" value="$createCustomerCart.return$"/>
</actionGroup>

<actionGroup ref="AdminSalesOrderCommentsActionGroup" stepKey="fillAndSaveOrderComments">
<argument name="comment" value="{{SalesOrderComments.commentWithHyperlink}}" />
</actionGroup>

<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront">
<argument name="Customer" value="$$createCustomer$$"/>
</actionGroup>

<actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/>

<dontSee userInput="{{anchorTagFragment.anchorTag}}" selector="{{StorefrontCustomerOrderViewSection.orderComment}}" stepKey="dontSeeExposedHtmlCode"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<useCaseId value="MC-42531"/>
<severity value="MINOR"/>
<group value="Sales"/>
<skip>
<issueId value="DEPRECATED">Use StorefrontOrderCommentWithHTMLTagsDisplayTest instead</issueId>
</skip>
</annotations>
<before>
<!-- Create customer -->
Expand Down

0 comments on commit 93cce98

Please sign in to comment.