
Automate your modern web applications using Jest and Mocha with Puppeteer. Let’s start by creating a new flex plugin using the Twilio CLI. Start reading UI Testing with Puppeteer for free online and get access to. Feel free to clone the repo and use that to follow along. The full code for this article can be found in this repo. Make sure you have at least version 1.2.3-beta.0 (beta) (more details on how to check which version you are running and how to upgrade can be found here) The Flex Plugin CLI: you can install it using the instructions here.You can install it using the instructions here To follow along with this blogpost you need the following: This article aims to be an introduction to this very complex topic and provide you the tools to get started. This article will cover both snapshot testing (to check your component renders correctly) and end-to-end browser testing (to check that your component responds correctly to user interactions). This plugin will add a lot of code for keeping track of the coverage statements. You should ONLY use this plugin when you are in development mode. 2/4 Install babel-plugin-istanbul and add it to your Babel config. In the spirit of good modern software development practice, the more you automate your frontend testing, the better. npm install -D jest-puppeteer-istanbul Configure 1/4 Make sure that you have Jest and Babel installed and configured. It can seriously impact your development process. Manual frontend testing is very tedious, error prone and an outdated approach.

In this article we will see how to automate testing of your Flex plugin. Installing Puppeteer, Jest, and Jest-Puppeteer Installing all three packages is as simple as running the npm install command: npm install puppeteer jest jest-puppeteer -save-dev If you do not already have a package.json file, create it by running this command: npm init Now that we have our libraries installed, let's configure them both.
