-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
imagento/magento2#8515: Downloadable product is available for downloa… #8917
Conversation
…d even if order state is set canceled. - Set expired status of downloaded product during change order status to canceled.
We will provide test for covering this case |
Hi @nazarpadalka Thank you |
Thanks !! |
Are you still working on it? |
@ishakhsuvarov |
@nazarpadalka It is the best practice to deliver tests simultaneously. Thank you |
…wnloadable product, after order was canceled.
@ishakhsuvarov Hello. Sorry for long response, currently I have a trip. |
@ishakhsuvarov we already added tests to PR, please let us know if need some else. |
@ishakhsuvarov Want to confirm, that old branch version did not pass that test. |
/** @var \Magento\Sales\Model\Order $order */ | ||
$order = $this->prepareOrder(); | ||
$order = $this->orderRepository->save($order); | ||
if ($orderItems = $order->getAllItems()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like assertions will be unreachable in case if order would not have items, therefore making the test green false-positively.
* @magentoDbIsolation enabled | ||
* @return \Magento\Sales\Model\Order | ||
*/ | ||
protected function prepareOrder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why didn't you just use the order_with_downloadable_product
fixture which is pretty similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ishakhsuvarov It has some difference between this and order_with_downloadable_product fixture. For some reason (probably its an isolation) my test was not able to retrieve order links with specific ID I setup.
@KravetsAndriy Thank you very much! |
@KravetsAndriy Please look into the static test failure on Travis CI |
@ishakhsuvarov will fix this in the evening. Thanks |
…refactored test for SetLinkStatusObserver.
|
@KravetsAndriy Thank you for the fixes. |
@ishakhsuvarov , thank you too! This one took some extra time, since it was first contribute. Now we look for new issues to take and I think, that we will decrease time, spent on formal stuff like we did. |
@nazarpadalka @KravetsAndriy PR is merged into the |
@ishakhsuvarov Thanks you too! |
@ishakhsuvarov Thanx you |
Description
Resolve issue with possibility to download downloadable product after order was canceled
Fixed Issues (if relevant)
#8515
Manual testing scenarios
Contribution checklist