This probably belongs in another thread. (I'm one of the random
audience people you probably can't hear in the video.)
But I'd say that I always try and avoid using the UI in full-stack
tests where it's not actually the thing I'm testing, both for
performance and sanity reasons; having to fix a heap of tests because
they rely on a particular UI setup isn't that fun. (Clearly can be
avoided/pain-reduced by wrapping the UI in some helpers for setup
stuff, perhaps even a factory!)
The general guideline I (try to) go by is that in a Cucumber sense,
the "given" step should be DB-direct, the "when" should be UI
invoking, and the "then" should be DB-direct unless you're actually
asserting something about the state of the UI. And you should have
overlapping short stories about how different parts of that process
should work. Note that the main thing I've been working on for the
past couple of years is a fat JS client connected to a non-Rails
backend; but I've found the same pattern to be relevant to Rails apps.
I'm on the not-entirely-convinced-that-factories-are-bad side of the
fence (I use them a lot). They can indeed hide poor design, but the
same can be said about many things. It seemed to me that a lot of the
talk was "change your objects so that create! is the same as a
factory" -- i.e. the default values make business sense, or nulls are
allowed. It works in some situations, but seemed to shift a lot of
the complexity elsewhere, sometimes distributing it throughout your
codebase. I'm not sure that dispersed and potentially duplicated
complexity is any better than concentrated complexity. I'm also
fairly sure that sometimes it's just not possible to have a valid (in
the business sense) object that doesn't have any attributes set.
(I might also add that if you're going to have factories, then they
should be combined with something like Faker to make sure they always
generate different objects; you shouldn't be relying on stuff
hard-coded in factories (or fixtures, for that matter) in your tests.)
It's a good conversation to have though; and it's probably not
actually discussed enough. I've certainly seen a lot of bad things
done with over-reliance on factories (combined with full-stack
integration tests for maximum pain). And some of the design changes
talked about would improve any system.