Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

NullVoxPopuli
Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli commented Oct 3, 2021

Supersedes #72

GavinJoyce
GavinJoyce previously approved these changes Oct 3, 2021
Copy link
Owner

@GavinJoyce GavinJoyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@NullVoxPopuli
Copy link
Collaborator Author

ah, we have to resolve this:

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

@NullVoxPopuli
Copy link
Collaborator Author

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

(or PR to them and block this PR)

@NullVoxPopuli
Copy link
Collaborator Author

@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 NullVoxPopuli dismissed GavinJoyce’s stale review October 3, 2021 16:05

I've removed a dependency, so any previous approval is no longer valid, and to continue as if it were is sketchy. lol

@GavinJoyce
Copy link
Owner

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

<script>
// testdouble support
// testdouble doesn't natively support the browser as it assumes
// that a `global` identifier will be available, but that is not the case for browsers
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reported this here: testdouble/testdouble.js#438
and it seemed there was 0 interest in resolving... :-\

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also opened a new issue: testdouble/testdouble.js#471

to see what they feel like doing about it 🤷

Copy link
Collaborator

@alexlafroscia alexlafroscia Oct 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better than just configuring ember-auto-import to polyfill global as it did before? Did that configuration need to change to support Embroider?

@NullVoxPopuli
Copy link
Collaborator Author

alright, next blocker: ember-cli/ember-cli-deprecation-workflow#133

@alexlafroscia
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants