Class: TestUtils

TestUtils()

new TestUtils()

Properties:
Name Type Description
targetComponent ElementHandle
page Page
Source:

Methods

(async) clearEventList()

clears the collected events in the browser
Source:

(async) find(path, container)

Parameters:
Name Type Description
path string deeq query selector formatted path
container ElementHandle
Source:

(async) getAttribute(name, target)

Returns value of a remote element's attribute
Parameters:
Name Type Description
name string
target ElementHandle
Source:
Returns:
Promise

(async) getEventList()

Source:
Returns:
Promise>

(async) getLastEvent()

Source:
Returns:
SerializedRemoteEvent

(async) getProperty(property, targetopt)

Returns the value of a property on the remote target
Parameters:
Name Type Attributes Description
property string
target ElementHandle <optional>
defaults to current tested component
Source:
Returns:
any|JSHandle

(async) getTextContent(target)

Parameters:
Name Type Description
target ElementHandle
Source:
Returns:
Promise

(async) hasAttribute(name, target)

Parameters:
Name Type Description
name string
target ElementHandle
Source:
Returns:
Promise

(async) initialize(page)

Initializes the showroom test-utils with a puppeteer page instance
Parameters:
Name Type Description
page Page
Source:

(async) isVisible(target)

Parameters:
Name Type Description
target ElementHandle
Source:
Returns:
boolean;

(async) removeAttribute(name, target)

Parameters:
Name Type Description
name string
target ElementHandle
Source:

(async) setProperty(property, value, targetopt)

Sets a property on a remote target
Parameters:
Name Type Attributes Description
property string
value any
target ElementHandle <optional>
defaults to current tested component
Source:

(async) setTestSubject(componentName)

Selects a component to be tested
Parameters:
Name Type Description
componentName string
Source:
Returns:
ElementHandle

(async) testSubject()

Source:
Returns:
ElementHandle

(async) trigger(fnName)

Executes predefined function on a showroom descriptor file for the current tested component
Parameters:
Name Type Description
fnName string
Source:

(async) validateHTML(target)

Tests HTML validity of a remote element
Parameters:
Name Type Description
target ElementHandle HTML as string
Source:
Throws:
When validation fails
Type
Error