adcutil
Version:
Utilities tools for Askia Design Control
53 lines (45 loc) • 1.76 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_radio" description="Should contains a well formatted input radio per response" cases="default_single">
<asserts>
<placeholder>
<select_nodes xPath="//input">
<assert_count is="equal" value="5"/>
<assert_has_attr name="type" value="radio"/>
<assert_has_attr name="name" value="U1"/>
<assert_match>
<![CDATA[value="[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 plus a blank one" cases="default_single">
<arrange>
<output id="default"/>
<properties>
<property id="useList">
<value>true</value>
</property>
</properties>
</arrange>
<asserts>
<placeholder>
<select_nodes xPath="//select">
<assert_exist />
<assert_has_attr name="name" value="U1"/>
</select_nodes>
<select_nodes xPath="//option">
<assert_count is="equal" value="6"/>
<assert_match>
<![CDATA[value="[0-9]*"]]>
</assert_match>
</select_nodes>
</placeholder>
</asserts>
</test>
</units>
</tests>