1/**
2 * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 import router from '@system.router';
17 import {describe, beforeAll,afterAll, it, expect} from '@ohos/hypium';
18
19
20 export default function dialogPropsJsTest() {  describe('dialogPropsJsTest', function () {
21
22     async function sleep(time) {
23         return new Promise((resolve, reject) => {
24             setTimeout(() => {
25                 resolve()
26             }, time)
27         }).then(() => {
28             console.info(`sleep ${time} over...`)
29         })
30     }
31
32     async function backToIndex() {
33         let backToIndexPromise = new Promise((resolve, reject) => {
34             setTimeout(() => {
35                 router.back({
36                     uri: 'pages/index/index'
37                 })
38                 resolve()
39             }, 500)
40         })
41         let clearPromise = new Promise((resolve, reject) => {
42             setTimeout(() => {
43                 router.clear()
44                 resolve()
45             }, 500);
46         })
47         await backToIndexPromise.then(() => {
48             return clearPromise
49         })
50     }
51
52     /**
53     * run before testcase
54     */
55     beforeAll(async function (done) {
56         console.info('[dialogPropsJsTest] before each called')
57
58         let result;
59         let options = {
60             uri: 'pages/dialog/prop/index'
61         }
62         try {
63             result = router.push(options)
64             console.info("push dialogProps page success " + JSON.stringify(result));
65         } catch (err) {
66             console.error("push dialogProps page error " + JSON.stringify(result));
67         }
68         await sleep(4000)
69         done()
70     })
71
72     /**
73     * run after testcase
74     */
75     afterAll(async function () {
76         console.info('[dialogPropsJsTest] after each called')
77         await backToIndex();
78         await sleep(1000)
79     })
80
81     // 通用属性
82
83     /**
84      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
85      * @tc.name      testdialogIdProp
86      * @tc.desc      ACE
87      */
88     it('testdialogIdProp', 0, async function (done) {
89         console.info('testdialogIdProp START');
90         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
91
92         let obj = JSON.parse(globalThis.value.idProp);
93         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
94         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
95
96         expect(obj.$type).assertEqual('dialog')
97         expect(obj.$attrs.id).assertEqual('idProp')
98         done();
99     })
100
101     /**
102      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
103      * @tc.name      testdialogClassProp
104      * @tc.desc      ACE
105      */
106     it('testdialogClassProp', 0, async function (done) {
107         console.info('testdialogClassProp START');
108         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
109
110         let obj = JSON.parse(globalThis.value.classProp);
111         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
112         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
113
114         expect(obj.$type).assertEqual('dialog')
115         expect(obj.$attrs.id).assertEqual('classProp')
116         expect(obj.$attrs.className).assertEqual('classProp')
117         done();
118     })
119
120     /**
121      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
122      * @tc.name      testdialogClassPropNone
123      * @tc.desc      ACE
124      */
125     it('testdialogClassPropNone', 0, async function (done) {
126         console.info('testdialogClassPropNone START');
127         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
128
129         let obj = JSON.parse(globalThis.value.classPropNone);
130         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
131         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
132
133         expect(obj.$type).assertEqual('dialog')
134         expect(obj.$attrs.id).assertEqual('classPropNone')
135         expect(obj.$attrs.className).assertEqual(undefined)
136         console.info("[dialogProps] get className value is: " + JSON.stringify(obj.$attrs.className));
137         done();
138     })
139
140     /**
141      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
142      * @tc.name      testdialogRefProp
143      * @tc.desc      ACE
144      */
145     it('testdialogRefProp', 0, async function (done) {
146         console.info('testdialogRefProp START');
147         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
148
149         let obj = JSON.parse(globalThis.value.refProp);
150         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
151         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
152
153         expect(obj.$type).assertEqual('dialog')
154         expect(obj.$attrs.id).assertEqual('refProp')
155         expect(obj.$attrs.ref).assertEqual('refProp')
156         done();
157     });
158
159     /**
160      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
161      * @tc.name      testdialogRefPropNone
162      * @tc.desc      ACE
163      */
164     it('testdialogRefPropNone', 0, async function (done) {
165         console.info('testdialogRefPropNone START');
166         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
167
168         let obj = JSON.parse(globalThis.value.refPropNone);
169         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
170         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
171
172         expect(obj.$type).assertEqual('dialog')
173         expect(obj.$attrs.id).assertEqual('refPropNone')
174         expect(obj.$attrs.ref).assertEqual(undefined)
175         console.info("[dialogProps] get ref value is: " + JSON.stringify(obj.$attrs.ref));
176         done();
177     });
178
179     /**
180      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
181      * @tc.name      testdialogDisabledPropTrue
182      * @tc.desc      ACE
183      */
184     it('testdialogDisabledPropTrue', 0, async function (done) {
185         console.info('testdialogDisabledPropTrue START');
186         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
187
188         let obj = JSON.parse(globalThis.value.disabledPropTrue);
189         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
190         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
191
192         expect(obj.$type).assertEqual('dialog')
193         expect(obj.$attrs.id).assertEqual('disabledPropTrue')
194         expect(obj.$attrs.disabled).assertEqual('true')
195         done();
196     });
197
198     /**
199      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
200      * @tc.name      testdialogDisabledPropFalse
201      * @tc.desc      ACE
202      */
203     it('testdialogDisabledPropFalse', 0, async function (done) {
204         console.info('testdialogDisabledPropFalse START');
205         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
206
207         let obj = JSON.parse(globalThis.value.disabledPropFalse);
208         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
209         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
210
211         expect(obj.$type).assertEqual('dialog')
212         expect(obj.$attrs.id).assertEqual('disabledPropFalse')
213         expect(obj.$attrs.disabled).assertEqual('false')
214         done();
215     });
216
217     /**
218      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
219      * @tc.name      testdialogDisabledPropNone
220      * @tc.desc      ACE
221      */
222     it('testdialogDisabledPropNone', 0, async function (done) {
223         console.info('testdialogDisabledPropNone START');
224         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
225
226         let obj = JSON.parse(globalThis.value.disabledPropNone);
227         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
228         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
229
230         expect(obj.$type).assertEqual('dialog')
231         expect(obj.$attrs.id).assertEqual('disabledPropNone')
232         expect(obj.$attrs.disabled).assertEqual('false')
233         done();
234     });
235
236     /**
237      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
238      * @tc.name      testdialogFocusablePropTrue
239      * @tc.desc      ACE
240      */
241     it('testdialogFocusablePropTrue', 0, async function (done) {
242         console.info('testdialogFocusablePropTrue START');
243         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
244
245         let obj = JSON.parse(globalThis.value.focusablePropTrue);
246         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
247         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
248
249         expect(obj.$type).assertEqual('dialog')
250         expect(obj.$attrs.id).assertEqual('focusablePropTrue')
251         expect(obj.$attrs.focusable).assertEqual('true')
252         done();
253     });
254
255     /**
256      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
257      * @tc.name      testdialogFocusablePropFalse
258      * @tc.desc      ACE
259      */
260     it('testdialogFocusablePropFalse', 0, async function (done) {
261         console.info('testdialogFocusablePropFalse START');
262         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
263
264         let obj = JSON.parse(globalThis.value.focusablePropFalse);
265         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
266         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
267
268         expect(obj.$type).assertEqual('dialog')
269         expect(obj.$attrs.id).assertEqual('focusablePropFalse')
270         expect(obj.$attrs.focusable).assertEqual('false')
271         done();
272     });
273
274     /**
275      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
276      * @tc.name      testdialogFocusablePropNone
277      * @tc.desc      ACE
278      */
279     it('testdialogFocusablePropNone', 0, async function (done) {
280         console.info('testdialogFocusablePropNone START');
281         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
282
283         let obj = JSON.parse(globalThis.value.focusablePropNone);
284         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
285         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
286
287         expect(obj.$type).assertEqual('dialog')
288         expect(obj.$attrs.id).assertEqual('focusablePropNone')
289         expect(obj.$attrs.focusable).assertEqual(undefined)
290         done();
291     });
292
293     /**
294      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
295      * @tc.name      testdialogDataProp
296      * @tc.desc      ACE
297      */
298     it('testdialogDataProp', 0, async function (done) {
299         console.info('testdialogDataProp START');
300         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
301
302         let obj = JSON.parse(globalThis.value.dataProp);
303         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
304         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
305
306         expect(obj.$type).assertEqual('dialog')
307         expect(obj.$attrs.id).assertEqual('dataProp')
308         expect(obj.$attrs.datadialog).assertEqual(undefined);
309         console.info("[dialogProps] get datadialog value is: " + JSON.stringify(obj.$attrs.datadialog));
310         done();
311     });
312
313     /**
314      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
315      * @tc.name      testdialogDataPropNone
316      * @tc.desc      ACE
317      */
318     it('testdialogDataPropNone', 0, async function (done) {
319         console.info('testdialogDataPropNone START');
320         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
321
322         let obj = JSON.parse(globalThis.value.dataPropNone);
323         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
324         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
325
326         expect(obj.$type).assertEqual('dialog')
327         expect(obj.$attrs.id).assertEqual('dataPropNone')
328         expect(obj.$attrs.datadialog).assertEqual(undefined)
329         console.info("[dialogProps] get datadialog value is: " + JSON.stringify(obj.$attrs.datadialog));
330         done();
331     });
332
333     /**
334      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
335      * @tc.name      testdialogClickEffectPropSmall
336      * @tc.desc      ACE
337      */
338     it('testdialogClickEffectPropSmall', 0, async function (done) {
339         console.info('testdialogClickEffectPropSmall START');
340         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
341
342         let obj = JSON.parse(globalThis.value.clickEffectPropSmall);
343         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
344         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
345
346         expect(obj.$type).assertEqual('dialog')
347         expect(obj.$attrs.id).assertEqual('clickEffectPropSmall')
348         expect(obj.$attrs.clickEffect).assertEqual('spring-small')
349         done();
350     });
351
352     /**
353      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
354      * @tc.name      testdialogClickEffectPropMedium
355      * @tc.desc      ACE
356      */
357     it('testdialogClickEffectPropMedium', 0, async function (done) {
358         console.info('testdialogClickEffectPropMedium START');
359         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
360
361         let obj = JSON.parse(globalThis.value.clickEffectPropMedium);
362         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
363         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
364
365         expect(obj.$type).assertEqual('dialog')
366         expect(obj.$attrs.id).assertEqual('clickEffectPropMedium')
367         expect(obj.$attrs.clickEffect).assertEqual('spring-medium')
368         done();
369     });
370
371     /**
372      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
373      * @tc.name      testdialogClickEffectPropLarge
374      * @tc.desc      ACE
375      */
376     it('testdialogClickEffectPropLarge', 0, async function (done) {
377         console.info('testdialogClickEffectPropLarge START');
378         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
379
380         let obj = JSON.parse(globalThis.value.clickEffectPropLarge);
381         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
382         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
383
384         expect(obj.$type).assertEqual('dialog')
385         expect(obj.$attrs.id).assertEqual('clickEffectPropLarge')
386         expect(obj.$attrs.clickEffect).assertEqual('spring-large')
387         done();
388     });
389
390     /**
391      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
392      * @tc.name      testdialogClickEffectPropNone
393      * @tc.desc      ACE
394      */
395     it('testdialogClickEffectPropNone', 0, async function (done) {
396         console.info('testdialogClickEffectPropNone START');
397         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
398
399         let obj = JSON.parse(globalThis.value.clickEffectPropNone);
400         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
401         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
402
403         expect(obj.$type).assertEqual('dialog')
404         expect(obj.$attrs.id).assertEqual('clickEffectPropNone')
405         expect(obj.$attrs.clickEffect).assertEqual(undefined)
406         console.info("[dialogProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect));
407         done();
408     });
409
410     /**
411      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
412      * @tc.name      testdialogDirPropRtl
413      * @tc.desc      ACE
414      */
415     it('testdialogDirPropRtl', 0, async function (done) {
416         console.info('testdialogDirPropRtl START');
417         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
418
419         let obj = JSON.parse(globalThis.value.dirPropRtl);
420         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
421         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
422
423         expect(obj.$type).assertEqual('dialog')
424         expect(obj.$attrs.id).assertEqual('dirPropRtl')
425         expect(obj.$attrs.dir).assertEqual('rtl')
426         done();
427     });
428
429     /**
430      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
431      * @tc.name      testdialogDirPropLtr
432      * @tc.desc      ACE
433      */
434     it('testdialogDirPropLtr', 0, async function (done) {
435         console.info('testdialogDirPropLtr START');
436         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
437
438         let obj = JSON.parse(globalThis.value.dirPropLtr);
439         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
440         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
441
442         expect(obj.$type).assertEqual('dialog')
443         expect(obj.$attrs.id).assertEqual('dirPropLtr')
444         expect(obj.$attrs.dir).assertEqual('ltr')
445         done();
446     });
447
448     /**
449      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
450      * @tc.name      testdialogDirPropAuto
451      * @tc.desc      ACE
452      */
453     it('testdialogDirPropAuto', 0, async function (done) {
454         console.info('testdialogDirPropAuto START');
455         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
456
457         let obj = JSON.parse(globalThis.value.dirPropAuto);
458         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
459         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
460
461         expect(obj.$type).assertEqual('dialog')
462         expect(obj.$attrs.id).assertEqual('dirPropAuto')
463         expect(obj.$attrs.dir).assertEqual('auto')
464         done();
465     });
466
467     /**
468      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
469      * @tc.name      testdialogDirPropNone
470      * @tc.desc      ACE
471      */
472     it('testdialogDirPropNone', 0, async function (done) {
473         console.info('testdialogDirPropNone START');
474         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
475
476         let obj = JSON.parse(globalThis.value.dirPropNone);
477         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
478         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
479
480         expect(obj.$type).assertEqual('dialog')
481         expect(obj.$attrs.id).assertEqual('dirPropNone')
482         expect(obj.$attrs.dir).assertEqual('auto')
483         done();
484     });
485
486     /**
487      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
488      * @tc.name      testdialogForPropNull
489      * @tc.desc      ACE
490      */
491     it('testdialogForPropNull', 0, async function (done) {
492         console.info('testdialogForPropNull START');
493         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
494
495         let obj = JSON.parse(globalThis.value.forPropNull);
496         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
497         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
498
499         expect(obj.$type).assertEqual('dialog')
500         expect(obj.$attrs.id).assertEqual('forPropNull')
501         expect(obj.$attrs.for).assertEqual(undefined)
502         console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.for));
503         done();
504     });
505
506     /**
507      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
508      * @tc.name      testdialogForPropOne
509      * @tc.desc      ACE
510      */
511     it('testdialogForPropOne', 0, async function (done) {
512         console.info('testdialogForPropOne START');
513         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
514
515         let obj = JSON.parse(globalThis.value.forPropOne);
516         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
517         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
518
519         expect(obj.$type).assertEqual('dialog')
520         expect(obj.$attrs.id).assertEqual('forPropOne')
521         expect(obj.$attrs.for).assertEqual(undefined)
522         console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.for));
523         done();
524     });
525
526     /**
527      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
528      * @tc.name      testdialogForPropThree
529      * @tc.desc      ACE
530      */
531     it('testdialogForPropThree', 0, async function (done) {
532         console.info('testdialogForPropThree START');
533         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
534
535         let obj = JSON.parse(globalThis.value.forPropThree);
536         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
537         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
538
539         expect(obj.$type).assertEqual('dialog')
540         expect(obj.$attrs.id).assertEqual('forPropThree')
541         expect(obj.$attrs.for).assertEqual(undefined)
542         console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.for));
543         done();
544     });
545
546     /**
547      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
548      * @tc.name      testdialogIfPropTrue
549      * @tc.desc      ACE
550      */
551     it('testdialogIfPropTrue', 0, async function (done) {
552         console.info('testdialogIfPropTrue START');
553         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
554
555         let obj = JSON.parse(globalThis.value.ifPropTrue);
556         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
557         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
558
559         expect(obj.$type).assertEqual('dialog')
560         expect(obj.$attrs.id).assertEqual('ifPropTrue')
561         expect(obj.$attrs.if).assertEqual(undefined)
562         console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.if));
563         done();
564     });
565
566     /**
567      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
568      * @tc.name      testdialogShowPropTrue
569      * @tc.desc      ACE
570      */
571     it('testdialogShowPropTrue', 0, async function (done) {
572         console.info('testdialogShowPropTrue START');
573         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
574
575         let obj = JSON.parse(globalThis.value.showPropTrue);
576         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
577         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
578
579         expect(obj.$type).assertEqual('dialog')
580         expect(obj.$attrs.id).assertEqual('showPropTrue')
581         expect(obj.$attrs.show).assertEqual('true')
582         console.info("[dialogProps] get show value is: " + JSON.stringify(obj.$attrs.show));
583         done();
584     });
585
586     /**
587      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
588      * @tc.name      testdialogShowPropFalse
589      * @tc.desc      ACE
590      */
591     it('testdialogShowPropFalse', 0, async function (done) {
592         console.info('testdialogShowPropFalse START');
593         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
594
595         let obj = JSON.parse(globalThis.value.showPropFalse);
596         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
597         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
598
599         expect(obj.$type).assertEqual('dialog')
600         expect(obj.$attrs.id).assertEqual('showPropFalse')
601         expect(obj.$attrs.show).assertEqual('false')
602         console.info("[dialogProps] get show value is: " + JSON.stringify(obj.$attrs.show));
603         done();
604     });
605
606     /**
607      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
608      * @tc.name      testdialogShowPropNone
609      * @tc.desc      ACE
610      */
611     it('testdialogShowPropNone', 0, async function (done) {
612         console.info('testdialogShowPropNone START');
613         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
614
615         let obj = JSON.parse(globalThis.value.showPropNone);
616         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
617         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
618
619         expect(obj.$type).assertEqual('dialog')
620         expect(obj.$attrs.id).assertEqual('showPropNone')
621         expect(obj.$attrs.show).assertEqual('true')
622         console.info("[dialogProps] get show value is: " + JSON.stringify(obj.$attrs.show));
623         done();
624     });
625
626     // 特有属性
627
628     /**
629      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
630      * @tc.name      testdialogdragableNone
631      * @tc.desc      ACE
632      */
633     it('testdialogdragableNone', 0, async function (done) {
634         console.info('testdialogdragableNone START');
635         console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
636
637         let obj = JSON.parse(globalThis.value.dragableNone);
638         console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
639         console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
640
641         expect(obj.$type).assertEqual('dialog')
642         expect(obj.$attrs.id).assertEqual('dragableNone')
643         expect(obj.$attrs.dragable).assertEqual('false')
644         console.info("[dialogProps] get dragable value is: " + JSON.stringify(obj.$attrs.dragable));
645         done();
646     });
647
648     /**
649      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
650      * @tc.name      testdialogdragableTrue
651      * @tc.desc      ACE
652      */
653      it('testdialogdragableTrue', 0, async function (done) {
654        console.info('testdialogdragableTrue START');
655        console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
656
657        let obj = JSON.parse(globalThis.value.dragableTrue);
658        console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
659        console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
660
661        expect(obj.$type).assertEqual('dialog')
662        expect(obj.$attrs.id).assertEqual('dragableTrue')
663        expect(obj.$attrs.dragable).assertEqual('true')
664        console.info("[dialogProps] get dragable value is: " + JSON.stringify(obj.$attrs.dragable));
665        done();
666    });
667
668    /**
669      * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
670      * @tc.name      testdialogdragableFalse
671      * @tc.desc      ACE
672      */
673     it('testdialogdragableFalse', 0, async function (done) {
674        console.info('testdialogdragableFalse START');
675        console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
676
677        let obj = JSON.parse(globalThis.value.dragableFalse);
678        console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj));
679        console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
680
681        expect(obj.$type).assertEqual('dialog')
682        expect(obj.$attrs.id).assertEqual('dragableFalse')
683        expect(obj.$attrs.dragable).assertEqual('false')
684        console.info("[dialogProps] get dragable value is: " + JSON.stringify(obj.$attrs.dragable));
685        done();
686    });
687 });
688}