ember-headlessui icon indicating copy to clipboard operation
ember-headlessui copied to clipboard

Re-enable embroider testing #34, #33, #72

Open NullVoxPopuli opened this issue 4 years ago • 6 comments

Supersedes #72

  • [ ] Re-add ember-cli-deprecation-workflow
    • [x] https://github.com/mixonic/ember-cli-deprecation-workflow/issues/133
  • [x] Investigate root cause of ember-test-selectors
    • initially I removed ember-test-selectors, but I found a way to disable the feature that was breaking embroider compatibility for us. 🎉
  • [ ] Fix failing tests

NullVoxPopuli avatar Oct 03 '21 15:10 NullVoxPopuli

ah, we have to resolve this:

- Global error: Uncaught ReferenceError: Ember is not defined at 

NullVoxPopuli avatar Oct 03 '21 15:10 NullVoxPopuli

looks like we have to remove ember-test-selectors: image

(or PR to them and block this PR)

NullVoxPopuli avatar Oct 03 '21 16:10 NullVoxPopuli

@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)

NullVoxPopuli avatar Oct 03 '21 16:10 NullVoxPopuli

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

GavinJoyce avatar Oct 03 '21 16:10 GavinJoyce

alright, next blocker: https://github.com/mixonic/ember-cli-deprecation-workflow/issues/133

NullVoxPopuli avatar Oct 03 '21 19:10 NullVoxPopuli

My perspective on the test helpers:

  • I would like to see the 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 dependency
  • I would like to see the addon ship the test selectors we are using inside the addon-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

alexlafroscia avatar Oct 19 '21 16:10 alexlafroscia