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

add blueprint + test helper for integration tests #50

Merged

Conversation

bgentry
Copy link
Contributor

@bgentry bgentry commented Jan 14, 2017

Borrowing from an approach used by ember-cli-flash, we add a helper to duplicate the behavior of the initializer when we're running an integration test (where initializers are not loaded). Also, add a blueprint that auto-installs this helper and loads it in tests/test-helepr.js.

I haven't actually run the blueprint itself, but I did manually make the changes it would make on my own app and that fixed the issue I was having.

Hopefully this does the trick!

Fixes #49.

Borrowing from an approach used by ember-cli-flash, we add a helper to
duplicate the behavior of the initializer when we're running an
integration test (where initializers are not loaded). Add a blueprint
that auto-installs this helper and loads it in tests/test-helepr.js.
@marcoow
Copy link
Member

marcoow commented Jan 14, 2017

Thanks, looks great! We'll test the blueprint in some of our projects and maybe add a test for it next week!

@bgentry
Copy link
Contributor Author

bgentry commented Jan 14, 2017

@marcoow awesome! I also realized after submitting this that maybe I could just import the initializer directly and call that here? That would avoid duplicating the code around Ember.Component.reopenClass.

Is there a non-manual way to test blueprints? I couldn't find any projects that were doing such a thing.

@pangratz
Copy link
Contributor

@bgentry it's possible using ember-cli-blueprint-test-helpers, see an example within ember-data...

@Turbo87 Turbo87 merged commit eb9ce87 into mainmatter:master Jan 16, 2017
@Turbo87
Copy link
Collaborator

Turbo87 commented Jan 16, 2017

@bgentry thanks a lot for making us aware of this issue and providing a solution at the same time!

@Turbo87 Turbo87 added the bug label Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

attributeBindings not being initialized in components on integration tests
4 participants