Replies: 1 comment 5 replies
-
this is because we actual making a web request to the backend, and thus can only send JSON and don't have access to the actual ruby objects in cypress. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, thanks for this neat library acting as interface between cypress and Rails!
From your factory bot association docs:
All these methods feel kind of "hacky". When I specify an
assocation
command in factory bot, it automatically works in Ruby on Rails RSpec tests when callingFactoryBot.create(...)
. I'm wondering why we can't have this reflected in the cypressappFactories
command and instead have to set this up manually from Cypress?In the end, the code is executed by
FactoryBot
via Ruby on Rails, isn't it? So in theory, shouldn't it be possible to also deal with associations in the backend? Or maybe you can elaborate on why this design decision was chosen such that it has to be done manually?Beta Was this translation helpful? Give feedback.
All reactions