adcutil
Version:
Utilities tools for Askia Design Control
51 lines (43 loc) • 1.68 kB
text/xml
<tests xmlns="http://www.askia.com/ADCUnitTestSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.askia.com/ADCUnitTestSchema http://www.askia.com/Downloads/dev/schemas/adc2.0/UnitTests.xsd">
<units>
<test id="contains_checkboxes" description="Should contains a well formatted input checkbox per response" cases="default_multiple">
<asserts>
<placeholder>
<select_nodes xPath="//input">
<assert_count is="equal" value="5"/>
<assert_has_attr name="type" value="checkbox"/>
<assert_match>
<![CDATA[name="M1 [0-9]+"]]>
</assert_match>
</select_nodes>
</placeholder>
</asserts>
</test>
<test id="contains_select_options" description="When useList=true, should contains <select> with one <option> per response" cases="default_multiple">
<arrange>
<properties>
<property id="useList">
<value>true</value>
</property>
</properties>
</arrange>
<asserts>
<placeholder>
<select_nodes xPath="//select">
<assert_exist />
<assert_has_attr name="name" value="L1"/>
</select_nodes>
<select_nodes xPath="//option">
<assert_count is="equal" value="5"/>
<assert_match>
<![CDATA[value="[0-9]+"]]>
</assert_match>
</select_nodes>
</placeholder>
</asserts>
</test>
</units>
</tests>