You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, when creating a new record with Factory Bot, we believe a trait exists, but it doesn't. That can happen because it was written in another way, because of a typo, or just because it wasn't implemented yet.
Failure/Error: admin = create(:user, :admin)
KeyError:
Trait not registered: "admin"
When that happens, we have to find the factory definition to know what are the available traits. It would be less disruptive to the flow to know what traits were registered.
Pull request #1717 fixes an issue with inherited traits and changes how they are recorded, so the code for this feature will depend on whether #1717 is approved or rejected.
Problem this feature will solve
Sometimes, when creating a new record with Factory Bot, we believe a trait exists, but it doesn't. That can happen because it was written in another way, because of a typo, or just because it wasn't implemented yet.
When that happens, we have to find the factory definition to know what are the available traits. It would be less disruptive to the flow to know what traits were registered.
Desired solution
We could see something like:
The text was updated successfully, but these errors were encountered: