Add automated travis tests and cherry pick #10 #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is quite a big PR, but I believe it all makes sense.
The reason for this PR are twofold
Travis will run 2 builds
Addition of test suite
I have added a codeception test suite which creates a product, adds to basket, checks out and then does assertions for each of the features listed in the README.md
See
In order to do this I had to move all the existing code into the
src
directory and update thecomposer.json
. This is because otherwise magento was detecting PHP code in thedev
directory and trying to include it in thedi:compile
The suite spins up a fully fledged instance of Magento 2 by using https://github.com/AmpersandHQ/travis-vanilla-magento which is ultimately powered by https://store.fooman.co.nz/blog/no-authentication-needed-magento-2-mirror.html
Cherry picking #10 - Use plugin after place instead of observer after save
I added a test to capture the error reported in #10 see 454faf8
You can see it failed here https://travis-ci.org/github/AmpersandHQ/magento2-disable-stock-reservation/builds/665961249
When I cherry picked in the commit from #10 the suite went green. See 3c48dbd and https://travis-ci.org/github/AmpersandHQ/magento2-disable-stock-reservation/builds/665975512