Book Image

Enterprise React Development with UmiJS

By : Douglas Alves Venancio
Book Image

Enterprise React Development with UmiJS

By: Douglas Alves Venancio

Overview of this book

UmiJS is the Ant Group's underlying frontend development framework, an open source project for developing enterprise-class frontend applications. In this book, you'll get hands-on with single-page application development using UmiJS. By following practical step-by-step examples, you'll develop essential skills to build and publish your apps and create a modern user experience with responsive interfaces. This book will help you learn the essential features of UmiJS and how to set up and build a project from scratch using React, Less, and TypeScript. You'll study Ant Design, a framework based on solid design concepts that provides a series of React components to accelerate interface development. Along the way, you'll see how to make requests and develop the frontend using simulated data while ensuring that your app has a high level of security and feedback. You'll also discover ways to improve your code quality and readability using formatting tools. By the end of the book, you'll have learned how to use UmiJS to design user interfaces, as well as compile, test, and package your app locally, and deliver your app by deploying it to online services.
Table of Contents (11 chapters)
1
Part 1: Configuring UmiJS and Creating User Interfaces
5
Part 2: Protecting, Testing, and Deploying Web Applications

Testing interfaces with Puppeteer

In this section, you'll learn how to write integration and end-to-end tests using Puppeteer and the Headless Chrome browser.

Puppeteer is a Node library to control the Chrome, Chromium, or Firefox browser over the DevTools protocol (or remote protocol for Firefox), which makes it an excellent tool for simulating real scenarios during tests.

When we launch a new browser instance, Puppeteer will default to using Chrome's headless mode. Chrome's headless mode only includes the browser engine, with no user interface. Puppeteer uses the Chrome DevTools protocol to control the browser.

With Puppeteer, we can take screenshots of the page, test responsiveness by simulating numerous mobile devices, such as tablets and smartphones, and more.

You can learn more about Puppeteer on the document page available at https://developers.google.com/web/tools/puppeteer.

We'll write an integration test and an end-to-end test to demonstrate...