Alex P
02/14/2026, 12:12 AMSpree::Order factory likes to create objects with a lot of extra data that’s not required for validity (which is discouraged ). Some examples:
• create(:order) generates a Solidus user, but my checkout only uses guest checkouts.
• create(:order_with_line_items) generates an order with a bill_address and ship_address, even though the order is still in the cart state. In the real world an order would never have addresses at this point in the checkout lifecycle, but all the test objects do.
• create(:order_with_line_items) also generates a whole bunch of Spree::ShippingWhatever objects. My checkout has to interact with a third-party supplier to get shipping quotes, which then creates the necessary Spree::ShippingMethod objects. I’m still tracking down the best way to fix this, but I know I’m hitting a problem where my code expects a Spree::ShippingCategory with a name “Default” but my :order_with_line_items has a shipping method with a Spree::ShippingCategory with a name "ShippingCategory #1".
Generally it would be nice if some of these extra elements were split out into traits. If I could write eg. create(:order_with_line_items, :with_addresses, :with_shipping) to get the current object then I’d also be able to write create(:order_with_line_items) to get an order with just line items. Right now I’m defining my own factories that use Solidus’ factories as a base, and then undoing the associations/data that wouldn’t normally be found at that point in the checkout lifecycle.Jared Norman
spree_ prefixes. Stores/extensions could move to the new set at their convenience without the difficulty of trying to make their test suites work with multiple different versions of the factories.Sauce Bernays
02/15/2026, 12:52 AMspec/system/checkout_spec.rb:272 fails in test setup with Validation failed: ISO has already been taken. Spree::TestingSupport::OrderWalkthrough.up_to wants to create a country with the default ISO of 'US'. Problem is, the country already exists because checkout_spec includes the checkout setup context. ISO uniqueness was specifically mentioned as a change in the last release, so how did this not get caught in the release process?