Closed robsoned closed 7 months ago
Hey @robsoned
Not sure why the CI pipeline didn't trigger for you.
I've been reviewing this as well in https://github.com/AmpersandHQ/magento2-disable-stock-reservation/pull/128 , I believe in the magento inventory repo this may be handled by https://github.com/magento/inventory/commit/e0ff93dbd99c7c9a151cf71f8475641201301ebe
The tests I put together seems to suggest this works for some versions of Magento but not others, but is a promising start.
Hi @convenient
When was this test ran? Because I've confused the method isAutoReturnEnabled
with getCanBackInStock
. I've fixed yesterday.
I've run the tests on version 2.4.5, here is the result:
Maybe the test had not run yesterday, because I did not create a new commit, I committed with git commit -m '...' --amend
.
Hey @robsoned
I have added some tests to your branch.
Without your code change the tests for all versions fail with The stock did stay at 0
1) Ampersand\DisableStockReservation\Test\Integration\Cancel\CancelOrderBackInStockConfigTest::testCancelOrderBackInStockDisabled
The stock did stay at 0
Failed asserting that 5.0 matches expected 0.
/current_extension/dev/MagentoTests/Integration/Cancel/CancelOrderBackInStockConfigTest.php:230
With your code change they're all green.
Fix #126