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
After install event breaking automated testing #37
Comments
👋 Any potential update here? Been holding off merging this plugin in. Thanks! |
@davist11 - Admittedly I haven't done a deep dive into Craft's testing, but are there any particular errors you're getting that may help track it down? I'm hesitant to move up the console request check because I think we'd still want to install the Tax Category and override Fields if you're installing the plugin from the console. That check is just to prevent the CP redirect if running in the console. Are you defining |
There isn't really a great error to send you down a path because I just get a generic:
Something in that
Yep, we have all these constants set in our bootstrap:
Maybe a FR for Craft would be to have some sort of boolean for when the test suite is running. Another option would be checking to see if the environment == |
I see. So it's breaking the next plugin install and maybe causes an error because the Navigation plugin didn't run it's migrations or something. I wasn't sure if the environment was alway set to
... at the top of this function to just bail: Lines 199 to 204 in 67c93a8
|
I think so, you can see in the test setup that is sets a default https://github.com/craftcms/cms/blob/develop/src/test/TestSetup.php#L262-L281 And yeah, I think adding a check like that makes sense. Want me to manually add it and test? Would be happy to submit a PR. |
Good deal. Yeah if you can test it that would be awesome. Either a PR and I'll merge it or just let me know if the conditional works and I can get it added in and bump the version. |
Success, test suite passes! #38 |
Thanks @davist11! Merged and version bumped. |
Awesome, thank you! |
We have automated testing setup on our Craft + Commerce install. Once we added this plugin, the test suite no longer runs completely (it doesn't install other plugins we have installed). I commented this out just to test:
craft-avatax/src/Avatax.php
Lines 98 to 106 in 67c93a8
And the suite runs correctly then. I'm not sure the best solution to fix this. Should this be moved up to the top of the method?
craft-avatax/src/Avatax.php
Lines 307 to 309 in 67c93a8
Or maybe check to see if the env is
test
?Craft Pro 3.6.11.1
Avatax 2.1.5
The text was updated successfully, but these errors were encountered: