mirror of
https://github.com/vxcontrol/ncform.git
synced 2026-07-18 16:24:27 -04:00
test(ncform): add $ncformGetValue api testcase
This commit is contained in:
committed by
Dmitry Nagibin
parent
5195b0a756
commit
0842c5c0ca
@@ -87,4 +87,11 @@ context('Others', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('$ncformGetValue api', () => {
|
||||
cy.window().then(win => {
|
||||
let formName = 'form_' + md5('$ncformGetValue api');
|
||||
expect(win.Vue.prototype.$ncformGetValue(formName)).to.deep.equal({"showField":"1","obj":{"show":"1"},"arr":[{"show":"1"}]});
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
@@ -182,12 +182,13 @@
|
||||
{
|
||||
id: md5('$ncformGetValue api'),
|
||||
title: '$ncformGetValue api',
|
||||
formName: 'form_' + Math.random(),
|
||||
formName: 'form_' + md5('$ncformGetValue api'),
|
||||
formSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
showField: {
|
||||
type: 'string',
|
||||
value: '1'
|
||||
},
|
||||
hiddenField: {
|
||||
type: 'string',
|
||||
@@ -199,7 +200,8 @@
|
||||
type: 'object',
|
||||
properties: {
|
||||
show: {
|
||||
type: 'string'
|
||||
type: 'string',
|
||||
value: '1'
|
||||
},
|
||||
hide: {
|
||||
type: 'string',
|
||||
@@ -215,7 +217,8 @@
|
||||
type: 'object',
|
||||
properties: {
|
||||
show: {
|
||||
type: 'string'
|
||||
type: 'string',
|
||||
value: '1'
|
||||
},
|
||||
hide: {
|
||||
type: 'string',
|
||||
@@ -224,7 +227,8 @@
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
value: [{show: '1', hidden: ''}]
|
||||
}
|
||||
},
|
||||
globalConfig: {
|
||||
|
||||
Reference in New Issue
Block a user