Giter Site home page Giter Site logo

Comments (4)

esalman-sfdc avatar esalman-sfdc commented on July 17, 2024

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.

maxwellmstein avatar maxwellmstein commented on July 17, 2024

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.

esalman-sfdc avatar esalman-sfdc commented on July 17, 2024

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.

esalman-sfdc avatar esalman-sfdc commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.