Class: Test

Test

Test case data structure which contains its current state and steps.


new Test()

Creates instance of test.

Properties:
Name Type Argument Default Description
isChanged boolean <optional>
false

Flag whether test case is changed, for example, after step addition.

state object <optional>
{}

Current test case state.

steps Array.<Step> <optional>
[]

Test case steps.

incomplete Array.<string> <optional>
[]

Test case incompletenesses.

Source:

Methods


_amount(step)

Calculates number of step usage in test case.

Parameters:
Name Type Description
step Step

Step which usage is calculated in test case.

Source:
Returns:

Number of step usage.

Type
number

add(step)

Adds step to test case.

Parameters:
Name Type Description
step Step

Added step.

Source:

clone()

Clones test case.

Source:
Returns:

New instance of test with the same parameters.

Type
Test

commit()

Commits test case and flushes changes state.

Source:

mayAdd(step)

Detects whether it's possible to add step to test case or no.

Parameters:
Name Type Description
step Step

Step to check.

Source:
Returns:

true if it's possible, false otherwise.

Type
boolean