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

Can we create and assign custom source and stocks to the product in unit test? #85

Open
rohit-jiva-ag opened this issue Jan 30, 2023 · 2 comments

Comments

@rohit-jiva-ag
Copy link

Hi Everyone,
Can we create and assign custom source and stocks to the product in unit test
as I want to test some case which has custom source and stocks and based on it's quantity I am asserting some values.

So like can we that using tddwizard in magento2?

Thanks

@schmengler
Copy link
Collaborator

Hi Rohit!

I was working on multi source integration a while back but ended up not needing it anymore. Check out the branch https://github.com/tddwizard/magento2-fixtures/tree/multi-source-inventory – with this you can at least assign a source when creating shipments. But you still need to create custom stocks on your own

@rohit-jiva-ag
Copy link
Author

Hi @schmengler
Thanks for the information It will be helpful, Is any other way like If I can create custom source and stocks once globally like in setUP()? Or any other way and then I just need to assign a source in a test cases where required.
And not required to create sources and stocks on each test case?

Thanks

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

No branches or pull requests

2 participants