Book Image

Accelerating Angular Development with Ivy

By : Lars Gyrup Brink Nielsen, Mateus Carniatto, Jacob Andresen
Book Image

Accelerating Angular Development with Ivy

By: Lars Gyrup Brink Nielsen, Mateus Carniatto, Jacob Andresen

Overview of this book

Angular Ivy is the latest rendering engine and compiler introduced in Angular. Ivy helps frontend developers to make their Angular applications faster, better optimized, and more robust. This easy-to-follow guide will help you get to grips with the new features of Angular Ivy and show you how to migrate your Angular apps from View Engine to Ivy. You'll begin by learning about the most popular features of Angular Ivy with the help of simple stand-alone examples and realize its capabilities by working on a real-world application project. You'll then discover strategies to improve your developer workflow through new debugging APIs, testing APIs, and configurations that support higher code quality and productive development features. Throughout the book, you'll explore essential components of Angular, such as Angular Component Dev Kit (CDK), Ahead-of-time (AOT) compilation, and Angular command line interface (CLI). Finally, you'll gain a clear understanding of these components along with Angular Ivy which will help you update your Angular applications with modern features. By the end of this Angular Ivy book, you will learn about the core features of Angular Ivy, discover how to migrate your Angular View Engine application, and find out how to set up a high-quality Angular Ivy project.
Table of Contents (14 chapters)

Chapter 7: Component Harnesses

Testing is a fundamental part of software development. It helps ensure that the code that's delivered covers the feature requirements and is free of implementation issues. Sometimes, when testing UI code, it is hard to avoid performing tightly coupled tests on the DOM structure. However, Angular Ivy brings a new solution for this. Component testing harnesses make it possible to develop a testing API for our components using the industry-standard Page Object pattern, but on a more granular level.

To top this off, component harnesses for the Angular Material directives and components are already included in Angular Ivy. In this chapter, we will learn how to use the component testing harnesses in Angular Components and how to implement custom component harnesses to make it easier to test our components.

We will cover the following topics in this chapter:

  • Using Angular Material's component harnesses
  • Creating a component harness...