Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFTF: Print Shipping Labels Without Created Shipment Test #33370

Open
wants to merge 3 commits into
base: 2.4-develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?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="AdminSalesPrintShippingLabelsWithoutCreatedShipmentTest">
<annotations>
<features value="sales"/>
<stories value="Printing Shipping Labels Without Created Shipments"/>
<title value="Shipping Labels Printing"/>
<description value="Admin should not be able print shipping labels until shipment was not created"/>
<severity value="MINOR"/>
<group value="sales"/>
</annotations>
<before>
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
<createData entity="SimpleProduct" stepKey="createProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
</after>

<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
<argument name="Customer" value="$createCustomer$"/>
</actionGroup>
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory">
<argument name="category" value="$createCategory$"/>
<argument name="product" value="$createProduct$"/>
</actionGroup>
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addProductToTheCart">
<argument name="productQty" value="1"/>
</actionGroup>
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckout"/>
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
<actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/>
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/>
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder">
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/>
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
</actionGroup>
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="getOrderId"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="findCreatedOrderOnGrid">
<argument name="orderId" value="$getOrderId"/>
</actionGroup>
<actionGroup ref="AdminOrderActionOnGridActionGroup" stepKey="selectPrintShippingLabels">
<argument name="action" value="Print Shipping Labels"/>
<argument name="orderId" value="$getOrderId"/>
</actionGroup>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertErrorMessage">
<argument name="message" value="There are no shipping labels related to selected orders."/>
<argument name="messageType" value="error"/>
</actionGroup>
</test>
</tests>