提交 db1a6f5b 编写于 作者: B bayanxing

add attribute testcase

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 265adc6d
......@@ -74,38 +74,23 @@ export default {
onShow(){
this.getCommonPropValues();
this.getSpecificPropValues();
globalThis.value = {
idProp : this.idProp,
classProp : this.classProp,
classPropNone : this.classPropNone,
styleProp : this.styleProp,
refProp : this.refProp,
refPropNone : this.refPropNone,
disabledPropTrue : this.disabledPropTrue,
disabledPropFalse : this.disabledPropFalse,
disabledPropNone : this.disabledPropNone,
focusablePropTrue : this.focusablePropTrue,
focusablePropFalse : this.focusablePropFalse,
focusablePropNone : this.focusablePropNone,
dataProp : this.dataProp,
dataPropNone : this.dataPropNone,
idProp : this.idProp, classProp : this.classProp, classPropNone : this.classPropNone,
styleProp : this.styleProp, refProp : this.refProp, refPropNone : this.refPropNone,
disabledPropTrue : this.disabledPropTrue, disabledPropFalse : this.disabledPropFalse,
disabledPropNone : this.disabledPropNone, focusablePropTrue : this.focusablePropTrue,
focusablePropFalse : this.focusablePropFalse, focusablePropNone : this.focusablePropNone,
dataProp : this.dataProp, dataPropNone : this.dataPropNone,
clickEffectPropSmall : this.clickEffectPropSmall,
clickEffectPropMedium : this.clickEffectPropMedium,
clickEffectPropLarge : this.clickEffectPropLarge,
clickEffectPropNone : this.clickEffectPropNone,
dirPropRtl : this.dirPropRtl,
dirPropAuto : this.dirPropAuto,
dirPropLtr : this.dirPropLtr,
dirPropNone : this.dirPropNone,
forPropNull : this.forPropNull,
forPropOne : this.forPropOne,
forPropThree : this.forPropThree,
ifPropTrue : this.ifPropTrue,
showPropTrue : this.showPropTrue,
showPropFalse : this.showPropFalse,
showPropNone : this.showPropNone,
indexProp: this.indexProp,
clickEffectPropNone : this.clickEffectPropNone, dirPropRtl : this.dirPropRtl,
dirPropAuto : this.dirPropAuto, dirPropLtr : this.dirPropLtr, dirPropNone : this.dirPropNone,
forPropNull : this.forPropNull, forPropOne : this.forPropOne,
forPropThree : this.forPropThree, ifPropTrue : this.ifPropTrue,
showPropTrue : this.showPropTrue, showPropFalse : this.showPropFalse,
showPropNone : this.showPropNone, indexProp: this.indexProp,
autoplayPropTrue: this.autoplayPropTrue,
autoplayPropFalse: this.autoplayPropFalse,
intervalProp: this.intervalProp,
......@@ -159,7 +144,9 @@ export default {
this.showPropTrue = this.$element("showPropTrue").getInspector()
this.showPropFalse = this.$element("showPropFalse").getInspector()
this.showPropNone = this.$element("showPropNone").getInspector()
},
getSpecificPropValues() {
// 特有属性
this.indexProp = this.$element("showPropNone").getInspector()
this.autoplayPropTrue = this.$element("autoplayPropTrue").getInspector()
......@@ -182,5 +169,5 @@ export default {
this.scrollEffectPropSpring = this.$element("scrollEffectPropSpring").getInspector()
this.displayModePropStretch = this.$element("displayModePropStretch").getInspector()
this.displayModePropAutoLinear = this.$element("displayModePropAutoLinear").getInspector()
},
}
}
......@@ -135,33 +135,6 @@ describe('piecePropsJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testPieceStyleProp
* @tc.desc ACEs
*/
// it('testPieceStyleProp', 0, async function (done) {
// console.info('testPieceStyleProp START');
// console.info("[pieceProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
//
// let obj = JSON.parse(globalThis.value.styleProp);
// console.info("[pieceProps] get inspector value is: " + JSON.stringify(obj));
// console.info("[pieceProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
//
// expect(obj.$type).assertEqual('piece')
// expect(obj.$attrs.id).assertEqual('styleProp')
// expect(obj.$attrs.style).assertEqual(undefined)
// console.info("[pieceProps] get style value is: " + JSON.stringify(obj.$attrs.style));
//
// expect(obj.$styles.width).assertEqual(undefined);
// console.info("[pieceProps] get style width value is: " + JSON.stringify(obj.$styles.width));
// expect(obj.$styles.height).assertEqual(undefined);
// console.info("[pieceProps] get style height value is: " + JSON.stringify(obj.$styles.height));
// expect(obj.$styles.get('background-color')).assertEqual(undefined);
// console.info("[pieceProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color')));
// done();
// });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testPieceRefProp
......
......@@ -134,33 +134,6 @@ describe('refreshPropsJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testRefreshStyleProp
* @tc.desc ACEs
*/
// it('testRefreshStyleProp', 0, async function (done) {
// console.info('testRefreshStyleProp START');
// console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
//
// let obj = JSON.parse(globalThis.value.styleProp);
// console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj));
// console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
//
// expect(obj.$type).assertEqual('refresh')
// expect(obj.$attrs.id).assertEqual('styleProp')
// expect(obj.$attrs.style).assertEqual(undefined)
// console.info("[refreshProps] get style value is: " + JSON.stringify(obj.$attrs.style));
//
// expect(obj.$styles.width).assertEqual(undefined);
// console.info("[refreshProps] get style width value is: " + JSON.stringify(obj.$styles.width));
// expect(obj.$styles.height).assertEqual(undefined);
// console.info("[refreshProps] get style height value is: " + JSON.stringify(obj.$styles.height));
// expect(obj.$styles.get('background-color')).assertEqual(undefined);
// console.info("[refreshProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color')));
// done();
// });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testRefreshRefProp
......
......@@ -134,33 +134,6 @@ describe('stackPropsJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testStackStyleProp
* @tc.desc ACEs
*/
// it('testStackStyleProp', 0, async function (done) {
// console.info('testStackStyleProp START');
// console.info("[stackProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
//
// let obj = JSON.parse(globalThis.value.styleProp);
// console.info("[stackProps] get inspector value is: " + JSON.stringify(obj));
// console.info("[stackProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
//
// expect(obj.$type).assertEqual('stack')
// expect(obj.$attrs.id).assertEqual('styleProp')
// expect(obj.$attrs.style).assertEqual(undefined)
// console.info("[stackProps] get style value is: " + JSON.stringify(obj.$attrs.style));
//
// expect(obj.$styles.width).assertEqual(undefined);
// console.info("[stackProps] get style width value is: " + JSON.stringify(obj.$styles.width));
// expect(obj.$styles.height).assertEqual(undefined);
// console.info("[stackProps] get style height value is: " + JSON.stringify(obj.$styles.height));
// expect(obj.$styles.get('background-color')).assertEqual(undefined);
// console.info("[stackProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color')));
// done();
// });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testStackRefProp
......
......@@ -135,33 +135,6 @@ describe('swiperPropsJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testSwiperStyleProp
* @tc.desc ACEs
*/
// it('testSwiperStyleProp', 0, async function (done) {
// console.info('testSwiperStyleProp START');
// console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
//
// let obj = JSON.parse(globalThis.value.styleProp);
// console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj));
// console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
//
// expect(obj.$type).assertEqual('swiper')
// expect(obj.$attrs.id).assertEqual('styleProp')
// expect(obj.$attrs.style).assertEqual(undefined)
// console.info("[swiperProps] get style value is: " + JSON.stringify(obj.$attrs.style));
//
// expect(obj.$styles.width).assertEqual(undefined);
// console.info("[swiperProps] get style width value is: " + JSON.stringify(obj.$styles.width));
// expect(obj.$styles.height).assertEqual(undefined);
// console.info("[swiperProps] get style height value is: " + JSON.stringify(obj.$styles.height));
// expect(obj.$styles.get('background-color')).assertEqual(undefined);
// console.info("[swiperProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color')));
// done();
// });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testSwiperRefProp
......@@ -902,7 +875,8 @@ describe('swiperPropsJsTest', function () {
expect(obj.$type).assertEqual('swiper')
expect(obj.$attrs.id).assertEqual('indicatorDisabledPropTrue') //ID
expect(obj.$attrs.indicatordisabled).assertEqual('true') // prop and propValue
console.info("[swiperProps] get indicatordisabled value is: " + JSON.stringify(obj.$attrs.indicatordisabled));//prop
console.info("[swiperProps] get indicatordisabled value is: "
+ JSON.stringify(obj.$attrs.indicatordisabled));
done();
});
......@@ -922,7 +896,8 @@ describe('swiperPropsJsTest', function () {
expect(obj.$type).assertEqual('swiper')
expect(obj.$attrs.id).assertEqual('indicatorDisabledPropFalse') //ID
expect(obj.$attrs.indicatordisabled).assertEqual('false') // prop and propValue
console.info("[swiperProps] get indicatordisabled value is: " + JSON.stringify(obj.$attrs.indicatordisabled));//prop
console.info("[swiperProps] get indicatordisabled value is: "
+ JSON.stringify(obj.$attrs.indicatordisabled));
done();
});
......
......@@ -136,32 +136,6 @@ describe('textPropsJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testTextStyleProp
* @tc.desc ACEs
*/
// it('testTextStyleProp', 0, async function (done) {
// console.info('testTextStyleProp START');
// console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
//
// let obj = JSON.parse(globalThis.value.styleProp);
// console.info("[textProps] get inspector value is: " + JSON.stringify(obj));
// console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
//
// expect(obj.$type).assertEqual('text')
// expect(obj.$attrs.id).assertEqual('styleProp')
// expect(obj.$attrs.style).assertEqual(undefined)
// console.info("[textProps] get style value is: " + JSON.stringify(obj.$attrs.style));
//
// expect(obj.$styles.width).assertEqual(undefined);
// console.info("[textProps] get style width value is: " + JSON.stringify(obj.$styles.width));
// expect(obj.$styles.height).assertEqual(undefined);
// console.info("[textProps] get style height value is: " + JSON.stringify(obj.$styles.height));
// expect(obj.$styles.get('background-color')).assertEqual(undefined);
// console.info("[textProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color')));
// done();
// });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册