提交 e0d9a359 编写于 作者: B bayanxing

add button attrs testcase

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 26957f03
/** /**
* Copyright (c) 2022 Shenzhen kaiHong Digital Industry Development Co., Ltd. * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
\ No newline at end of file
...@@ -140,13 +140,6 @@ ...@@ -140,13 +140,6 @@
<divider id="ifPropTrue" <divider id="ifPropTrue"
if="true"> if="true">
</divider> </divider>
<divider id="ifPropFalse"
if="false">
</divider>
<divider id="ifPropNone"
if="">
</divider>
<text class="sub-title"> <text class="sub-title">
渲染属性 -- show 渲染属性 -- show
</text> </text>
......
...@@ -45,8 +45,6 @@ export default { ...@@ -45,8 +45,6 @@ export default {
forPropOne : null, forPropOne : null,
forPropThree : null, forPropThree : null,
ifPropTrue : null, ifPropTrue : null,
ifPropFalse : null,
ifPropNone : null,
showPropTrue : null, showPropTrue : null,
showPropFalse : null, showPropFalse : null,
showPropNone : null, showPropNone : null,
...@@ -84,8 +82,6 @@ export default { ...@@ -84,8 +82,6 @@ export default {
forPropOne : this.forPropOne, forPropOne : this.forPropOne,
forPropThree : this.forPropThree, forPropThree : this.forPropThree,
ifPropTrue : this.ifPropTrue, ifPropTrue : this.ifPropTrue,
ifPropFalse : this.ifPropFalse,
ifPropNone : this.ifPropNone,
showPropTrue : this.showPropTrue, showPropTrue : this.showPropTrue,
showPropFalse : this.showPropFalse, showPropFalse : this.showPropFalse,
showPropNone : this.showPropNone, showPropNone : this.showPropNone,
...@@ -121,16 +117,12 @@ export default { ...@@ -121,16 +117,12 @@ export default {
this.forPropOne = this.$element("forPropOne").getInspector() this.forPropOne = this.$element("forPropOne").getInspector()
this.forPropThree = this.$element("forPropThree").getInspector() this.forPropThree = this.$element("forPropThree").getInspector()
this.ifPropTrue = this.$element("ifPropTrue").getInspector() this.ifPropTrue = this.$element("ifPropTrue").getInspector()
this.ifPropFalse = this.$element("ifPropFalse").getInspector()
this.ifPropNone = this.$element("ifPropNone").getInspector()
this.showPropTrue = this.$element("showPropTrue").getInspector() this.showPropTrue = this.$element("showPropTrue").getInspector()
this.showPropFalse = this.$element("showPropFalse").getInspector() this.showPropFalse = this.$element("showPropFalse").getInspector()
this.showPropNone = this.$element("showPropNone").getInspector() this.showPropNone = this.$element("showPropNone").getInspector()
return
}, },
getSpecificPropValues () { getSpecificPropValues () {
this.verticalTrue = this.$element("showPropNone").getInspector() this.verticalTrue = this.$element("verticalTrue").getInspector()
this.verticalTrue = this.$element("showPropNone").getInspector() this.verticalFalse = this.$element("verticalFalse").getInspector()
return
} }
} }
/** /**
* Copyright (c) 2022 Shenzhen kaiHong Digital Industry Development Co., Ltd. * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /**
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
...@@ -32,7 +32,7 @@ describe('buttonPropsJsTest', function () { ...@@ -32,7 +32,7 @@ describe('buttonPropsJsTest', function () {
let backToIndexPromise = new Promise((resolve, reject) => { let backToIndexPromise = new Promise((resolve, reject) => {
setTimeout(() => { setTimeout(() => {
router.back({ router.back({
uri: 'pages/button/prop/index' uri: 'pages/index/index'
}); });
resolve(); resolve();
}, 500); }, 500);
...@@ -47,6 +47,7 @@ describe('buttonPropsJsTest', function () { ...@@ -47,6 +47,7 @@ describe('buttonPropsJsTest', function () {
return clearPromise; return clearPromise;
}); });
} }
/** /**
* run before testcase * run before testcase
*/ */
...@@ -77,6 +78,7 @@ describe('buttonPropsJsTest', function () { ...@@ -77,6 +78,7 @@ describe('buttonPropsJsTest', function () {
}); });
// 通用属性 // 通用属性
/** /**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testButtonIdProp * @tc.name testButtonIdProp
...@@ -95,6 +97,11 @@ describe('buttonPropsJsTest', function () { ...@@ -95,6 +97,11 @@ describe('buttonPropsJsTest', function () {
done(); done();
}); });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testButtonClassProp
* @tc.desc ACE
*/
it('testButtonClassProp', 0, async function (done) { it('testButtonClassProp', 0, async function (done) {
console.info('testButtonClassProp START'); console.info('testButtonClassProp START');
console.info("[buttonProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); console.info("[buttonProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
...@@ -610,7 +617,7 @@ describe('buttonPropsJsTest', function () { ...@@ -610,7 +617,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button') expect(obj.$type).assertEqual('button')
expect(obj.$attrs.id).assertEqual('showPropNone') expect(obj.$attrs.id).assertEqual('showPropNone')
expect(obj.$attrs.show).assertEqual('false') expect(obj.$attrs.show).assertEqual('true')
console.info("[buttonProps] get show value is: " + JSON.stringify(obj.$attrs.show)); console.info("[buttonProps] get show value is: " + JSON.stringify(obj.$attrs.show));
done(); done();
}); });
...@@ -732,7 +739,7 @@ describe('buttonPropsJsTest', function () { ...@@ -732,7 +739,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button') expect(obj.$type).assertEqual('button')
expect(obj.$attrs.id).assertEqual('typeNone') expect(obj.$attrs.id).assertEqual('typeNone')
expect(obj.$attrs.type).assertEqual(undefined) expect(obj.$attrs.type).assertEqual('capsule')
console.info("[buttonProps] get type value is: " + JSON.stringify(obj.$attrs.type)); console.info("[buttonProps] get type value is: " + JSON.stringify(obj.$attrs.type));
done(); done();
}); });
...@@ -912,7 +919,7 @@ describe('buttonPropsJsTest', function () { ...@@ -912,7 +919,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button') expect(obj.$type).assertEqual('button')
expect(obj.$attrs.id).assertEqual('placementNone') expect(obj.$attrs.id).assertEqual('placementNone')
expect(obj.$attrs.placement).assertEqual(undefined) expect(obj.$attrs.placement).assertEqual('end')
console.info("[buttonProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); console.info("[buttonProps] get placement value is: " + JSON.stringify(obj.$attrs.placement));
done(); done();
}); });
...@@ -932,7 +939,7 @@ describe('buttonPropsJsTest', function () { ...@@ -932,7 +939,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button') expect(obj.$type).assertEqual('button')
expect(obj.$attrs.id).assertEqual('waitingTrue') expect(obj.$attrs.id).assertEqual('waitingTrue')
expect(obj.$attrs.waiting).assertEqual(true) expect(obj.$attrs.waiting).assertEqual('true')
console.info("[buttonProps] get waiting value is: " + JSON.stringify(obj.$attrs.waiting)); console.info("[buttonProps] get waiting value is: " + JSON.stringify(obj.$attrs.waiting));
done(); done();
}); });
...@@ -952,7 +959,7 @@ describe('buttonPropsJsTest', function () { ...@@ -952,7 +959,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button') expect(obj.$type).assertEqual('button')
expect(obj.$attrs.id).assertEqual('waitingFalse') expect(obj.$attrs.id).assertEqual('waitingFalse')
expect(obj.$attrs.waiting).assertEqual(false) expect(obj.$attrs.waiting).assertEqual('false')
console.info("[buttonProps] get waiting value is: " + JSON.stringify(obj.$attrs.waiting)); console.info("[buttonProps] get waiting value is: " + JSON.stringify(obj.$attrs.waiting));
done(); done();
}); });
...@@ -972,7 +979,7 @@ describe('buttonPropsJsTest', function () { ...@@ -972,7 +979,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button') expect(obj.$type).assertEqual('button')
expect(obj.$attrs.id).assertEqual('waitingNone') expect(obj.$attrs.id).assertEqual('waitingNone')
expect(obj.$attrs.waiting).assertEqual(undefined) expect(obj.$attrs.waiting).assertEqual('false')
console.info("[buttonProps] get waiting value is: " + JSON.stringify(obj.$attrs.waiting)); console.info("[buttonProps] get waiting value is: " + JSON.stringify(obj.$attrs.waiting));
done(); done();
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册