Open NullVoxPopuli opened 3 years ago
ah, we have to resolve this:
- Global error: Uncaught ReferenceError: Ember is not defined at
looks like we have to remove ember-test-selectors:
(or PR to them and block this PR)
@GavinJoyce + @alexlafroscia + @achambers do ya'll have thoughts on leaving the test selectors in, and then providing a (fractal) page object in addon-test-support for enabling easier interaction with these components in consuming apps? so that way consumers don't all need to write their own test helpers. (or they could, and just ignore what is provided, like if they don't like fractal for whatever reason (I only mention fractal, because ember-cli-page-object does not work well with typescript, and is generally too dynamic)). Another option is go page-object agnostic, and "just use the js apis" (but then we don't have any integrated query selector nesting, which is mostly what the page object patterns are for anyway (I mean, secondary to providing a humanized API for component interaction, and abstracting away the DOM)
I'm all for providing useful test helpers to consuming apps. I've no experience with fractal page objects, but happy to use them if they provide consuming apps a nice test API
alright, next blocker: https://github.com/mixonic/ember-cli-deprecation-workflow/issues/133
My perspective on the test helpers:
addon
tree not ship any data-test-
selectors; I feel like this is a testing detail that should be private to our own tests, or configured by the app using Headless UI, but isn't something we should push onto our users. They become part of the public API if we include them, and I would rather we avoid that altogether. That would also allow us to avoid needing ember-test-selectors
at all as a dependencyaddon-test-support
directory so that host apps can test their components the same way they are tested internally. Whether they are functions or page objects doesn't matter to me, though I like the idea that it's just functions as it avoids being tied to any given page object implementation
Supersedes #72