new Test()
Creates instance of test.
- Source:
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. |
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.
Returns:
Number of step usage.
- Type
- number
-
add(step)
-
Adds step to test case.
Parameters:
Name Type Description step
Step Added step.
-
clone()
-
Clones test case.
Returns:
New instance of test with the same parameters.
- Type
- Test
-
commit()
-
Commits test case and flushes changes state.
-
mayAdd(step)
-
Detects whether it's possible to add step to test case or no.
Parameters:
Name Type Description step
Step Step to check.
Returns:
true
if it's possible,false
otherwise.- Type
- boolean