FactoryBot: Allow all factories with any traits to be stubbed
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
Sometimes, stubbing a factory project does not work (e.g. create(:project, :repository)).
Proposed solution
- Adjust https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/spec/models/factories_spec.rb to verify
build_stubbedper factory - !126501- Exclude list of factories and traits which won't work yet (similar to
skippedbut per strategy)
- Exclude list of factories and traits which won't work yet (similar to
- Fix often-used and heavy factories first
-
project,user
-
Implementation guides
- Heavy use of strategy specific callbacks like
before(:create)prevents from other strategies to function- For example: #262624 (comment 1167112194)
- ...
Edited by 🤖 GitLab Bot 🤖