First of all, thanks for this neat library acting as interface between cypress and Rails!
From your factory bot association docs:
You cannot access associations directly from Cypress like you can do with Ruby tests. So setting up associations has to be done differently from within Cypress.
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 calling FactoryBot.create(...). I'm wondering why we can't have this reflected in the cypress appFactories 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?
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
assocationcommand 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 cypressappFactoriescommand and instead have to set this up manually from Cypress?In the end, the code is executed by
FactoryBotvia 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?