Comments (4)
Thanks @maxwellmstein for reporting the issue and sharing your approach to work around it.
By the way, is there are reason you aren't moving your code to version 40 to ensure everything is running inside a locker?
from lightningtestingservice.
Yeah - for production builds all components will be v.40. I'm using a Redux store and the sweet chrome devtoolbar for it relies on the store being accessible on the window. So I have that one component at v.39 for development.
I think this issue would occur if you created components outside your namespace as well though, right? Say if I wanted to create some standard components to test my custom components interaction with them.
from lightningtestingservice.
Yes, basically when you access a component which isn't in the same locker (different namespace or below version-40), lockerService returns a SecureComponentRef wrapper instead of SecureComponent. SecureComponentRef's interface is alot more restrictive.
I do agree that clearRenderedTestComponents should be updated to support deletion of any component :)
from lightningtestingservice.
Update: For Winter'18, destroy() has been added to SecureComponentRef meaning that the current logic in the test util of LTS should start working as-is for components running without locker or from other namespaces. Related LockerService work-item W-4099006.
from lightningtestingservice.
Related Issues (20)
- test an init function
- how to tests when v.body is set HOT 7
- Question on `sfdx force:lightning:test:install -t jasmine` HOT 2
- prerequisites to write tests? HOT 1
- chain spyOn? HOT 2
- GAC when testing scenario 2 HOT 3
- Testing with namespaces and Labels HOT 1
- jasmineTests.app not working HOT 5
- Setting DateTime attribute using $T.createComponent gives internal server error HOT 3
- Reporting does not escape every attribute in Junit format.
- jasmineTests.app Failed - Definition does not exist HOT 4
- Test reporter not escaping results
- How to test component events when event and handler are in different components?
- Mocking the internal clock in jasmine
- LTS for blur component event HOT 1
- Request: Support JEST HOT 1
- Unable to install LTS with SFDX HOT 4
- lightning:test:run execution permission denied HOT 2
- Fails On Page Load w/ "Freeze Javascript Prototype" Enabled HOT 3
- Installing with sfdx causes a GACK HOT 4
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 lightningtestingservice.