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

Ensure test selector stripping works for inline template compilation and co-located components #521

Merged
merged 1 commit into from
May 7, 2020

Conversation

rwjblue
Copy link
Contributor

@rwjblue rwjblue commented May 6, 2020

Prior to this, the registry.add('htmlbars-ast-plugin', ...) invocation in index.js runs after all of the htmlbars-ast-plugins are read and registered for inline JS/TS compilation. It is still before stand alone templates are ran (and that is why it works for *.hbs files that are not colocation).

This ensures that ember-test-selectors runs before ember-cli-htmlbars / ember-cli-htmlbars-inline-precompile (so that we can ensure that ember-test-selectors included runs, and therefore the htmlbars-ast-plugin is registered before it is needed for inline template compilation).

Fixes #427

@Turbo87 Turbo87 changed the title Ensure test selector stripping works for inline template compilation Ensure test selector stripping works for inline template compilation and co-located components May 7, 2020
Prior to this, the `registry.add('htmlbars-ast-plugin', ...)` invocation in `index.js` runs _after_ all of the `htmlbars-ast-plugins` are read and registered for inline JS/TS compilation. It is still before stand alone templates are ran (and that is why it works for `*.hbs` files that are not colocation).

This ensures that `ember-test-selectors` runs _before_ `ember-cli-htmlbars` / `ember-cli-htmlbars-inline-precompile (so that we can ensure that `ember-test-selectors` included runs, and therefore the `htmlbars-ast-plugin` is registered before it is needed for inline template compilation).
Copy link
Collaborator

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

❤️

@Turbo87 Turbo87 merged commit 7155508 into mainmatter:master May 7, 2020
@Turbo87
Copy link
Collaborator

Turbo87 commented May 7, 2020

Released as v4.1.0. Thanks a lot! :)

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

Successfully merging this pull request may close these issues.

data-test selectors are not stripped from colocated component templates
2 participants