提交 b5c680a2 编写于 作者: S sunjiakun

progress add updateProgress

Signed-off-by: Nsunjiakun <sunjiakun3@huawei.com>
上级 9603d9fe
......@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//@ts-nocheck
//@ts-nocheck
import events_emitter from '@ohos.events.emitter';
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
import { Hypium } from '@ohos/hypium';
......@@ -25,19 +25,18 @@ struct progressTest {
@State progress_default: ProgressMask = new ProgressMask(10.0, 100.0, $r('sys.color.ohos_id_color_mask_regular'));
aboutToAppear(){
var abilityDelegator: any
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO);
hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO);
hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}
build() {
Row() {
Column() {
List({ space: 0, initialIndex: 0 }) {
ListItem() {
Image($r('app.media.icon'))
.key("ArkUX_Stage_Progress_updateColor")
......@@ -197,6 +196,98 @@ struct progressTest {
this.progress.updateColor(0x00ff00);
})
.fontSize(10)
Button("updateProgress_0100")
.key("ArkUX_Stage_Progress_updateProgress_Button_0100")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0100 onClick');
this.progress.updateProgress(0);
})
.fontSize(10)
Button("updateProgress_0200")
.key("ArkUX_Stage_Progress_updateProgress_Button_0200")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0200 onClick');
this.progress.updateProgress(5);
})
.fontSize(10)
}
}
ListItem() {
Row() {
Button("updateProgress_0300")
.key("ArkUX_Stage_Progress_updateProgress_Button_0300")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0300 onClick');
this.progress.updateProgress("6");
})
.fontSize(10)
Button("updateProgress_0400")
.key("ArkUX_Stage_Progress_updateProgress_Button_0400")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0400 onClick');
this.progress.updateProgress("");
})
.fontSize(10)
Button("updateProgress_0500")
.key("ArkUX_Stage_Progress_updateProgress_Button_0500")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0500 onClick');
this.progress.updateProgress(null);
})
.fontSize(10)
}
}
ListItem() {
Row() {
Button("updateProgress_0600")
.key("ArkUX_Stage_Progress_updateProgress_Button_0600")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0600 onClick');
this.progress.updateProgress(undefined);
})
.fontSize(10)
Button("updateProgress_0700")
.key("ArkUX_Stage_Progress_updateProgress_Button_0700")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0700 onClick');
this.progress.updateProgress(-2);
})
.fontSize(10)
Button("updateProgress_0800")
.key("ArkUX_Stage_Progress_updateProgress_Button_0800")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0800 onClick');
this.progress.updateProgress("10%");
})
.fontSize(10)
}
}
ListItem() {
Row() {
Button("updateProgress_0900")
.key("ArkUX_Stage_Progress_updateProgress_Button_0900")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_0900 onClick');
this.progress.updateProgress(9);
this.progress.updateProgress(1);
})
.fontSize(10)
Button("updateProgress_1000")
.key("ArkUX_Stage_Progress_updateProgress_Button_1000")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_1000 onClick');
this.progress.updateProgress(4);
this.progress.updateProgress(null);
})
.fontSize(10)
Button("updateProgress_1100")
.key("ArkUX_Stage_Progress_updateProgress_Button_1100")
.onClick((event: ClickEvent) => {
console.info('ArkUX_Stage_Progress_updateProgress_Button_1100 onClick');
this.progress.updateProgress(-2);
this.progress.updateProgress(5);
})
.fontSize(10)
}
}
}
......
......@@ -15,12 +15,12 @@
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
function sleep(time){
return new Promise((resolve,reject)=>{
setTimeout(()=>{
function sleep(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve("ok")
},time)
}).then(()=>{
}, time)
}).then(() => {
console.info(`sleep ${time} over...`)
})
}
......@@ -32,30 +32,30 @@ export default function progressTest() {
*tc.name Tests the updateColor property of the Progress component
*tc.desc Set the updateColor property parameter to 0x00ff00
*/
it('ArkUX_Stage_Progress_updateColor_0100', 0, async function (done) {
it('ArkUX_Stage_Progress_updateColor_0100', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0100 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0100 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0100 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0100 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0100 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0100 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FF00FF00");
console.info('ArkUX_Stage_Progress_updateColor_0100 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0100 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0100 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0100',10,'')
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0100', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -65,28 +65,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0200', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0200 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0200 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0200 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0200 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0200 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0200 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FFFD0000");
console.info('ArkUX_Stage_Progress_updateColor_0200 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0200 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0200 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0200',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0200', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -96,28 +96,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0300', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0300 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0300 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0300 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0300 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0300 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0300 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FF8A2BE2");
console.info('ArkUX_Stage_Progress_updateColor_0300 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0300 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0300 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0300',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0300', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -127,28 +127,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0400', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0400 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0400 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0400 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0400 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0400 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0400 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FFFFC0CB");
console.info('ArkUX_Stage_Progress_updateColor_0400 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0400 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0400 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0400',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0400', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -158,28 +158,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0500', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0500 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0500 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0500 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0500 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0500 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0500 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FFFD0000");
console.info('ArkUX_Stage_Progress_updateColor_0500 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0500 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0500 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0500',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0500', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -189,28 +189,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0600', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0600 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0600 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0600 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0600 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0600 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0600 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FF006CDE");
console.info('ArkUX_Stage_Progress_updateColor_0600 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0600 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0600 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0600',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0600', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -220,28 +220,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0700', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0700 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0700 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0700 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0700 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0700 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0700 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#33006CDE");
console.info('ArkUX_Stage_Progress_updateColor_0700 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0700 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0700 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0700',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0700', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -251,28 +251,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0800', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0800 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0800 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0800 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0800 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0800 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0800 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#CC006CDE");
console.info('ArkUX_Stage_Progress_updateColor_0800 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0800 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0800 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0800',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0800', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -282,28 +282,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_0900', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_0900 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_0900 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_0900 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_0900 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_0900 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_0900 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#33006CDE");
console.info('ArkUX_Stage_Progress_updateColor_0900 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_0900 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_0900 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0900',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_0900', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -313,30 +313,30 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_1000', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_1000 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1000 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_1000 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_1000 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_1000 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1000 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1000 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1000 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_1000 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1000',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1000', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -346,30 +346,30 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_1100', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_1100 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1100 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_1100 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_1100 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_1100 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1100 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1100 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1100 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_1100 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1100',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1100', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -379,30 +379,30 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_1200', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_1200 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1200 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_1200 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_1200 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_1200 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1200 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1200 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1200 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_1200 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1200',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1200', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -412,30 +412,30 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_1300', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_1300 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1300 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_1300 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_1300 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_1300 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1300 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1300 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1300 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_1300 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1300',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1300', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -446,28 +446,28 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_1400', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_1400 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1400 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_1400 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_1400 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_1400 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1400 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FFFFC0CB");
console.info('ArkUX_Stage_Progress_updateColor_1400 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1400 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_1400 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1400',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1400', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
/*
......@@ -478,30 +478,30 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_1500', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_1500 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1500 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_1500 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_1500 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_1500 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1500 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1500 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1500 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateColor_1500 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1500',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1500', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
......@@ -513,28 +513,369 @@ export default function progressTest() {
*/
it('ArkUX_Stage_Progress_updateColor_1600', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateColor_1600 START');
setTimeout(async()=>{
try{
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1600 START :'+ JSON.stringify(strJson));
console.info('ArkUX_Stage_Progress_updateColor_1600 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateColor_1600 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateColor_1600 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1600 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor));
JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#FF00FF00");
console.info('ArkUX_Stage_Progress_updateColor_1600 END ');
} catch(err) {
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1600 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1600', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0100
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to 0
*/
it('ArkUX_Stage_Progress_updateProgress_0100', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0100 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0100 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0100 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0100 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0100 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_0100 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0100 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0100', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0200
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to 5
*/
it('ArkUX_Stage_Progress_updateProgress_0200', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0200 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0200 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0200 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0200 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0200 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(5);
console.info('ArkUX_Stage_Progress_updateProgress_0200 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0200 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0200', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0300
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to "6"
*/
it('ArkUX_Stage_Progress_updateProgress_0300', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0300 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0300 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0300 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0300 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0300 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_0300 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0300 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0300', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0400
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to ""
*/
it('ArkUX_Stage_Progress_updateProgress_0400', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0400 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0400 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0400 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0400 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0400 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_0400 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0400 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0400', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0500
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to null
*/
it('ArkUX_Stage_Progress_updateProgress_0500', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0500 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0500 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0500 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0500 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0500 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_0500 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0500 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0500', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0600
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to undefined
*/
it('ArkUX_Stage_Progress_updateProgress_0600', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0600 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0600 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0600 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0600 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0600 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_0600 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0600 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0600', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0700
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to -2
*/
it('ArkUX_Stage_Progress_updateProgress_0700', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0700 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0700 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0700 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0700 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0700 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_0700 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0700 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0700', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0800
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to "10%"
*/
it('ArkUX_Stage_Progress_updateProgress_0800', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0800 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0800 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0800 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0800 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0800 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_0800 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0800 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0800', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_0900
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to normal twice
*/
it('ArkUX_Stage_Progress_updateProgress_0900', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_0900 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_0900 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_0900 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_0900 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_0900 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(1);
console.info('ArkUX_Stage_Progress_updateProgress_0900 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_0900 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_0900', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_1000
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to normal first and then abnormal
*/
it('ArkUX_Stage_Progress_updateProgress_1000', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_1000 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_1000 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_1000 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_1000 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_1000 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(0);
console.info('ArkUX_Stage_Progress_updateProgress_1000 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateProgress_1000 ERR ' + JSON.stringify(err));
}
done();
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_1000', 10, '')
expect(result).assertEqual(true);
}, 1000)
});
/*
*tc.number ArkUX_Stage_Progress_updateProgress_1100
*tc.name Tests the updateProgress property of the Progress component
*tc.desc Set the updateProgress property parameter to first exception and then normal
*/
it('ArkUX_Stage_Progress_updateProgress_1100', 0, async function (done) {
console.info('ArkUX_Stage_Progress_updateProgress_1100 START');
setTimeout(async () => {
try {
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateProgress_1100 START :' + JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_updateProgress_1100 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_updateProgress_1100 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateProgress_1100 component obj.$attrs.updateProgress is: " +
JSON.stringify(obj.$attrs.updateProgress));
expect(obj.$attrs.updateProgress).assertEqual(5);
console.info('ArkUX_Stage_Progress_updateProgress_1100 END ');
} catch (err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_updateColor_1600 ERR '+ JSON.stringify(err));
console.info('ArkUX_Stage_Progress_updateProgress_1100 ERR ' + JSON.stringify(err));
}
done();
},3000)
setTimeout(async()=>{
let result = sendEventByKey('ArkUX_Stage_Progress_updateColor_Button_1600',10,'')
}, 3000)
setTimeout(async () => {
let result = sendEventByKey('ArkUX_Stage_Progress_updateProgress_Button_1100', 10, '')
expect(result).assertEqual(true);
},1000)
}, 1000)
});
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册