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

Tests for MSI-1580: For configurable reservation after cancel order isn't create #1581

Closed
wants to merge 6 commits into from

Conversation

IvanPletnyov
Copy link
Contributor

Description

Get sku for reservation from order item.

Fixed Issues (if relevant)

  1. magento-engcom/msi-1580: For configurable reservation after cancel order isn't create

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

use Magento\Catalog\Model\Product\Visibility;
use Magento\TestFramework\Helper\Bootstrap;

Bootstrap::getInstance()->reinitialize();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need reinitialize? Looks like copy paste

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naydav Without reinitialize test in scope run are failed. I'm copy it from other test

/** @var $objectManager \Magento\TestFramework\ObjectManager */
$objectManager = Bootstrap::getObjectManager();
/** @var ProductRepositoryInterface $productRepository */
$productRepository = $objectManager->create(ProductRepositoryInterface::class);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use get method instead of create

@@ -0,0 +1,50 @@
<?php
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can reuse existed fixture (new inventory modules)

use Magento\Catalog\Model\Product\Visibility;
use Magento\GroupedProduct\Model\Product\Type\Grouped;
use Magento\TestFramework\Helper\Bootstrap;
use Magento\Store\Model\Website;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to work with API interfaces anywhere if it is possible

@@ -0,0 +1,89 @@
<?php
Copy link

@naydav naydav Aug 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have similar fixture (new inventory fixtures)

@maghamed
Copy link
Contributor

maghamed commented Sep 9, 2018

code review changes to PR should be done, especially regarding test coverage

@maghamed maghamed changed the title MSI-1580: For configurable reservation after cancel order isn't create Tests for MSI-1580: For configurable reservation after cancel order isn't create Oct 19, 2018
@magento-engcom-team magento-engcom-team deleted the MSI-1580 branch November 9, 2018 11:23
@maghamed maghamed restored the MSI-1580 branch November 14, 2018 07:59
@maghamed maghamed reopened this Nov 14, 2018
@ishakhsuvarov
Copy link
Contributor

Closing this PR for now as it's very outdated and conflicting.

@ishakhsuvarov ishakhsuvarov deleted the MSI-1580 branch August 22, 2019 15:18
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

Successfully merging this pull request may close these issues.

None yet

6 participants