This directory contains utility functions and infrastructure for TypeScript tests that that make use of Puppeteer. Puppeteer is a Node.js library that provides an API to instantiate and control a headless Chromium browser. Most things that can be done manually in the browser can be done using Puppeteer.
Examples of tests that make use of Puppeteer might include:
Screenshot-grabbing tests. In the case of lit-html components, such a test might perform the following steps:
Integration tests. For example:
The recommended naming scheme for screenshots is <application>_<component-name-sk>_<scenario>
. This is to avoid name collisions and to be consistent with existing tests.
For example, tests for Gold's dots-sk
component are named as follows:
gold_dots-sk
(default view).gold_dots-sk_highlighted
(mouse over).