cypress
cypress copied to clipboard
Using factories by morph name
trafficstars
Hello,
this is the PR for issue #50, I got no response on the issue so I figured I might as well try a PR directly.
This PR adds support for using factories by Eloquent model morph name.
cy.create('App\\Models\\User', { email: '[email protected]' });
can be a little more simplified and more straightforward to type
cy.create('user', { email: '[email protected]' });
cy.create({
model: 'user',
attributes: { email: '[email protected]' },
count: 10
})
Feel free to close it if it's not something you want in the package.
Thank you!
I was going to contribute the same thing!