提交 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");
* you may not use this file except in compliance with the License.
* 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 @@
<divider id="ifPropTrue"
if="true">
</divider>
<divider id="ifPropFalse"
if="false">
</divider>
<divider id="ifPropNone"
if="">
</divider>
<text class="sub-title">
渲染属性 -- show
</text>
......
......@@ -45,8 +45,6 @@ export default {
forPropOne : null,
forPropThree : null,
ifPropTrue : null,
ifPropFalse : null,
ifPropNone : null,
showPropTrue : null,
showPropFalse : null,
showPropNone : null,
......@@ -84,8 +82,6 @@ export default {
forPropOne : this.forPropOne,
forPropThree : this.forPropThree,
ifPropTrue : this.ifPropTrue,
ifPropFalse : this.ifPropFalse,
ifPropNone : this.ifPropNone,
showPropTrue : this.showPropTrue,
showPropFalse : this.showPropFalse,
showPropNone : this.showPropNone,
......@@ -121,16 +117,12 @@ export default {
this.forPropOne = this.$element("forPropOne").getInspector()
this.forPropThree = this.$element("forPropThree").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.showPropFalse = this.$element("showPropFalse").getInspector()
this.showPropNone = this.$element("showPropNone").getInspector()
return
},
getSpecificPropValues () {
this.verticalTrue = this.$element("showPropNone").getInspector()
this.verticalTrue = this.$element("showPropNone").getInspector()
return
this.verticalTrue = this.$element("verticalTrue").getInspector()
this.verticalFalse = this.$element("verticalFalse").getInspector()
}
}
/**
* 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");
* you may not use this file except in compliance with the License.
* 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");
* 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
* 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,
......@@ -32,7 +32,7 @@ describe('buttonPropsJsTest', function () {
let backToIndexPromise = new Promise((resolve, reject) => {
setTimeout(() => {
router.back({
uri: 'pages/button/prop/index'
uri: 'pages/index/index'
});
resolve();
}, 500);
......@@ -47,6 +47,7 @@ describe('buttonPropsJsTest', function () {
return clearPromise;
});
}
/**
* run before testcase
*/
......@@ -77,6 +78,7 @@ describe('buttonPropsJsTest', function () {
});
// 通用属性
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testButtonIdProp
......@@ -95,6 +97,11 @@ describe('buttonPropsJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testButtonClassProp
* @tc.desc ACE
*/
it('testButtonClassProp', 0, async function (done) {
console.info('testButtonClassProp START');
console.info("[buttonProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
......@@ -610,7 +617,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button')
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));
done();
});
......@@ -732,7 +739,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button')
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));
done();
});
......@@ -912,7 +919,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button')
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));
done();
});
......@@ -932,7 +939,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button')
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));
done();
});
......@@ -952,7 +959,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button')
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));
done();
});
......@@ -972,7 +979,7 @@ describe('buttonPropsJsTest', function () {
expect(obj.$type).assertEqual('button')
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));
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册