Test select
Example#
Code-example#
<measmatic-card highlight-header>
<measmatic-test-select data-id=control1Id1></measmatic-test-select>
<measmatic-test-select data-id=control1Id2></measmatic-test-select>
<measmatic-test-select data-id=control1Id3 pass=true></measmatic-test-select>
<measmatic-test-select data-id=control1Id4 pass=false></measmatic-test-select>
<measmatic-test-select data-id=control1Id5 disabled></measmatic-test-select>
</measmatic-card>
Description#
This custom-element creates a control to select a test and executes all child tests within when the selected has passed/failed.
The selectable values are read from window.testList.testList. Update the list by calling TestListUpdated(testList).
Usage#
Attributes#
Necessary#
<measmatic-test-select data-id='control1Id'>
Optional#
<measmatic-test-select data-id='control1Id' pass="false">
pass="false" will set the default of the select-element to fails
<measmatic-test-select data-id='control1Id' disabled>
disabled disables both select-elements. The attribute can be added or removed at any time.
Properties of interest
testNamegets name of the selected testtestGuidgets guid of the selected testtestPassgets/sets if the selected test should pass or fail to execute subteststestObjectgets/sets Object containingtestNameandtestGuidof selected testdisabledgets/sets if the select-elements are disabled
Export
- exports
testName,testGuidandtestPass