Need some input for proposing various improvements #120
Replies: 3 comments 1 reply
-
I don't think my factories ought to be responsible for being compatible with CypressOnRails Currently, the verb to the factory generator is configurable. Is there any reasonable case for a system test in which you want a factory to do anything other than create or create_list? Does anyone associate/nest objects in factories that arent ActiveRecord relations? I want to turn app commands into POROs and map them by class name, so you can't simply run arbitrary code by pointing to any file. Is there any reason why it wasn't designed like this in the first place? To anyone using appEval: any good reason not to write a custom command instead? From a Security standpoint, it's still best to to not expose your local server and make sure to bind it to localhost. |
Beta Was this translation helpful? Give feedback.
-
we don't use |
Beta Was this translation helpful? Give feedback.
-
@pelletencate In case you're interested, I've just implemented a small solution that allows to call FactoryBot like this from your Cypress tests (and also not worry about FactoryBot associations): FactoryBot.create("assignment", "with_deadline_tomorrow", { file_type: ".pdf", size_max: 10 }); You can check it out in this repo. |
Beta Was this translation helpful? Give feedback.
-
Hi! We've decided to make Cypress our first-stop system testing framework for our Rails app. We love working with CypressOnRails for its middleware.
I'd like to propose some improvements I'm working on that I'd love to contribute back upstream, but I'd like to be informed on use cases that other people have.
Factories
factory
command that immediately creates and yields one single factory.All in all, on my end I'm now able to write this:
I've currently hacked this around the commands, but it should obviously be part of
SmartFactoryWrapper
. I want to remove the$
eventually, making it smart enough to map keys to ActiveRecord classes and their associations.Questions I'd like insight on
1. Factories
create
orcreate_list
?2. Security
Beta Was this translation helpful? Give feedback.
All reactions