Skip to content

Commit

Permalink
增加对于control.xlib中控件的单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Jul 31, 2024
1 parent 494140e commit 3d099e1
Show file tree
Hide file tree
Showing 9 changed files with 2,591 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<view bizObjName="NopAuthDept" x:schema="/nop/schema/xui/xview.xdef" xmlns:x="/nop/schema/xdsl.xdef" xmlns:xui="xui">
<objMeta>/nop/auth/model/NopAuthDept/NopAuthDept.xmeta</objMeta>

<x:gen-extends>
<view>
<forms>
<form id="editControls">
<c:script>
const layout = _dsl_root.selectOne(xpath `forms/*[@id=='editControls']/layout`);
const controls = layout.contentText().$stripedSplit('\n');
</c:script>
<cells>
<c:for var="control" items="${controls}">
<cell id="${control}" custom="true" domain="${control}" label="${control}Label" >

</cell>
</c:for>
</cells>
</form>
</forms>
</view>
</x:gen-extends>

<forms>
<form id="editControls" submitText="@empty" editMode="edit">
<layout>
tree-parent
double
decimal
short
byte
int
long
email
url
ascii
asciiNum
path
phone
telephone
date
datetime
timestamp
list-stelect
radios
enum
labelProp
textarea
html
longtext
reamark
tag-list
image
file
file-list
images
string-array
deptId
boolean
boolFlag
pre
string
roleId
userId
password
hidden
xml
xpl
select
</layout>
</form>

<form id="viewControls" editMode="view" x:prototype="editControls">

</form>

<form id="queryControls" editMode="query" x:prototype="editControls">

</form>
</forms>

<pages>
<simple name="edit" form="editControls">

</simple>

<simple name="view" form="viewControls">

</simple>

<simple name="query" form="queryControls">

</simple>
</pages>
</view>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x:gen-extends: |
<web:GenPage view="TestWebControl.view.xml" page="edit" xpl:lib="/nop/web/xlib/web.xlib" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x:gen-extends: |
<web:GenPage view="TestWebControl.view.xml" page="query" xpl:lib="/nop/web/xlib/web.xlib" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x:gen-extends: |
<web:GenPage view="TestWebControl.view.xml" page="view" xpl:lib="/nop/web/xlib/web.xlib" />
Loading

0 comments on commit 3d099e1

Please sign in to comment.