Skip to content

Automatic Factory Bot associations #165

@Splines

Description

@Splines

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions