@temporg/ui-testable

A UI component test utility made by Rock Content

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@temporg/ui-testable
99.10.03 years ago3 years agoMinified + gzip package size for @temporg/ui-testable in KB

Readme

---

category: packages

ui-testable

!npmnpmnpm-url  !build-statusbuild-statusbuild-status-url  !MIT Licenselicense-badgeLICENSE  !Code of Conductcoc-badgecoc
A decorator that adds a data- attribute to the React component root node to make it easier to test.
NOTE: by default, when NODEENV==='production' the data- attributes will not be appended (since they are specifically there for testing and appending them takes a non-trivial amount of time at runtime, slowing things down for your actual users). If you would like the data-cid attributes on elements even in your production builds (like if you are using them in your e2e builds or something), you need to set the environment variable:
ALWAYS_APPEND_UI_TESTABLE_LOCATORS=1

Installation

yarn add @temporg/ui-testable