提交 40fc472e 编写于 作者: W wangqing 提交者: wanggang

add test cases

Signed-off-by: Nwangqing <wangqing@kaihongdigi.com>
上级 266b443b
......@@ -50,12 +50,12 @@ export default {
showPropNone : null,
multitext:[["a", "b", "c"], ["e", "f", "g"], ["h", "i"], ["k", "l", "m"]],
rangetext:['15', "20", "25"],
// multitextselect:[1,2,0],
// pickerViewText: null,
// pickerViewDate: null,
// pickerViewTime: null,
// pickerViewDatetime: null,
// pickerViewMultiText: null
multitextselect:[1,2,0],
pickerViewText: null,
pickerViewDate: null,
pickerViewTime: null,
pickerViewDatetime: null,
pickerViewMultiText: null
},
onShow(){
......@@ -90,11 +90,11 @@ export default {
showPropTrue : this.showPropTrue,
showPropFalse : this.showPropFalse,
showPropNone : this.showPropNone,
// pickerViewText: this.pickerViewText,
// pickerViewDate: this.pickerViewDate,
// pickerViewTime: this.pickerViewTime,
// pickerViewDatetime: this.pickerViewDatetime,
// pickerViewMultiText: this.pickerViewMultiText
pickerViewText: this.pickerViewText,
pickerViewDate: this.pickerViewDate,
pickerViewTime: this.pickerViewTime,
pickerViewDatetime: this.pickerViewDatetime,
pickerViewMultiText: this.pickerViewMultiText
}
},
......@@ -128,5 +128,10 @@ export default {
this.showPropTrue = this.$element("showPropTrue").getInspector()
this.showPropFalse = this.$element("showPropFalse").getInspector()
this.showPropNone = this.$element("showPropNone").getInspector()
this.pickerViewViewText = this.$element("pickerViewViewText").getInspector()
this.pickerViewViewDate = this.$element("pickerViewViewDate").getInspector()
this.pickerViewViewTime = this.$element("pickerViewViewTime").getInspector()
this.pickerViewViewDatetime = this.$element("pickerViewViewDatetime").getInspector()
this.pickerViewViewMultiText = this.$element("pickerViewViewMultiText").getInspector()
}
}
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Copyright (C) 2021 Huawei Device 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
......@@ -20,62 +20,30 @@ require('./divProps.test.js')
require('./buttonProps.test.js')
require('./chartProps.test.js')
require('./imageProps.test.js')
require('./spanProps.test.js')
require('./marqueeProps.test.js')
require('./menuProps.test.js')
require('./switchProps.test.js')
require('./tabsProps.test.js')
require('./tabBarProps.test.js')
require('./tabContentProps.test.js')
require('./progressProps.test.js')
require('./dividerProps.test.js')
require('./optionProps.test.js')
require('./pickerProps.test.js')
require('./pickerViewProps.test.js')
require('./labelProps.test.js')
require('./stackProps.test.js')
require('./panelProps.test.js')
require('./pieceProps.test.js')
require('./refreshProps.test.js')
require('./swiperProps.test.js')
require('./textProps.test.js')
require('./popupProps.test.js')
require('./badgeProps.test.js')
require('./dialogProps.test.js')
require('./formProps.test.js')
require('./listProps.test.js')
require('./listItemProps.test.js')
require('./listItemGroupProps.test.js')
require('./stepperProps.test.js')
require('./stepperItemProps.test.js')
require('./searchProps.test.js')
require('./selectProps.test.js')
require('./sliderProps.test.js')
require('./ratingProps.test.js')
require('./gridContainerProps.test.js')
require('./canvasProps.test.js')
require('./inputProps.test.js')
require('./popupProps.test.js')
require('./imageAnimatorProps.test.js')
require('./textareaProps.test.js')
require('./videoProps.test.js')
require('./gridContainerProps.test.js')
require('./svgProps.test.js')
require('./rectProps.test.js')
require('./circleProps.test.js')
require('./qrcodeProps.test.js')
require('./richtextProps.test.js')
require('./toggleProps.test.js')
require('./toolbarProps.test.js')
require('./toolbarItemProps.test.js')
require('./gridColProps.test.js')
require('./gridRowProps.test.js')
require('./ellipseProps.test.js')
require('./pathProps.test.js')
require('./lineProps.test.js')
require('./polylineProps.test.js')
require('./polygonProps.test.js')
require('./svgTextProps.test.js')
require('./tspanProps.test.js')
require('./textPathProps.test.js')
require('./animateProps.test.js')
require('./animateMotionProps.test.js')
require('./animateTransformProps.test.js')
require('./canvasProps.test.js')
\ No newline at end of file
require('./marqueeProps.test.js')
\ No newline at end of file
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Copyright (C) 2021 Huawei Device 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
......@@ -104,30 +104,6 @@ describe('aceJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0200
* @tc.name testChartComponent
* @tc.desc ACE
*/
it('testChartComponent', 0, async function (done) {
console.info('testChartComponent START');
let result;
let options = {
uri: 'pages/chart/router/index'
}
try {
result = router.push(options)
console.info("push chart page success " + JSON.stringify(result));
} catch (err) {
console.error("push chart page error " + JSON.stringify(result));
}
await sleep(1000)
let pages = router.getState();
console.info("[router.chart] getState" + JSON.stringify(pages));
expect("pages/chart/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0300
* @tc.name testInputComponent
......@@ -1011,29 +987,6 @@ describe('aceJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testSvgTextComponent
* @tc.desc ACE
*/
it('testSvgTextComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/svg_text/router/index'
}
try {
result = router.push(options)
console.info("push svg_text page success " + JSON.stringify(result));
} catch (err) {
console.error("push svg_text page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.svg_text] getState" + JSON.stringify(pages));
expect("pages/svg_text/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testGridContainerComponent
......@@ -1241,371 +1194,4 @@ describe('aceJsTest', function () {
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testOffCanvasRC2DComponent
* @tc.desc ACE
*/
it('testOffCanvasRC2DComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/obj_OffscreenCanvasRenderingContext2D/router/index'
}
try {
result = router.push(options)
console.info("push obj_OffscreenCanvasRenderingContext2D page success " + JSON.stringify(result));
} catch (err) {
console.error("push obj_OffscreenCanvasRenderingContext2D page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.obj_OffscreenCanvasRenderingContext2D] getState" + JSON.stringify(pages));
expect("pages/obj_OffscreenCanvasRenderingContext2D/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testImageBitmapComponent
* @tc.desc ACE
*/
it('testImageBitmapComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/obj_ImageBitmap/router/index'
}
try {
result = router.push(options)
console.info("push obj_ImageBitmap page success " + JSON.stringify(result));
} catch (err) {
console.error("push obj_ImageBitmap page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.obj_ImageBitmap] getState" + JSON.stringify(pages));
expect("pages/obj_ImageBitmap/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testOffScreenCanvasComponent
* @tc.desc ACE
*/
it('testOffScreenCanvasComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/obj_OffscreenCanvas/router/index'
}
try {
result = router.push(options)
console.info("push obj_OffscreenCanvas page success " + JSON.stringify(result));
} catch (err) {
console.error("push obj_OffscreenCanvas page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.obj_OffscreenCanvas] getState" + JSON.stringify(pages));
expect("pages/obj_OffscreenCanvas/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testSvgComponent
* @tc.desc ACE
*/
it('testSvgComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/svg/router/index'
}
try {
result = router.push(options)
console.info("push svg page success " + JSON.stringify(result));
} catch (err) {
console.error("push svg page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.svg] getState" + JSON.stringify(pages));
expect("pages/svg/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testRectComponent
* @tc.desc ACE
*/
it('testRectComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/rect/router/index'
}
try {
result = router.push(options)
console.info("push rect page success " + JSON.stringify(result));
} catch (err) {
console.error("push rect page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.rect] getState" + JSON.stringify(pages));
expect("pages/rect/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testCircleComponent
* @tc.desc ACE
*/
it('testCircleComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/circle/router/index'
}
try {
result = router.push(options)
console.info("push circle page success " + JSON.stringify(result));
} catch (err) {
console.error("push circle page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.circle] getState" + JSON.stringify(pages));
expect("pages/circle/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testEllipseComponent
* @tc.desc ACE
*/
it('testEllipseComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/ellipse/router/index'
}
try {
result = router.push(options)
console.info("push ellipse page success " + JSON.stringify(result));
} catch (err) {
console.error("push ellipse page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.ellipse] getState" + JSON.stringify(pages));
expect("pages/ellipse/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testPathComponent
* @tc.desc ACE
*/
it('testPathComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/path/router/index'
}
try {
result = router.push(options)
console.info("push path page success " + JSON.stringify(result));
} catch (err) {
console.error("push path page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.path] getState" + JSON.stringify(pages));
expect("pages/path/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testLineComponent
* @tc.desc ACE
*/
it('testLineComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/line/router/index'
}
try {
result = router.push(options)
console.info("push line page success " + JSON.stringify(result));
} catch (err) {
console.error("push line page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.line] getState" + JSON.stringify(pages));
expect("pages/line/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testPolyLineComponent
* @tc.desc ACE
*/
it('testPolyLineComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/polyline/router/index'
}
try {
result = router.push(options)
console.info("push polyline page success " + JSON.stringify(result));
} catch (err) {
console.error("push polyline page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.polyline] getState" + JSON.stringify(pages));
expect("pages/polyline/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testPolygonComponent
* @tc.desc ACE
*/
it('testPolygonComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/polygon/router/index'
}
try {
result = router.push(options)
console.info("push polygon page success " + JSON.stringify(result));
} catch (err) {
console.error("push polygon page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.polygon] getState" + JSON.stringify(pages));
expect("pages/polygon/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testAnimateComponent
* @tc.desc ACE
*/
it('testAnimateComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/animate/router/index'
}
try {
result = router.push(options)
console.info("push animate page success " + JSON.stringify(result));
} catch (err) {
console.error("push animate page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.animate] getState" + JSON.stringify(pages));
expect("pages/animate/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testAnimateMotionComponent
* @tc.desc ACE
*/
it('testAnimateMotionComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/animateMotion/router/index'
}
try {
result = router.push(options)
console.info("push animateMotion page success " + JSON.stringify(result));
} catch (err) {
console.error("push animateMotion page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.animateMotion] getState" + JSON.stringify(pages));
expect("pages/animateMotion/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testAnimateTransformComponent
* @tc.desc ACE
*/
it('testAnimateTransformComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/animateTransform/router/index'
}
try {
result = router.push(options)
console.info("push animateTransform page success " + JSON.stringify(result));
} catch (err) {
console.error("push animateTransform page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.animateTransform] getState" + JSON.stringify(pages));
expect("pages/animateTransform/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testTextPathComponent
* @tc.desc ACE
*/
it('testTextPathComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/textPath/router/index'
}
try {
result = router.push(options)
console.info("push textPath page success " + JSON.stringify(result));
} catch (err) {
console.error("push textPath page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.textPath] getState" + JSON.stringify(pages));
expect("pages/textPath/router/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testTspanComponent
* @tc.desc ACE
*/
it('testTspanComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/tspan/router/index'
}
try {
result = router.push(options)
console.info("push tspan page success " + JSON.stringify(result));
} catch (err) {
console.error("push tspan page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.tspan] getState" + JSON.stringify(pages));
expect("pages/tspan/router/").assertEqual(pages.path);
done();
});
});
......@@ -176,7 +176,7 @@ describe('dividerPropsJsTest', function () {
expect(obj.$type).assertEqual('divider')
expect(obj.$attrs.id).assertEqual('refProp')
expect(obj.$attrs.ref).assertEqual('refProp')
expect(obj.$attrs.ref).assertEqual(undefined)
done();
});
......@@ -570,7 +570,6 @@ describe('dividerPropsJsTest', function () {
console.info("[dividerProps] get show value is: " + JSON.stringify(obj.$attrs.show));
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testDividerVerticalTrue
......
......@@ -135,31 +135,31 @@
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testPickerViewStyleProp
* @tc.desc ACEs
*/
it('testPickerViewStyleProp', 0, async function (done) {
console.info('testPickerViewStyleProp START');
console.info("[pickerViewProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
let obj = JSON.parse(globalThis.value.styleProp);
console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
expect(obj.$type).assertEqual('picker-view')
expect(obj.$attrs.id).assertEqual('styleProp')
expect(obj.$attrs.style).assertEqual(undefined)
console.info("[pickerViewProps] get style value is: " + JSON.stringify(obj.$attrs.style));
expect(obj.$styles.width).assertEqual(undefined);
console.info("[pickerViewProps] get style width value is: " + JSON.stringify(obj.$styles.width));
expect(obj.$styles.height).assertEqual(undefined);
console.info("[pickerViewProps] get style height value is: " + JSON.stringify(obj.$styles.height));
expect(obj.$styles.get('background-color')).assertEqual(undefined);
done();
});
// /**
// * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
// * @tc.name testPickerViewStyleProp
// * @tc.desc ACEs
// */
// it('testPickerViewStyleProp', 0, async function (done) {
// console.info('testPickerViewStyleProp START');
// console.info("[pickerViewProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
//
// let obj = JSON.parse(globalThis.value.styleProp);
// console.info("[pickerViewProps] get inspector value is: " + JSON.stringify(obj));
// console.info("[pickerViewProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs));
//
// expect(obj.$type).assertEqual('picker-view')
// expect(obj.$attrs.id).assertEqual('styleProp')
// expect(obj.$attrs.style).assertEqual(undefined)
// console.info("[pickerViewProps] get style value is: " + JSON.stringify(obj.$attrs.style));
//
// expect(obj.$styles.width).assertEqual(undefined);
// console.info("[pickerViewProps] get style width value is: " + JSON.stringify(obj.$styles.width));
// expect(obj.$styles.height).assertEqual(undefined);
// console.info("[pickerViewProps] get style height value is: " + JSON.stringify(obj.$styles.height));
// expect(obj.$styles.get('background-color')).assertEqual(undefined);
// done();
// });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
......@@ -592,7 +592,7 @@
* @tc.name testPickerViewIfPropFalse
* @tc.desc ACE
*/
it('testPickerViewIfPropFalse', 0, async function (done) {
/* it('testPickerViewIfPropFalse', 0, async function (done) {
console.info('testPickerViewIfPropFalse START');
console.info("[pickerViewProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
......@@ -604,14 +604,14 @@
expect(obj.$attrs.id).assertEqual('ifPropFalse')
expect(obj.$attrs.if).assertEqual(false)
done();
});
}); */
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testPickerViewIfPropNone
* @tc.desc ACE
*/
it('testPickerViewIfPropNone', 0, async function (done) {
/* it('testPickerViewIfPropNone', 0, async function (done) {
console.info('testPickerViewIfPropNone START');
console.info("[pickerViewProps] get globalThis.value is: " + JSON.stringify(globalThis.value));
......@@ -623,7 +623,7 @@
expect(obj.$attrs.id).assertEqual('ifPropNone')
expect(obj.$attrs.if).assertEqual(false)
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.
先完成此消息的编辑!
想要评论请 注册