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
16import router from '@system.router';
17import {describe, beforeAll,afterAll, it, expect} from '@ohos/hypium';
18
19
20export default function undo() {  describe('toolbarPropsJsTest7', function () {
21
22    var name = 'toolbar', nameA = 'Toolbar';
23
24    async function sleep(time) {
25        return new Promise((resolve, reject) => {
26            setTimeout(() => {
27                resolve()
28            }, time)
29        }).then(() => {
30            console.info(`sleep ${time} over...`)
31        })
32    }
33
34    async function backToIndex() {
35        let backToIndexPromise = new Promise((resolve, reject) => {
36            setTimeout(() => {
37                router.back({
38                    uri: 'pages/index/index'
39                });
40                resolve();
41            }, 500);
42        });
43        let clearPromise = new Promise((resolve, reject) => {
44            setTimeout(() => {
45                router.clear();
46                resolve();
47            }, 500);
48        });
49        await backToIndexPromise.then(() => {
50            return clearPromise;
51        });
52    }
53
54    /**
55    * run before testcase
56    */
57    beforeAll(async function (done) {
58        console.info('['+name+'PropsJsTest] before each called')
59
60        let result;
61        let options = {
62            uri: 'pages/'+name+'/prop/index'
63        }
64        try {
65            result = router.push(options)
66            console.info("push "+name+"Props page success " + JSON.stringify(result));
67        } catch (err) {
68            console.error("push "+name+"Props page error " + JSON.stringify(result));
69        }
70        await sleep(4000)
71        done()
72    });
73
74    /**
75    * run after testcase
76    */
77    afterAll(async function () {
78        console.info('['+name+'PropsJsTest] after each called')
79        await backToIndex()
80        await sleep(1000)
81    });
82
83    /**
84     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
85     * @tc.name      testToolbarIdProp
86     * @tc.desc      ACE
87     */
88    it('test'+nameA+'IdProp', 0, async function (done) {
89        console.info('test'+nameA+'IdProp START');
90        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
91
92        let obj = JSON.parse(globalThis.value.idProp);
93        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
94        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
95
96        expect(obj.$type).assertEqual(name)
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      testToolbarClassProp
104     * @tc.desc      ACE
105     */
106    it('test'+nameA+'ClassProp', 0, async function (done) {
107        console.info('test'+nameA+'ClassProp START');
108        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
109
110        let obj = JSON.parse(globalThis.value.classProp);
111        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
112        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
113
114        expect(obj.$type).assertEqual(name)
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      testToolbarClassPropNone
123     * @tc.desc      ACE
124     */
125    it('test'+nameA+'ClassPropNone', 0, async function (done) {
126        console.info('test'+nameA+'ClassPropNone START');
127        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
128
129        let obj = JSON.parse(globalThis.value.classPropNone);
130        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
131        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
132
133        expect(obj.$type).assertEqual(name)
134        expect(obj.$attrs.id).assertEqual('classPropNone')
135        expect(obj.$attrs.className).assertEqual(undefined)
136        console.info("["+name+"Props] 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      testToolbarRefProp
143     * @tc.desc      ACE
144     */
145    it('test'+nameA+'RefProp', 0, async function (done) {
146        console.info('test'+nameA+'RefProp START');
147        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
148
149        let obj = JSON.parse(globalThis.value.refProp);
150        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
151        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
152
153        expect(obj.$type).assertEqual(name)
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      testToolbarRefPropNone
162     * @tc.desc      ACE
163     */
164    it('test'+nameA+'RefPropNone', 0, async function (done) {
165        console.info('test'+nameA+'RefPropNone START');
166        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
167
168        let obj = JSON.parse(globalThis.value.refPropNone);
169        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
170        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
171
172        expect(obj.$type).assertEqual(name)
173        expect(obj.$attrs.id).assertEqual('refPropNone')
174        expect(obj.$attrs.ref).assertEqual(undefined)
175        console.info("["+name+"Props] 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      testToolbarDisabledPropTrue
182     * @tc.desc      ACE
183     */
184    it('test'+nameA+'DisabledPropTrue', 0, async function (done) {
185        console.info('test'+nameA+'DisabledPropTrue START');
186        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
187
188        let obj = JSON.parse(globalThis.value.disabledPropTrue);
189        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
190        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
191
192        expect(obj.$type).assertEqual(name)
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      testToolbarDisabledPropFalse
201     * @tc.desc      ACE
202     */
203    it('test'+nameA+'DisabledPropFalse', 0, async function (done) {
204        console.info('test'+nameA+'DisabledPropFalse START');
205        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
206
207        let obj = JSON.parse(globalThis.value.disabledPropFalse);
208        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
209        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
210
211        expect(obj.$type).assertEqual(name)
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      testToolbarDisabledPropNone
220     * @tc.desc      ACE
221     */
222    it('test'+nameA+'DisabledPropNone', 0, async function (done) {
223        console.info('test'+nameA+'DisabledPropNone START');
224        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
225
226        let obj = JSON.parse(globalThis.value.disabledPropNone);
227        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
228        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
229
230        expect(obj.$type).assertEqual(name)
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      testToolbarFocusablePropTrue
239     * @tc.desc      ACE
240     */
241    it('test'+nameA+'FocusablePropTrue', 0, async function (done) {
242        console.info('test'+nameA+'FocusablePropTrue START');
243        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
244
245        let obj = JSON.parse(globalThis.value.focusablePropTrue);
246        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
247        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
248
249        expect(obj.$type).assertEqual(name)
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      testToolbarFocusablePropFalse
258     * @tc.desc      ACE
259     */
260    it('test'+nameA+'FocusablePropFalse', 0, async function (done) {
261        console.info('test'+nameA+'FocusablePropFalse START');
262        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
263
264        let obj = JSON.parse(globalThis.value.focusablePropFalse);
265        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
266        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
267
268        expect(obj.$type).assertEqual(name)
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      testToolbarFocusablePropNone
277     * @tc.desc      ACE
278     */
279    it('test'+nameA+'FocusablePropNone', 0, async function (done) {
280        console.info('test'+nameA+'FocusablePropNone START');
281        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
282
283        let obj = JSON.parse(globalThis.value.focusablePropNone);
284        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
285        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
286
287        expect(obj.$type).assertEqual(name)
288        expect(obj.$attrs.id).assertEqual('focusablePropNone')
289        expect(obj.$attrs.focusable).assertEqual('false')
290        done();
291    });
292
293    /**
294     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
295     * @tc.name      testToolbarDataProp
296     * @tc.desc      ACE
297     */
298    it('test'+nameA+'DataProp', 0, async function (done) {
299        console.info('test'+nameA+'DataProp START');
300        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
301
302        let obj = JSON.parse(globalThis.value.dataProp);
303        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
304        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
305
306        expect(obj.$type).assertEqual(name)
307        expect(obj.$attrs.id).assertEqual('dataProp')
308        expect(obj.$attrs.dataDiv).assertEqual(undefined);
309        console.info("["+name+"Props] get dataDiv value is: " + JSON.stringify(obj.$attrs.dataDiv));
310        done();
311    });
312
313    /**
314     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
315     * @tc.name      testToolbarDataPropNone
316     * @tc.desc      ACE
317     */
318    it('test'+nameA+'DataPropNone', 0, async function (done) {
319        console.info('test'+nameA+'DataPropNone START');
320        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
321
322        let obj = JSON.parse(globalThis.value.dataPropNone);
323        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
324        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
325
326        expect(obj.$type).assertEqual(name)
327        expect(obj.$attrs.id).assertEqual('dataPropNone')
328        expect(obj.$attrs.dataDiv).assertEqual(undefined)
329        console.info("["+name+"Props] get dataDiv value is: " + JSON.stringify(obj.$attrs.dataDiv));
330        done();
331    });
332
333    /**
334     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
335     * @tc.name      testToolbarClickEffectPropSmall
336     * @tc.desc      ACE
337     */
338    it('test'+nameA+'ClickEffectPropSmall', 0, async function (done) {
339        console.info('test'+nameA+'ClickEffectPropSmall START');
340        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
341
342        let obj = JSON.parse(globalThis.value.clickEffectPropSmall);
343        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
344        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
345
346        expect(obj.$type).assertEqual(name)
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      testToolbarClickEffectPropMedium
355     * @tc.desc      ACE
356     */
357    it('test'+nameA+'ClickEffectPropMedium', 0, async function (done) {
358        console.info('test'+nameA+'ClickEffectPropMedium START');
359        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
360
361        let obj = JSON.parse(globalThis.value.clickEffectPropMedium);
362        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
363        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
364
365        expect(obj.$type).assertEqual(name)
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      testToolbarClickEffectPropLarge
374     * @tc.desc      ACE
375     */
376    it('test'+nameA+'ClickEffectPropLarge', 0, async function (done) {
377        console.info('test'+nameA+'ClickEffectPropLarge START');
378        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
379
380        let obj = JSON.parse(globalThis.value.clickEffectPropLarge);
381        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
382        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
383
384        expect(obj.$type).assertEqual(name)
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      testToolbarClickEffectPropNone
393     * @tc.desc      ACE
394     */
395    it('test'+nameA+'ClickEffectPropNone', 0, async function (done) {
396        console.info('test'+nameA+'ClickEffectPropNone START');
397        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
398
399        let obj = JSON.parse(globalThis.value.clickEffectPropNone);
400        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
401        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
402
403        expect(obj.$type).assertEqual(name)
404        expect(obj.$attrs.id).assertEqual('clickEffectPropNone')
405        expect(obj.$attrs.clickEffect).assertEqual(undefined)
406        console.info("["+name+"Props] 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      testToolbarDirPropRtl
413     * @tc.desc      ACE
414     */
415    it('test'+nameA+'DirPropRtl', 0, async function (done) {
416        console.info('test'+nameA+'DirPropRtl START');
417        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
418
419        let obj = JSON.parse(globalThis.value.dirPropRtl);
420        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
421        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
422
423        expect(obj.$type).assertEqual(name)
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      testToolbarDirPropLtr
432     * @tc.desc      ACE
433     */
434    it('test'+nameA+'DirPropLtr', 0, async function (done) {
435        console.info('test'+nameA+'DirPropLtr START');
436        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
437
438        let obj = JSON.parse(globalThis.value.dirPropLtr);
439        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
440        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
441
442        expect(obj.$type).assertEqual(name)
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      testToolbarDirPropAuto
451     * @tc.desc      ACE
452     */
453    it('test'+nameA+'DirPropAuto', 0, async function (done) {
454        console.info('test'+nameA+'DirPropAuto START');
455        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
456
457        let obj = JSON.parse(globalThis.value.dirPropAuto);
458        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
459        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
460
461        expect(obj.$type).assertEqual(name)
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      testToolbarDirPropNone
470     * @tc.desc      ACE
471     */
472    it('test'+nameA+'DirPropNone', 0, async function (done) {
473        console.info('test'+nameA+'DirPropNone START');
474        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
475
476        let obj = JSON.parse(globalThis.value.dirPropNone);
477        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
478        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
479
480        expect(obj.$type).assertEqual(name)
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      testToolbarForPropNull
489     * @tc.desc      ACE
490     */
491    it('test'+nameA+'ForPropNull', 0, async function (done) {
492        console.info('test'+nameA+'ForPropNull START');
493        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
494
495        let obj = JSON.parse(globalThis.value.forPropNull);
496        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
497        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
498
499        expect(obj.$type).assertEqual(name)
500        expect(obj.$attrs.id).assertEqual('forPropNull')
501        expect(obj.$attrs.for).assertEqual(undefined)
502        console.info("["+name+"Props] 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      testToolbarForPropOne
509     * @tc.desc      ACE
510     */
511    it('test'+nameA+'ForPropOne', 0, async function (done) {
512        console.info('test'+nameA+'ForPropOne START');
513        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
514
515        let obj = JSON.parse(globalThis.value.forPropOne);
516        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
517        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
518
519        expect(obj.$type).assertEqual(name)
520        expect(obj.$attrs.id).assertEqual('forPropOne')
521        expect(obj.$attrs.for).assertEqual(undefined)
522        console.info("["+name+"Props] 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      testToolbarForPropThree
529     * @tc.desc      ACE
530     */
531    it('test'+nameA+'ForPropThree', 0, async function (done) {
532        console.info('test'+nameA+'ForPropThree START');
533        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
534
535        let obj = JSON.parse(globalThis.value.forPropThree);
536        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
537        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
538
539        expect(obj.$type).assertEqual(name)
540        expect(obj.$attrs.id).assertEqual('forPropThree')
541        expect(obj.$attrs.for).assertEqual(undefined)
542        console.info("["+name+"Props] 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      testToolbarIfPropTrue
549     * @tc.desc      ACE
550     */
551    it('test'+nameA+'IfPropTrue', 0, async function (done) {
552        console.info('test'+nameA+'IfPropTrue START');
553        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
554
555        let obj = JSON.parse(globalThis.value.ifPropTrue);
556        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
557        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
558
559        expect(obj.$type).assertEqual(name)
560        expect(obj.$attrs.id).assertEqual('ifPropTrue')
561        expect(obj.$attrs.if).assertEqual(undefined)
562        console.info("["+name+"Props] 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      testToolbarShowPropTrue
569     * @tc.desc      ACE
570     */
571    it('test'+nameA+'ShowPropTrue', 0, async function (done) {
572        console.info('test'+nameA+'ShowPropTrue START');
573        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
574
575        let obj = JSON.parse(globalThis.value.showPropTrue);
576        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
577        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
578
579        expect(obj.$type).assertEqual(name)
580        expect(obj.$attrs.id).assertEqual('showPropTrue')
581        expect(obj.$attrs.show).assertEqual('true')
582        console.info("["+name+"Props] 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      testToolbarShowPropFalse
589     * @tc.desc      ACE
590     */
591    it('test'+nameA+'ShowPropFalse', 0, async function (done) {
592        console.info('test'+nameA+'ShowPropFalse START');
593        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
594
595        let obj = JSON.parse(globalThis.value.showPropFalse);
596        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
597        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
598
599        expect(obj.$type).assertEqual(name)
600        expect(obj.$attrs.id).assertEqual('showPropFalse')
601        expect(obj.$attrs.show).assertEqual('false')
602        console.info("["+name+"Props] 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      testToolbarShowPropNone
609     * @tc.desc      ACE
610     */
611    it('test'+nameA+'ShowPropNone', 0, async function (done) {
612        console.info('test'+nameA+'ShowPropNone START');
613        console.info("["+name+"Props] get globalThis.value is: " + JSON.stringify(globalThis.value));
614
615        let obj = JSON.parse(globalThis.value.showPropNone);
616        console.info("["+name+"Props] get inspector value is: " + JSON.stringify(obj));
617        console.info("["+name+"Props] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
618
619        expect(obj.$type).assertEqual(name)
620        expect(obj.$attrs.id).assertEqual('showPropNone')
621        expect(obj.$attrs.show).assertEqual('true')
622        console.info("["+name+"Props] get show value is: " + JSON.stringify(obj.$attrs.show));
623        done();
624    });
625});}
626