Skip to content

Commit

Permalink
added Shipment, CreditMemo
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaAPak committed Dec 1, 2020
1 parent beb0fda commit 320748f
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 1 deletion.
17 changes: 17 additions & 0 deletions app/code/Magento/Sales/Test/Mftf/Data/CreditMemoData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">

<entity name="CreditMemo" type="CreditMemo">
<var key="quote_id" entityKey="return" entityType="CustomerCart"/>
</entity>

</entities>
17 changes: 17 additions & 0 deletions app/code/Magento/Sales/Test/Mftf/Data/InvoiceData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">

<entity name="Invoice" type="Invoice">
<var key="quote_id" entityKey="return" entityType="CustomerCart"/>
</entity>

</entities>
17 changes: 17 additions & 0 deletions app/code/Magento/Sales/Test/Mftf/Data/ShipmentData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">

<entity name="Shipment" type="Shipment">
<var key="quote_id" entityKey="return" entityType="CustomerCart"/>
</entity>

</entities>
17 changes: 17 additions & 0 deletions app/code/Magento/Sales/Test/Mftf/Metadata/CreditMemoMeta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
<operation name="CreateCreditMemo" dataType="CreditMemo" type="create" auth="adminOauth" url="V1/order/{return}/refund" method="POST">
<contentType>application/json</contentType>
<object key="cartItem" dataType="CartItem">
<field key="quote_id">string</field>
</object>
</operation>
</operations>
17 changes: 17 additions & 0 deletions app/code/Magento/Sales/Test/Mftf/Metadata/ShipmentMeta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
<operation name="CreateShipment" dataType="Shipment" type="create" auth="adminOauth" url="V1/order/{return}/ship" method="POST">
<contentType>application/json</contentType>
<object key="cartItem" dataType="CartItem">
<field key="quote_id">string</field>
</object>
</operation>
</operations>
10 changes: 9 additions & 1 deletion app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@
</createData>
<updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation">
<requiredEntity createDataKey="createGuestCart"/>
</updateData>
</updateData>

<createData entity="Invoice" stepKey="invoiceOrder">
<requiredEntity createDataKey="createGuestCart"/>
</createData>

<createData entity="Shipment" stepKey="shipOrder">
<requiredEntity createDataKey="createGuestCart"/>
</createData>

<createData entity="CreditMemo" stepKey="refundMemo">
<requiredEntity createDataKey="createGuestCart"/>
</createData>

</before>
Expand Down

0 comments on commit 320748f

Please sign in to comment.