@shellygo/cypress-test-utils - v4.1.3 / Modules / CypressReactComponentHelper
Class: CypressReactComponentHelper
Classdes
CypressReactComponentHelper exposes the following public properties:
Table of contents
Constructors
Properties
Constructors
constructor
• new CypressReactComponentHelper()
Properties
get
• get: Object
enables getting the mounted component
Type declaration
Name | Type |
---|---|
component |
() => ReactNode |
component: () => ReactNode
Get mounted component
when
• when: Object
enables mounting of a React component
Type declaration
Name | Type |
---|---|
mount |
( |
mountComponent |
(component : ReactNode ) => void |
mount:
(type
: string
\| T
, props?
: null
\| Attributes
& P
, ...children
: ReactNode
[]) => void
Mount a react component
Example
mountComponent: (component
: ReactNode
) => void
Mount a react component
Example