Integration Test Helpers are undefined in Component Test
See original GitHub issueI’m writing a tutorial about creating Ember Addons / Components. Since it is a datepicker component I want to test various user interactions on the component.
These tests fail because the helpers click
etc. are not defined. I’m following the official Ember.js guide and it fails. I’m not sure if this is a problem on my end or something is broken?
Related SO question: http://stackoverflow.com/questions/25657787/acceptance-testing-a-ember-datepicker-component-with-ember-cli
Issue Analytics
- State:
- Created 9 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Unit testing a Component says common helpers like 'click' and ...
I'm trying to unit test a very simple component. However, it appears some very common test helpers aren't being defined.
Read more >Testing Helpers - Ember Guides
Testing helpers follows previous patterns shown in Testing Components, ... Helpers are best tested with integration tests, but can also be tested with...
Read more >Testing Components with children - Testing Angular
An integration test of HomeComponent renders the child Components. The host elements are filled with the output of CounterComponent , ...
Read more >Component Integration Testing in Ember - Mutually Human
I mentioned before that complicated pages make for complicated acceptance tests. Since an acceptance test treats the app as a black box, interacting...
Read more >Basics of testing components - Angular
Test a component class on its own as you would test a service class. Component class testing should be kept very clean and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just a note for noobs like me who end up here, adding this to the test imports the helpers for “integration” tests:
I’m having this problem right now in v2.9.1
I have: tests/helpers/assert-trimmed-text.js (and i’ve tried assertTrimmedText.js) tests/helpers/start-app.js with: import ‘./assert-trimmed-text’; (and tried import ‘./assertTrimmedText’; as above etc)
in ANY component test, if I do assertTrimmedText(stuff) I get told: http://localhost:7357/assets/test-support.js:6956:22: Can’t find variable: assertTrimmedText