Unit testing aura components with Lightning Testing Service and Mocha

When thinking about good quality software we must always have very present that tests automation is a must. There is a full list of tiers and tools that can be used to ensure that your software behaves as expected, bugs typically introduced by refactoring are prevented, and interconnected systems behave well together, as for example your code together with a Salesforce upgrade. In this post I want to focus on how to write unit tests for Lightning Components using Lightning Testing Service (LTS).

Continue reading “Unit testing aura components with Lightning Testing Service and Mocha”

Lightning:container to the rescue

If you have been developing Lightning Components for a while it is probable that you have come up against the feared Locker Service. If you are aware of Summer 18 Locker Service changes, you will know that, luckily, Locker Service restrictions have been relaxed. However, there are still some libraries that are considered unsafe and that cannot run within this context. For those cases, lightning:container comes to the rescue!

Continue reading “Lightning:container to the rescue”

Passing action handlers to child components using Aura.Action

Last week I discovered something about Lightning Components I didn’t know about: aura:action. This is an attribute type that you can use to pass actions to a child component, in addition to the other supported attribute types, and it can be specially helpful if you want to decide at component instantiation which actions should the child component perform.

Continue reading “Passing action handlers to child components using Aura.Action”

Showing a context sensitive pop-up in Classic & Lightning Experience detail pages

Last week I was exploring the options to show a context sensitive pop-up in record detail pages. The pop-up needed to use the sObject name of the record that was being visualised in the detail page. I wanted this functionality to be available in classic and Lightning Experience. So I spent some time exploring the options that we have to do this. Are Lightning Components ready to fulfil my requirements?

Continue reading “Showing a context sensitive pop-up in Classic & Lightning Experience detail pages”

Blog at WordPress.com.

Up ↑