Comments (8)
@mitchlloyd - I'm not sure I follow. The PR referenced (#96) made it possible to override services in unit or integration tests (not acceptance tests). In general acceptance tests do not use this repo (or ember-qunit) at all. The functionality in these tests are currently passing in Ember 1.11 and higher.
Can you provide me with an example of what you mean?
from ember-test-helpers.
If acceptance tests don't use this library then I must be mistaken that this worked in the past. I'm probably just confusing this behavior with component integration tests. Closing this issue.
I would like to do something like what was shown in your "Allow overriding services/factories in the registry" PR in an acceptance test. Something like:
this.application.register('service:analytics', MockAnalyticsService)
But I'm having trouble because of the tricky registry behavior that you documented in the commit message of that same PR. My workaround for now is to handle this stubbing in my production code, but if you can drop any registry knowledge bombs on me please do!
from ember-test-helpers.
@mitchlloyd - The super crappy (but functional) workaround for this in acceptance tests is:
this.application.__deprecatedInstance__.register('service:foo', Ember.Service.extend());
I am actively working on a better solution to bring acceptance tests back into feature parity with integration tests (seems like a constant battle back and forth
from ember-test-helpers.
Thanks for that workaround. I appreciate all your hard work that makes my development experience better
from ember-test-helpers.
This workaround saved my bacon just now, thank you!
from ember-test-helpers.
Any news on this? Why in acceptance test I can't use simply:
this.application.register("service:notifications", notificationsServiceMock)
instead of:
this.application.__deprecatedInstance__.register("service:notifications", notificationsServiceMock)
?
Which is the correct way of doing this?
from ember-test-helpers.
My comment in #124 (comment) is still correct.
from ember-test-helpers.
Ok, I'm using this right now, but how to know if things in future changes? New issue in this repo to subscribe?
from ember-test-helpers.
Related Issues (20)
- Breaking change released as a minor version HOT 6
- Consider supporting custom elements HOT 1
- @ember/test-helpers 2.8.0 breaks embroider-optimized scenario HOT 6
- @ember/renderer work in 2.8.0/2.8.1 not compatible with prior ember releases HOT 6
- peerDeps don't support Ember beta with npm HOT 3
- Can't build docs HOT 1
- Not able to use `tab` helper HOT 5
- Support for finding elements by text, label, alt text, etc.? HOT 1
- Support for `rerender()` with DOM interaction helpers in acceptance tests HOT 2
- triggerEvent for a "change" event for a file input does not set the value of the input correctly HOT 1
- [DOCS] Documentaiton for tab helper has not been published HOT 1
- ember-try embroider-safe fails on CI HOT 2
- Convert to TS or supply ambient definitions HOT 4
- Let's add fetch to the settled checks? HOT 2
- Missing types for @glimmer/interfaces HOT 3
- element doesn't exist on type TestContext HOT 2
- Property 'element' does not exist on type 'TestContext'. ? HOT 2
- `find` and `findAll` examples are swapped
- Cannot find type definition file for 'ember__test-helpers' after upgrading to v2.9.3 HOT 2
- Regression with `find()` generic type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-test-helpers.