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

Fix \Magento\Sales\Service\V1\ShipmentCreateTest::testInvoke #1339

Closed
nmalevanec opened this issue Jun 8, 2018 · 1 comment
Closed

Fix \Magento\Sales\Service\V1\ShipmentCreateTest::testInvoke #1339

nmalevanec opened this issue Jun 8, 2018 · 1 comment
Assignees

Comments

@nmalevanec
Copy link
Contributor

nmalevanec commented Jun 8, 2018

Preconditions

  1. Magento 2 with MSI

Steps to reproduce

  1. Run \Magento\Sales\Service\V1\ShipmentCreateTest::testInvoke()

Expected result

  1. Test passed successfully.

Actual result

  1. Test fails with error:
    {"message":"The shipment couldn't be saved."}

Details

Test sends incorrect request body for shipment creation:
"items": [ { "order_item_id": "4", "qty": "2.0000", "additional_data": null, "description": null, "entity_id": null, "name": null, "parent_id": null, "price": null, "row_total": null, "weight": null } ],
without specifying product id (entity_id) in shipment items, which leads to broken shipment on mainline
image
And error {"message":"The shipment couldn't be saved."} on MSI. Triggered by https://github.com/magento-engcom/msi/blob/d70307965d038e8434d538893f4f2a542fac2fbc/app/code/Magento/InventoryShipping/Model/GetItemsToDeduct.php#L64
and
https://github.com/magento-engcom/msi/blob/d70307965d038e8434d538893f4f2a542fac2fbc/app/code/Magento/InventoryCatalog/Model/GetSkusByProductIds.php#L46-L49

@nmalevanec nmalevanec changed the title Fix \Magento\Sales\Service\V1\ShipmentCreateTest::testInvoke() Fix \Magento\Sales\Service\V1\ShipmentCreateTest::testInvoke Jun 8, 2018
@slackerzz
Copy link
Member

@maghamed i'm working on this one

slackerzz added a commit to magespecialist/msi that referenced this issue Jun 9, 2018
slackerzz added a commit to slackerzz/magento2 that referenced this issue Jun 9, 2018
naydav pushed a commit that referenced this issue Jun 14, 2018
Fix issue #1339 - \Magento\Sales\Service\V1\ShipmentCreateTest::testInvoke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants