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 searchPropsJsTest() {  describe('searchPropsJsTest', 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('[searchPropsJsTest] before each called')
57
58        let result;
59        let options = {
60            uri: 'pages/search/prop/index'
61        }
62        try {
63            result = router.push(options)
64            console.info("push searchProps page success " + JSON.stringify(result));
65        } catch (err) {
66            console.error("push searchProps 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('[searchPropsJsTest] after each called')
77        await backToIndex()
78        await sleep(1000)
79    });
80
81    /**
82     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
83     * @tc.name      testsearchIdProp
84     * @tc.desc      ACE
85     */
86    it('testsearchIdProp', 0, async function (done) {
87        console.info('testsearchIdProp START');
88        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
89
90        let obj = JSON.parse(globalThis.value.idProp);
91        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
92        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
93
94        expect(obj.$type).assertEqual('search')
95        expect(obj.$attrs.id).assertEqual('idProp')
96        done();
97    });
98
99    /**
100     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
101     * @tc.name      testsearchClassProp
102     * @tc.desc      ACE
103     */
104    it('testsearchClassProp', 0, async function (done) {
105        console.info('testsearchClassProp START');
106        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
107
108        let obj = JSON.parse(globalThis.value.classProp);
109        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
110        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
111
112        expect(obj.$type).assertEqual('search')
113        expect(obj.$attrs.id).assertEqual('classProp')
114        expect(obj.$attrs.className).assertEqual('classProp')
115        done();
116    });
117
118    /**
119     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
120     * @tc.name      testsearchClassPropNone
121     * @tc.desc      ACE
122     */
123    it('testsearchClassPropNone', 0, async function (done) {
124        console.info('testsearchClassPropNone START');
125        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
126
127        let obj = JSON.parse(globalThis.value.classPropNone);
128        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
129        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
130
131        expect(obj.$type).assertEqual('search')
132        expect(obj.$attrs.id).assertEqual('classPropNone')
133        expect(obj.$attrs.className).assertEqual(undefined)
134        console.info("[searchProps] get className value is: " + JSON.stringify(obj.$attrs.className));
135        done();
136    });
137
138    /**
139     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
140     * @tc.name      testsearchRefProp
141     * @tc.desc      ACE
142     */
143    it('testsearchRefProp', 0, async function (done) {
144        console.info('testsearchRefProp START');
145        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
146
147        let obj = JSON.parse(globalThis.value.refProp);
148        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
149        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
150
151        expect(obj.$type).assertEqual('search')
152        expect(obj.$attrs.id).assertEqual('refProp')
153        expect(obj.$attrs.ref).assertEqual('refProp')
154        done();
155    });
156
157    /**
158     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
159     * @tc.name      testsearchRefPropNone
160     * @tc.desc      ACE
161     */
162    it('testsearchRefPropNone', 0, async function (done) {
163        console.info('testsearchRefPropNone START');
164        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
165
166        let obj = JSON.parse(globalThis.value.refPropNone);
167        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
168        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
169
170        expect(obj.$type).assertEqual('search')
171        expect(obj.$attrs.id).assertEqual('refPropNone')
172        expect(obj.$attrs.ref).assertEqual(undefined)
173        console.info("[searchProps] get ref value is: " + JSON.stringify(obj.$attrs.ref));
174        done();
175    });
176
177    /**
178     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
179     * @tc.name      testsearchDisabledPropTrue
180     * @tc.desc      ACE
181     */
182    it('testsearchDisabledPropTrue', 0, async function (done) {
183        console.info('testsearchDisabledPropTrue START');
184        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
185
186        let obj = JSON.parse(globalThis.value.disabledPropTrue);
187        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
188        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
189
190        expect(obj.$type).assertEqual('search')
191        expect(obj.$attrs.id).assertEqual('disabledPropTrue')
192        expect(obj.$attrs.disabled).assertEqual('true')
193        done();
194    });
195
196    /**
197     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
198     * @tc.name      testsearchDisabledPropFalse
199     * @tc.desc      ACE
200     */
201    it('testsearchDisabledPropFalse', 0, async function (done) {
202        console.info('testsearchDisabledPropFalse START');
203        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
204
205        let obj = JSON.parse(globalThis.value.disabledPropFalse);
206        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
207        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
208
209        expect(obj.$type).assertEqual('search')
210        expect(obj.$attrs.id).assertEqual('disabledPropFalse')
211        expect(obj.$attrs.disabled).assertEqual('false')
212        done();
213    });
214
215    /**
216     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
217     * @tc.name      testsearchDisabledPropNone
218     * @tc.desc      ACE
219     */
220    it('testsearchDisabledPropNone', 0, async function (done) {
221        console.info('testsearchDisabledPropNone START');
222        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
223
224        let obj = JSON.parse(globalThis.value.disabledPropNone);
225        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
226        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
227
228        expect(obj.$type).assertEqual('search')
229        expect(obj.$attrs.id).assertEqual('disabledPropNone')
230        expect(obj.$attrs.disabled).assertEqual('false')
231        done();
232    });
233
234    /**
235     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
236     * @tc.name      testsearchFocusablePropTrue
237     * @tc.desc      ACE
238     */
239    it('testsearchFocusablePropTrue', 0, async function (done) {
240        console.info('testsearchFocusablePropTrue START');
241        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
242
243        let obj = JSON.parse(globalThis.value.focusablePropTrue);
244        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
245        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
246
247        expect(obj.$type).assertEqual('search')
248        expect(obj.$attrs.id).assertEqual('focusablePropTrue')
249        expect(obj.$attrs.focusable).assertEqual('true')
250        done();
251    });
252
253    /**
254     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
255     * @tc.name      testsearchFocusablePropFalse
256     * @tc.desc      ACE
257     */
258    it('testsearchFocusablePropFalse', 0, async function (done) {
259        console.info('testsearchFocusablePropFalse START');
260        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
261
262        let obj = JSON.parse(globalThis.value.focusablePropFalse);
263        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
264        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
265
266        expect(obj.$type).assertEqual('search')
267        expect(obj.$attrs.id).assertEqual('focusablePropFalse')
268        expect(obj.$attrs.focusable).assertEqual('false')
269        done();
270    });
271
272    /**
273     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
274     * @tc.name      testsearchFocusablePropNone
275     * @tc.desc      ACE
276     */
277    it('testsearchFocusablePropNone', 0, async function (done) {
278        console.info('testsearchFocusablePropNone START');
279        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
280
281        let obj = JSON.parse(globalThis.value.focusablePropNone);
282        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
283        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
284
285        expect(obj.$type).assertEqual('search')
286        expect(obj.$attrs.id).assertEqual('focusablePropNone')
287        expect(obj.$attrs.focusable).assertEqual('false')
288        done();
289    });
290
291    /**
292     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
293     * @tc.name      testsearchDataProp
294     * @tc.desc      ACE
295     */
296    it('testsearchDataProp', 0, async function (done) {
297        console.info('testsearchDataProp START');
298        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
299
300        let obj = JSON.parse(globalThis.value.dataProp);
301        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
302        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
303
304        expect(obj.$type).assertEqual('search')
305        expect(obj.$attrs.id).assertEqual('dataProp')
306        expect(obj.$attrs.datasearch).assertEqual(undefined);
307        console.info("[searchProps] get datasearch value is: " + JSON.stringify(obj.$attrs.datasearch));
308        done();
309    });
310
311    /**
312     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
313     * @tc.name      testsearchDataPropNone
314     * @tc.desc      ACE
315     */
316    it('testsearchDataPropNone', 0, async function (done) {
317        console.info('testsearchDataPropNone START');
318        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
319
320        let obj = JSON.parse(globalThis.value.dataPropNone);
321        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
322        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
323
324        expect(obj.$type).assertEqual('search')
325        expect(obj.$attrs.id).assertEqual('dataPropNone')
326        expect(obj.$attrs.datasearch).assertEqual(undefined)
327        console.info("[searchProps] get datasearch value is: " + JSON.stringify(obj.$attrs.datasearch));
328        done();
329    });
330
331    /**
332     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
333     * @tc.name      testsearchClickEffectPropSmall
334     * @tc.desc      ACE
335     */
336    it('testsearchClickEffectPropSmall', 0, async function (done) {
337        console.info('testsearchClickEffectPropSmall START');
338        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
339
340        let obj = JSON.parse(globalThis.value.clickEffectPropSmall);
341        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
342        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
343
344        expect(obj.$type).assertEqual('search')
345        expect(obj.$attrs.id).assertEqual('clickEffectPropSmall')
346        expect(obj.$attrs.clickEffect).assertEqual('spring-small')
347        done();
348    });
349
350    /**
351     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
352     * @tc.name      testsearchClickEffectPropMedium
353     * @tc.desc      ACE
354     */
355    it('testsearchClickEffectPropMedium', 0, async function (done) {
356        console.info('testsearchClickEffectPropMedium START');
357        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
358
359        let obj = JSON.parse(globalThis.value.clickEffectPropMedium);
360        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
361        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
362
363        expect(obj.$type).assertEqual('search')
364        expect(obj.$attrs.id).assertEqual('clickEffectPropMedium')
365        expect(obj.$attrs.clickEffect).assertEqual('spring-medium')
366        done();
367    });
368
369    /**
370     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
371     * @tc.name      testsearchClickEffectPropLarge
372     * @tc.desc      ACE
373     */
374    it('testsearchClickEffectPropLarge', 0, async function (done) {
375        console.info('testsearchClickEffectPropLarge START');
376        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
377
378        let obj = JSON.parse(globalThis.value.clickEffectPropLarge);
379        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
380        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
381
382        expect(obj.$type).assertEqual('search')
383        expect(obj.$attrs.id).assertEqual('clickEffectPropLarge')
384        expect(obj.$attrs.clickEffect).assertEqual('spring-large')
385        done();
386    });
387
388    /**
389     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
390     * @tc.name      testsearchClickEffectPropNone
391     * @tc.desc      ACE
392     */
393    it('testsearchClickEffectPropNone', 0, async function (done) {
394        console.info('testsearchClickEffectPropNone START');
395        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
396
397        let obj = JSON.parse(globalThis.value.clickEffectPropNone);
398        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
399        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
400
401        expect(obj.$type).assertEqual('search')
402        expect(obj.$attrs.id).assertEqual('clickEffectPropNone')
403        expect(obj.$attrs.clickEffect).assertEqual(undefined)
404        console.info("[searchProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect));
405        done();
406    });
407
408    /**
409     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
410     * @tc.name      testsearchDirPropRtl
411     * @tc.desc      ACE
412     */
413    it('testsearchDirPropRtl', 0, async function (done) {
414        console.info('testsearchDirPropRtl START');
415        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
416
417        let obj = JSON.parse(globalThis.value.dirPropRtl);
418        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
419        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
420
421        expect(obj.$type).assertEqual('search')
422        expect(obj.$attrs.id).assertEqual('dirPropRtl')
423        expect(obj.$attrs.dir).assertEqual('rtl')
424        done();
425    });
426
427    /**
428     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
429     * @tc.name      testsearchDirPropLtr
430     * @tc.desc      ACE
431     */
432    it('testsearchDirPropLtr', 0, async function (done) {
433        console.info('testsearchDirPropLtr START');
434        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
435
436        let obj = JSON.parse(globalThis.value.dirPropLtr);
437        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
438        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
439
440        expect(obj.$type).assertEqual('search')
441        expect(obj.$attrs.id).assertEqual('dirPropLtr')
442        expect(obj.$attrs.dir).assertEqual('ltr')
443        done();
444    });
445
446    /**
447     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
448     * @tc.name      testsearchDirPropAuto
449     * @tc.desc      ACE
450     */
451    it('testsearchDirPropAuto', 0, async function (done) {
452        console.info('testsearchDirPropAuto START');
453        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
454
455        let obj = JSON.parse(globalThis.value.dirPropAuto);
456        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
457        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
458
459        expect(obj.$type).assertEqual('search')
460        expect(obj.$attrs.id).assertEqual('dirPropAuto')
461        expect(obj.$attrs.dir).assertEqual('auto')
462        done();
463    });
464
465    /**
466     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
467     * @tc.name      testsearchDirPropNone
468     * @tc.desc      ACE
469     */
470    it('testsearchDirPropNone', 0, async function (done) {
471        console.info('testsearchDirPropNone START');
472        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
473
474        let obj = JSON.parse(globalThis.value.dirPropNone);
475        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
476        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
477
478        expect(obj.$type).assertEqual('search')
479        expect(obj.$attrs.id).assertEqual('dirPropNone')
480        expect(obj.$attrs.dir).assertEqual('auto')
481        done();
482    });
483
484    /**
485     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
486     * @tc.name      testsearchForPropNull
487     * @tc.desc      ACE
488     */
489    it('testsearchForPropNull', 0, async function (done) {
490        console.info('testsearchForPropNull START');
491        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
492
493        let obj = JSON.parse(globalThis.value.forPropNull);
494        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
495        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
496
497        expect(obj.$type).assertEqual('search')
498        expect(obj.$attrs.id).assertEqual('forPropNull')
499        expect(obj.$attrs.for).assertEqual(undefined)
500        console.info("[searchProps] get for value is: " + JSON.stringify(obj.$attrs.for));
501        done();
502    });
503
504    /**
505     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
506     * @tc.name      testsearchForPropOne
507     * @tc.desc      ACE
508     */
509    it('testsearchForPropOne', 0, async function (done) {
510        console.info('testsearchForPropOne START');
511        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
512
513        let obj = JSON.parse(globalThis.value.forPropOne);
514        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
515        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
516
517        expect(obj.$type).assertEqual('search')
518        expect(obj.$attrs.id).assertEqual('forPropOne')
519        expect(obj.$attrs.for).assertEqual(undefined)
520        console.info("[searchProps] get for value is: " + JSON.stringify(obj.$attrs.for));
521        done();
522    });
523
524    /**
525     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
526     * @tc.name      testsearchForPropThree
527     * @tc.desc      ACE
528     */
529    it('testsearchForPropThree', 0, async function (done) {
530        console.info('testsearchForPropThree START');
531        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
532
533        let obj = JSON.parse(globalThis.value.forPropThree);
534        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
535        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
536
537        expect(obj.$type).assertEqual('search')
538        expect(obj.$attrs.id).assertEqual('forPropThree')
539        expect(obj.$attrs.for).assertEqual(undefined)
540        console.info("[searchProps] get for value is: " + JSON.stringify(obj.$attrs.for));
541        done();
542    });
543
544    /**
545     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
546     * @tc.name      testsearchIfPropTrue
547     * @tc.desc      ACE
548     */
549    it('testsearchIfPropTrue', 0, async function (done) {
550        console.info('testsearchIfPropTrue START');
551        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
552
553        let obj = JSON.parse(globalThis.value.ifPropTrue);
554        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
555        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
556
557        expect(obj.$type).assertEqual('search')
558        expect(obj.$attrs.id).assertEqual('ifPropTrue')
559        expect(obj.$attrs.if).assertEqual(undefined)
560        console.info("[searchProps] get for value is: " + JSON.stringify(obj.$attrs.if));
561        done();
562    });
563
564    /**
565     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
566     * @tc.name      testsearchShowPropTrue
567     * @tc.desc      ACE
568     */
569    it('testsearchShowPropTrue', 0, async function (done) {
570        console.info('testsearchShowPropTrue START');
571        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
572
573        let obj = JSON.parse(globalThis.value.showPropTrue);
574        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
575        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
576
577        expect(obj.$type).assertEqual('search')
578        expect(obj.$attrs.id).assertEqual('showPropTrue')
579        expect(obj.$attrs.show).assertEqual('true')
580        console.info("[searchProps] get show value is: " + JSON.stringify(obj.$attrs.show));
581        done();
582    });
583
584    /**
585     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
586     * @tc.name      testsearchShowPropFalse
587     * @tc.desc      ACE
588     */
589    it('testsearchShowPropFalse', 0, async function (done) {
590        console.info('testsearchShowPropFalse START');
591        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
592
593        let obj = JSON.parse(globalThis.value.showPropFalse);
594        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
595        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
596
597        expect(obj.$type).assertEqual('search')
598        expect(obj.$attrs.id).assertEqual('showPropFalse')
599        expect(obj.$attrs.show).assertEqual('false')
600        console.info("[searchProps] get show value is: " + JSON.stringify(obj.$attrs.show));
601        done();
602    });
603
604    /**
605     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
606     * @tc.name      testsearchShowPropNone
607     * @tc.desc      ACE
608     */
609    it('testsearchShowPropNone', 0, async function (done) {
610        console.info('testsearchShowPropNone START');
611        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
612
613        let obj = JSON.parse(globalThis.value.showPropNone);
614        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
615        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
616
617        expect(obj.$type).assertEqual('search')
618        expect(obj.$attrs.id).assertEqual('showPropNone')
619        expect(obj.$attrs.show).assertEqual("true")
620        console.info("[searchProps] get show value is: " + JSON.stringify(obj.$attrs.show));
621        done();
622    });
623
624    /**
625     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
626     * @tc.name      testsearchShowPropNone
627     * @tc.desc      ACE
628     */
629    it('testsearchValuePropNone', 0, async function (done) {
630        console.info('testsearchXsPropNone START');
631        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
632
633        let obj = JSON.parse(globalThis.value.valueNone);
634        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
635        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
636
637        expect(obj.$type).assertEqual('search')
638        expect(obj.$attrs.id).assertEqual('valueNone')
639        expect(obj.$attrs.value).assertEqual(undefined)
640        console.info("[searchProps] get value value is: " + JSON.stringify(obj.$attrs.value));
641        done();
642    });
643
644    /**
645     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
646     * @tc.name      testsearchShowPropNone
647     * @tc.desc      ACE
648     */
649    it('testsearchValueProp', 0, async function (done) {
650        console.info('testsearchXsPropNone START');
651        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
652
653        let obj = JSON.parse(globalThis.value.value);
654        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
655        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
656
657        expect(obj.$type).assertEqual('search')
658        expect(obj.$attrs.id).assertEqual('value')
659        expect(obj.$attrs.value).assertEqual('text')
660        console.info("[searchProps] get value value is: " + JSON.stringify(obj.$attrs.value));
661        done();
662    });
663
664    /**
665     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
666     * @tc.name      testsearchShowPropNone
667     * @tc.desc      ACE
668     */
669    it('testsearchIconPropNone', 0, async function (done) {
670        console.info('testsearchXsPropNone START');
671        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
672
673        let obj = JSON.parse(globalThis.value.iconNone);
674        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
675        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
676
677        expect(obj.$type).assertEqual('search')
678        expect(obj.$attrs.id).assertEqual('iconNone')
679        expect(obj.$attrs.icon).assertEqual(undefined)
680        console.info("[searchProps] get checked value is: " + JSON.stringify(obj.$attrs.icon));
681        done();
682    });
683
684    /**
685     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
686     * @tc.name      testsearchShowPropNone
687     * @tc.desc      ACE
688     */
689    it('testsearchIconProp', 0, async function (done) {
690        console.info('testsearchXsPropNone START');
691        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
692
693        let obj = JSON.parse(globalThis.value.icon);
694        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
695        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
696
697        expect(obj.$type).assertEqual('search')
698        expect(obj.$attrs.id).assertEqual('icon')
699        expect(obj.$attrs.icon).assertEqual("common/images/image.png")
700        console.info("[searchProps] get checked value is: " + JSON.stringify(obj.$attrs.icon));
701        done();
702    });
703
704    /**
705     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
706     * @tc.name      testsearchShowPropNone
707     * @tc.desc      ACE
708     */
709    it('testsearchHintPropNone', 0, async function (done) {
710        console.info('testsearchXsPropNone START');
711        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
712
713        let obj = JSON.parse(globalThis.value.hintNone);
714        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
715        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
716
717        expect(obj.$type).assertEqual('search')
718        expect(obj.$attrs.id).assertEqual('hintNone')
719        expect(obj.$attrs.hint).assertEqual(undefined)
720        console.info("[searchProps] get hint value is: " + JSON.stringify(obj.$attrs.hint));
721        done();
722    });
723
724    /**
725     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
726     * @tc.name      testsearchShowPropNone
727     * @tc.desc      ACE
728     */
729    it('testsearchHintProp', 0, async function (done) {
730        console.info('testsearchXsPropNone START');
731        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
732
733        let obj = JSON.parse(globalThis.value.hint);
734        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
735        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
736
737        expect(obj.$type).assertEqual('search')
738        expect(obj.$attrs.id).assertEqual('hint')
739        expect(obj.$attrs.hint).assertEqual("提示")
740        console.info("[searchProps] get hint value is: " + JSON.stringify(obj.$attrs.hint));
741        done();
742    });
743
744    /**
745     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
746     * @tc.name      testsearchShowPropNone
747     * @tc.desc      ACE
748     */
749    it('testsearchMenuoptionsPropNone', 0, async function (done) {
750        console.info('testsearchXsPropNone START');
751        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
752
753        let obj = JSON.parse(globalThis.value.menuoptionsNone);
754        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
755        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
756
757        expect(obj.$type).assertEqual('search')
758        expect(obj.$attrs.id).assertEqual('menuoptionsNone')
759        expect(obj.$attrs.menuoptions).assertEqual(undefined)
760        console.info("[searchProps] get menuoptions value is: " + JSON.stringify(obj.$attrs.menuoptions));
761        done();
762    });
763
764    /**
765     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
766     * @tc.name      testsearchShowPropNone
767     * @tc.desc      ACE
768     */
769    it('testsearchMenuoptionsProp', 0, async function (done) {
770        console.info('testsearchXsPropNone START');
771        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
772
773        let obj = JSON.parse(globalThis.value.menuoptions);
774        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
775        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
776
777        expect(obj.$type).assertEqual('search')
778        expect(obj.$attrs.id).assertEqual('menuoptions')
779        expect(obj.$attrs.menuoptions).assertEqual(undefined)
780        console.info("[searchProps] get menuoptions value is: " + JSON.stringify(obj.$attrs.menuoptions));
781        done();
782    });
783
784    /**
785     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
786     * @tc.name      testsearchShowPropNone
787     * @tc.desc      ACE
788     */
789    it('testsearchSearchbuttonPropNone', 0, async function (done) {
790        console.info('testsearchXsPropNone START');
791        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
792
793        let obj = JSON.parse(globalThis.value.searchbuttonNone);
794        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
795        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
796
797        expect(obj.$type).assertEqual('search')
798        expect(obj.$attrs.id).assertEqual('searchbuttonNone')
799        expect(obj.$attrs.searchbutton).assertEqual(undefined)
800        console.info("[searchProps] get searchbutton value is: " + JSON.stringify(obj.$attrs.searchbutton));
801        done();
802    });
803
804    /**
805     * @tc.number    SUB_ACE_BASIC_COMPONENT_JS_API_0100
806     * @tc.name      testsearchShowPropNone
807     * @tc.desc      ACE
808     */
809    it('testsearchSearchbuttonProp', 0, async function (done) {
810        console.info('testsearchXsPropNone START');
811        console.info("[searchProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
812
813        let obj = JSON.parse(globalThis.value.searchbutton);
814        console.info("[searchProps] get inspector value is: " + JSON.stringify(obj));
815        console.info("[searchProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
816
817        expect(obj.$type).assertEqual('search')
818        expect(obj.$attrs.id).assertEqual('searchbutton')
819        expect(obj.$attrs.searchbutton).assertEqual("按钮")
820        console.info("[searchProps] get searchbutton value is: " + JSON.stringify(obj.$attrs.searchbutton));
821        done();
822    });
823});}
824
825
826
827