forked from getodk/collect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New cases with repeat group (getodk#3603)
* Added test for the case when page behind a repeat group with a regular group inside is visible * Added test for breadcrumb path on hierarchy view * Added test for dynamic group label
- Loading branch information
1 parent
edb3d8c
commit e20bdb5
Showing
3 changed files
with
294 additions
and
1 deletion.
There are no files selected for viewing
138 changes: 138 additions & 0 deletions
138
collect_app/src/androidTest/assets/forms/RepeatTitles_1648.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa"> | ||
<h:head> | ||
<h:title>Repeat titles 1648</h:title> | ||
<model> | ||
<instance> | ||
<data id="build_1648_1511357420"> | ||
<meta> | ||
<instanceID/> | ||
</meta> | ||
<Text/> | ||
<gr1> | ||
<gr2> | ||
<name/> | ||
<age/> | ||
<photo/> | ||
</gr2> | ||
</gr1> | ||
<part1> | ||
<part2> | ||
<partText/> | ||
<date/> | ||
<multi/> | ||
</part2> | ||
</part1> | ||
</data> | ||
</instance> | ||
<itext> | ||
<translation lang="English"> | ||
<text id="/data/Text:label"> | ||
<value>Text</value> | ||
</text> | ||
<text id="/data/gr1:label"> | ||
<value>gr1</value> | ||
</text> | ||
<text id="/data/gr1/gr2:label"> | ||
<value>gr2</value> | ||
</text> | ||
<text id="/data/gr1/gr2/name:label"> | ||
<value>Name</value> | ||
</text> | ||
<text id="/data/gr1/gr2/age:label"> | ||
<value>Age</value> | ||
</text> | ||
<text id="/data/gr1/gr2/photo:label"> | ||
<value>Photo</value> | ||
</text> | ||
<text id="/data/part1:label"> | ||
<value>Part1</value> | ||
</text> | ||
<text id="/data/part1/part2:label"> | ||
<value>Part2</value> | ||
</text> | ||
<text id="/data/part1/part2/partText:label"> | ||
<value>Part text</value> | ||
</text> | ||
<text id="/data/part1/part2/date:label"> | ||
<value>Date</value> | ||
</text> | ||
<text id="/data/part1/part2/multi:label"> | ||
<value>Multi Select</value> | ||
</text> | ||
<text id="/data/part1/part2/multi:hint"> | ||
<value></value> | ||
</text> | ||
<text id="/data/part1/part2/multi:option0"> | ||
<value>a</value> | ||
</text> | ||
<text id="/data/part1/part2/multi:option1"> | ||
<value>b</value> | ||
</text> | ||
<text id="/data/part1/part2/multi:option2"> | ||
<value>c</value> | ||
</text> | ||
</translation> | ||
</itext> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" calculate="concat('uuid:', uuid())"/> | ||
<bind nodeset="/data/Text" type="string"/> | ||
<bind nodeset="/data/gr1/gr2/name" type="string"/> | ||
<bind nodeset="/data/gr1/gr2/age" type="int"/> | ||
<bind nodeset="/data/gr1/gr2/photo" type="binary"/> | ||
<bind nodeset="/data/part1/part2/partText" type="string"/> | ||
<bind nodeset="/data/part1/part2/date" type="date"/> | ||
<bind nodeset="/data/part1/part2/multi" type="select"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<input ref="/data/Text"> | ||
<label ref="jr:itext('/data/Text:label')"/> | ||
</input> | ||
<group> | ||
<label ref="jr:itext('/data/gr1:label')"/> | ||
<repeat nodeset="/data/gr1"> | ||
<group ref="/data/gr1/gr2"> | ||
<label> Person: <output value="/data/gr1/gr2/age"/></label> | ||
<input ref="/data/gr1/gr2/name"> | ||
<label ref="jr:itext('/data/gr1/gr2/name:label')"/> | ||
</input> | ||
<input ref="/data/gr1/gr2/age"> | ||
<label ref="jr:itext('/data/gr1/gr2/age:label')"/> | ||
</input> | ||
<upload ref="/data/gr1/gr2/photo" mediatype="image/*"> | ||
<label ref="jr:itext('/data/gr1/gr2/photo:label')"/> | ||
</upload> | ||
</group> | ||
</repeat> | ||
</group> | ||
<group> | ||
<label ref="jr:itext('/data/part1:label')"/> | ||
<repeat nodeset="/data/part1"> | ||
<group ref="/data/part1/part2"> | ||
<label> Xxx: <output value="/data/part1/part2/partText"/></label> | ||
<input ref="/data/part1/part2/partText"> | ||
<label ref="jr:itext('/data/part1/part2/partText:label')"/> | ||
</input> | ||
<input ref="/data/part1/part2/date"> | ||
<label ref="jr:itext('/data/part1/part2/date:label')"/> | ||
</input> | ||
<select ref="/data/part1/part2/multi"> | ||
<label ref="jr:itext('/data/part1/part2/multi:label')"/> | ||
<hint ref="jr:itext('/data/part1/part2/multi:hint')"/> | ||
<item> | ||
<label ref="jr:itext('/data/part1/part2/multi:option0')"/> | ||
<value>a</value> | ||
</item> | ||
<item> | ||
<label ref="jr:itext('/data/part1/part2/multi:option1')"/> | ||
<value>b</value> | ||
</item> | ||
<item> | ||
<label ref="jr:itext('/data/part1/part2/multi:option2')"/> | ||
<value>c</value> | ||
</item> | ||
</select> | ||
</group> | ||
</repeat> | ||
</group> | ||
</h:body> | ||
</h:html> |
51 changes: 51 additions & 0 deletions
51
collect_app/src/androidTest/assets/forms/repeat_group_new.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa"> | ||
<h:head> | ||
<h:title>RepeatGroupNew</h:title> | ||
<model> | ||
<instance> | ||
<data id="build_Untitled-Form_150757354889"> | ||
<meta> | ||
<instanceID/> | ||
</meta> | ||
<RepeatGroup jr:template=""> | ||
<Name/> | ||
<Age/> | ||
</RepeatGroup> | ||
</data> | ||
</instance> | ||
<itext> | ||
<translation lang="English"> | ||
<text id="/data/RepeatGroup:label"> | ||
<value>RepeatGroup</value> | ||
</text> | ||
<text id="/data/RepeatGroup/Name:label"> | ||
<value>Name</value> | ||
</text> | ||
<text id="/data/RepeatGroup/Age:label"> | ||
<value>Age</value> | ||
</text> | ||
</translation> | ||
</itext> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" calculate="concat('uuid:', uuid())"/> | ||
<bind nodeset="/data/RepeatGroup/Name" type="string"/> | ||
<bind nodeset="/data/RepeatGroup/Age" type="int"/> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<group> | ||
<label>People</label> | ||
<repeat nodeset="/data/RepeatGroup"> | ||
<group> | ||
<label>Person: <output value="/data/RepeatGroup/Name"/></label> | ||
<input ref="/data/RepeatGroup/Name"> | ||
<label ref="jr:itext('/data/RepeatGroup/Name:label')"/> | ||
</input> | ||
<input ref="/data/RepeatGroup/Age"> | ||
<label ref="jr:itext('/data/RepeatGroup/Age:label')"/> | ||
</input> | ||
</group> | ||
</repeat> | ||
</group> | ||
|
||
</h:body> | ||
</h:html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters