未验证 提交 59d5a5fa 编写于 作者: O openharmony_ci 提交者: Gitee

!7210 【OpenHarmony 4.0.2.2】【master】【ARKUI子系统】【TOD】【rk3568】【必现】修改失败xts

Merge pull request !7210 from yupeng/master
...@@ -66,12 +66,12 @@ export default function imageJsunit() { ...@@ -66,12 +66,12 @@ export default function imageJsunit() {
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("imageTest_0200 obj.$attrs.src is: " + obj.$attrs.src); console.info("imageTest_0200 obj.$attrs.src is: " + obj.$attrs.src);
console.info("imageTest_0200 obj.obj.$type is: " + obj.$type); console.info("imageTest_0200 obj.obj.$type is: " + obj.$type);
var res = obj.$attrs.src.indexOf('RAWFILE/test.png'); var res = obj.$attrs.src.indexOf('rawfile/test.png');
console.info("imageTest_0200 result is: " + res); console.info("imageTest_0200 result is: " + res);
var sres = obj.$attrs.src.slice(res, res + 16); var sres = obj.$attrs.src.slice(res, res + 16);
console.info("imageTest_0200 slice result is: " + sres); console.info("imageTest_0200 slice result is: " + sres);
expect(obj.$type).assertEqual('Image'); expect(obj.$type).assertEqual('Image');
expect(obj.$attrs.src.slice(res, res + 16)).assertEqual('RAWFILE/test.png'); expect(obj.$attrs.src.slice(res, res + 16)).assertEqual('rawfile/test.png');
console.info('imageTest_0200 END'); console.info('imageTest_0200 END');
done(); done();
}); });
......
...@@ -70,7 +70,7 @@ export default function buttonJsunit() { ...@@ -70,7 +70,7 @@ export default function buttonJsunit() {
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[testButton02] component obj is: " + JSON.stringify(obj)); console.info("[testButton02] component obj is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Button'); expect(obj.$type).assertEqual('Button');
expect(obj.$attrs.type).assertEqual('ButtonType.Capsule'); expect(obj.$attrs.type).assertEqual('ButtonType.Normal');
done(); done();
}); });
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"bundle-name": "com.open.harmony.acewebthreetest", "bundle-name": "com.open.harmony.acewebthreetest",
"module-name": "phone", "module-name": "phone",
"shell-timeout": "600000", "shell-timeout": "600000",
"testcase-timeout": 70000 "testcase-timeout": "70000"
}, },
"kits": [{ "kits": [{
"test-file-name": [ "test-file-name": [
......
...@@ -72,7 +72,7 @@ struct Index { ...@@ -72,7 +72,7 @@ struct Index {
case "emitLoadUrl":{ case "emitLoadUrl":{
try { try {
setTimeout(()=>{ setTimeout(()=>{
this.controller.loadUrl('www.baidu.com'); this.controller.loadUrl($rawfile("index.html"));
setTimeout(()=>{ setTimeout(()=>{
let title = this.controller.getTitle(); let title = this.controller.getTitle();
Utils.emitEvent(title,1) Utils.emitEvent(title,1)
...@@ -150,7 +150,7 @@ struct Index { ...@@ -150,7 +150,7 @@ struct Index {
this.controller.onInactive(); this.controller.onInactive();
setTimeout(()=>{ setTimeout(()=>{
setTimeout(()=>{ setTimeout(()=>{
this.controller.loadUrl("file:///data/storage/el1/bundle/phone/resources/rawfile/index.html") this.controller.loadUrl("resource://rawfile/index.html")
},3000) },3000)
var title4 = this.controller.getTitle(); var title4 = this.controller.getTitle();
Utils.emitEvent(title4,7) Utils.emitEvent(title4,7)
...@@ -263,7 +263,7 @@ struct Index { ...@@ -263,7 +263,7 @@ struct Index {
} }
case "emitSearchAllAsync":{ case "emitSearchAllAsync":{
try { try {
this.controller.loadUrl("file:///data/storage/el1/bundle/phone/resources/rawfile/index.html") this.controller.loadUrl("resource://rawfile/index.html")
setTimeout(()=>{ setTimeout(()=>{
this.controller.searchAllAsync("首页"); this.controller.searchAllAsync("首页");
},3000) },3000)
......
...@@ -29,9 +29,13 @@ export default class Utils { ...@@ -29,9 +29,13 @@ export default class Utils {
console.info(`[${testCaseName}] START`); console.info(`[${testCaseName}] START`);
try{ try{
let callBack=(backData)=>{ let callBack=(backData)=>{
try{
console.info(`${testCaseName} get result is:`+JSON.stringify(backData)); console.info(`${testCaseName} get result is:`+JSON.stringify(backData));
expect(backData.data.ACTION).assertEqual(expectedValue); expect(backData.data.ACTION).assertEqual(expectedValue);
console.info(`[${testCaseName}] END`); console.info(`[${testCaseName}] END`);
}catch(err){
console.info(`[${testCaseName}] err:`+JSON.stringify(err));
}
done() done()
} }
let innerEvent = { let innerEvent = {
...@@ -64,10 +68,14 @@ export default class Utils { ...@@ -64,10 +68,14 @@ export default class Utils {
console.info(`[${testCaseName}] START`); console.info(`[${testCaseName}] START`);
try{ try{
let callBack=(backData)=>{ let callBack=(backData)=>{
try{
console.info(`${testCaseName} get result is:`+JSON.stringify(backData)); console.info(`${testCaseName} get result is:`+JSON.stringify(backData));
expect(backData.data.actualValue).assertLarger(backData.data.expectedValue-100); expect(backData.data.actualValue).assertLarger(backData.data.expectedValue-100);
expect(backData.data.actualValue).assertLess(backData.data.expectedValue-(-100)); expect(backData.data.actualValue).assertLess(backData.data.expectedValue-(-100));
console.info(`[${testCaseName}] END`); console.info(`[${testCaseName}] END`);
}catch(err){
console.info(`[${testCaseName}] err:`+JSON.stringify(err));
}
done() done()
} }
let innerEvent = { let innerEvent = {
...@@ -101,9 +109,13 @@ export default class Utils { ...@@ -101,9 +109,13 @@ export default class Utils {
console.info(`[${testCaseName}] START`); console.info(`[${testCaseName}] START`);
try{ try{
let callBack=(backData)=>{ let callBack=(backData)=>{
try{
console.info(`${testCaseName} get result is:`+JSON.stringify(backData)); console.info(`${testCaseName} get result is:`+JSON.stringify(backData));
expect(backData.data.ACTION).assertContain(expectedValue); expect(backData.data.ACTION).assertContain(expectedValue);
console.info(`[${testCaseName}] END`); console.info(`[${testCaseName}] END`);
}catch(err){
console.info(`[${testCaseName}] err:`+JSON.stringify(err));
}
done() done()
} }
let innerEvent = { let innerEvent = {
......
...@@ -51,7 +51,7 @@ export default function webJsunit() { ...@@ -51,7 +51,7 @@ export default function webJsunit() {
*/ */
it('LoadUrl',0,async function(done){ it('LoadUrl',0,async function(done){
emitKey="emitLoadData"; emitKey="emitLoadData";
Utils.registerContainEvent("LoadUrl","百度一下,你就知道",1,done); Utils.registerContainEvent("LoadUrl","index",1,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -71,7 +71,7 @@ export default function webJsunit() { ...@@ -71,7 +71,7 @@ export default function webJsunit() {
*/ */
it('Backward',0,async function(done){ it('Backward',0,async function(done){
emitKey="emitForward"; emitKey="emitForward";
Utils.registerEvent("Backward","百度一下,你就知道",3,done); Utils.registerEvent("Backward","index",3,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册