Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1d346ac2
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1d346ac2
编写于
4月 11, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 11, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8416 xts-窗口生命周期相关用例修改
Merge pull request !8416 from chengxingzhen/master
上级
7a9e175f
92a56339
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
103 addition
and
44 deletion
+103
-44
ability/ability_runtime/apicover/apicoverhaptest/Test.json
ability/ability_runtime/apicover/apicoverhaptest/Test.json
+9
-1
ability/ability_runtime/apitest/Test.json
ability/ability_runtime/apitest/Test.json
+9
-1
ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets
..._runtime/apitest/entry/src/main/ets/test/Ability.test.ets
+7
-5
ability/ability_runtime/stage/actslifecyclesinglehaptest/Test.json
...bility_runtime/stage/actslifecyclesinglehaptest/Test.json
+9
-1
ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
...lesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
+28
-23
ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/Test.json
...time/stage/actswindowstagelifecyclemultihaptest/Test.json
+9
-1
ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/entry/src/main/ets/test/LifecycleTest.ets
...clemultihaptest/entry/src/main/ets/test/LifecycleTest.ets
+10
-4
ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/Test.json
...ime/stage/actswindowstagelifecyclesinglehaptest/Test.json
+9
-1
ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
...lesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
+13
-7
未找到文件。
ability/ability_runtime/apicover/apicoverhaptest/Test.json
浏览文件 @
1d346ac2
...
...
@@ -18,6 +18,14 @@
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
]
}
ability/ability_runtime/apitest/Test.json
浏览文件 @
1d346ac2
...
...
@@ -15,7 +15,15 @@
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
]
}
ability/ability_runtime/apitest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
1d346ac2
...
...
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, beforeAll,
beforeEach, afterEach, afterAll,
it, expect } from '@ohos/hypium'
import { describe, beforeAll, it, expect } from '@ohos/hypium'
import commonEvent from '@ohos.commonEvent'
var subscriberInfo_MainAbility = {
...
...
@@ -103,7 +103,12 @@ export default function abilityTest() {
})
function timeout() {
if (flag == true) {
expect().assertFail();
try {
expect().assertFail();
} catch (error) {
console.log(`ACTS_DoAbilityForeground_0100 startRunning failed: ${JSON.stringify(error)}`);
done();
}
console.log('ACTS_DoAbilityForeground_0100 - timeout');
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
}
...
...
@@ -111,8 +116,6 @@ export default function abilityTest() {
setTimeout(timeout, START_ABILITY_TIMEOUT);
})
/*
* @tc.number : ACTS_DoAbilityForeground_0200
* @tc.name : change abilitystage to foreground
...
...
@@ -139,7 +142,6 @@ export default function abilityTest() {
})
})
/*
* @tc.number : ACTS_DoAbilityForeground_0400
* @tc.name : change abilitystage to foreground
...
...
ability/ability_runtime/stage/actslifecyclesinglehaptest/Test.json
浏览文件 @
1d346ac2
...
...
@@ -15,6 +15,14 @@
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
]
}
ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
浏览文件 @
1d346ac2
...
...
@@ -729,28 +729,33 @@ export default function lifecycleTest() {
console.log(TAG + " listtemp1 is :" + listtemp1);
let exlist = listtemp;
let exlist1 = listtemp1;
expect(exlist[0]).assertEqual("MainAbility1 onWindowStageCreate");
expect(exlist[1]).assertEqual("MainAbility1 onAbilityForeground");
expect(exlist[2]).assertEqual("MainAbility1 onAbilityBackground");
expect(exlist[3]).assertEqual("MainAbility1 onAbilityForeground");
expect(exlist[4]).assertEqual("MainAbility1 onAbilityBackground");
expect(exlist[5]).assertEqual("MainAbility1 onAbilityForeground");
expect(exlist[6]).assertEqual("MainAbility1 onAbilityBackground");
expect(exlist1[0]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist1[1]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist1[2]).assertEqual("MainAbility2 onAbilityForeground");
expect(exlist1[3]).assertEqual("MainAbility2 onAbilityBackground");
expect(exlist1[4]).assertEqual("MainAbility2 onWindowStageDestroy");
expect(exlist1[5]).assertEqual("MainAbility2 onAbilityDestroy");
expect(exlist1[6]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist1[7]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist1[8]).assertEqual("MainAbility2 onAbilityForeground");
expect(exlist1[9]).assertEqual("MainAbility2 onAbilityBackground");
expect(exlist1[10]).assertEqual("MainAbility2 onWindowStageDestroy");
expect(exlist1[11]).assertEqual("MainAbility2 onAbilityDestroy");
expect(exlist1[12]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist1[13]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist1[14]).assertEqual("MainAbility2 onAbilityForeground");
try {
expect(exlist[0]).assertEqual("MainAbility1 onWindowStageCreate");
expect(exlist[1]).assertEqual("MainAbility1 onAbilityForeground");
expect(exlist[2]).assertEqual("MainAbility1 onAbilityBackground");
expect(exlist[3]).assertEqual("MainAbility1 onAbilityForeground");
expect(exlist[4]).assertEqual("MainAbility1 onAbilityBackground");
expect(exlist[5]).assertEqual("MainAbility1 onAbilityForeground");
expect(exlist[6]).assertEqual("MainAbility1 onAbilityBackground");
expect(exlist1[0]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist1[1]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist1[2]).assertEqual("MainAbility2 onAbilityForeground");
expect(exlist1[3]).assertEqual("MainAbility2 onAbilityBackground");
expect(exlist1[4]).assertEqual("MainAbility2 onWindowStageDestroy");
expect(exlist1[5]).assertEqual("MainAbility2 onAbilityDestroy");
expect(exlist1[6]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist1[7]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist1[8]).assertEqual("MainAbility2 onAbilityForeground");
expect(exlist1[9]).assertEqual("MainAbility2 onAbilityBackground");
expect(exlist1[10]).assertEqual("MainAbility2 onWindowStageDestroy");
expect(exlist1[11]).assertEqual("MainAbility2 onAbilityDestroy");
expect(exlist1[12]).assertEqual("MainAbility2 onAbilityCreate");
expect(exlist1[13]).assertEqual("MainAbility2 onWindowStageCreate");
expect(exlist1[14]).assertEqual("MainAbility2 onAbilityForeground");
} catch (error) {
console.error(`${TAG} startRunning failed: ${JSON.stringify(error)}`);
done();
}
globalThis.applicationContext1
.unregisterAbilityLifecycleCallback(globalThis.callbackid1, (error, data) => {
console.log(TAG + ": unregisterAbilityLifecycleCallback success, err: " + JSON.stringify(error) +
...
...
@@ -758,7 +763,7 @@ export default function lifecycleTest() {
console.log("------------Singlehap_LifeCycleTest_0800 END-------------");
done();
});
},
4
950);
},
5
950);
});
/*
...
...
ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/Test.json
浏览文件 @
1d346ac2
...
...
@@ -17,6 +17,14 @@
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
]
}
ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/entry/src/main/ets/test/LifecycleTest.ets
浏览文件 @
1d346ac2
...
...
@@ -92,10 +92,16 @@ export default function abilityTest() {
}
console.log(TAG + "listKeyTemp is :" + listKeyTemp);
console.log(TAG + "globalThis.mainAbility4CallBackId is :" + globalThis.mainAbility4CallBackId);
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageCreate")!=-1).assertTrue();
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageActive")!=-1).assertTrue();
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageInactive")!=-1).assertTrue();
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageDestroy")!=-1).assertTrue();
try {
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageCreate")!=-1).assertTrue();
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageActive")!=-1).assertTrue();
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageInactive")!=-1).assertTrue();
expect(transferStr0.indexOf("Hap2MainAbility3 onWindowStageDestroy")!=-1).assertTrue();
} catch (error) {
console.log(`Multihap_WindowStageLifecycleTest_001 startRunning failed: ${JSON.stringify(error)}`);
done();
}
console.info(TAG + "globalThis.ApplicationContext4 is :" + JSON.stringify(globalThis.ApplicationContext4));
globalThis.ApplicationContext4
.unregisterAbilityLifecycleCallback(globalThis.mainAbility4CallBackId, (error, data) => {
...
...
ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/Test.json
浏览文件 @
1d346ac2
...
...
@@ -15,6 +15,14 @@
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"power-shell wakeup"
,
"power-shell setmode 602"
,
"uinput -T -d 300 600 -m 300 600 300 100 -u 300 100"
]
}
]
}
ability/ability_runtime/stage/actswindowstagelifecyclesinglehaptest/entry/src/main/ets/test/LifeCycleTest.ets
浏览文件 @
1d346ac2
...
...
@@ -88,6 +88,7 @@ export default function lifecycleTest() {
}).catch((error) => {
console.error(TAG + ' start failed. Cause: ' + JSON.stringify(error));
})
setTimeout(function () {
console.log(TAG + " registerAbilityLifecycleCallback listKey : " + JSON.stringify(globalThis.list));
console.log(TAG + " registerAbilityLifecycleCallback callbackid : " + JSON.stringify(globalThis.callbackid));
...
...
@@ -111,13 +112,18 @@ export default function lifecycleTest() {
code = error.code;
});
setTimeout(function () {
expect(transferStr0.indexOf("MainAbility2 onWindowStageCreate")!=-1).assertTrue();
expect(transferStr0.indexOf("MainAbility2 onWindowStageActive")!=-1).assertTrue();
expect(transferStr0.indexOf("MainAbility2 onWindowStageInactive")!=-1).assertTrue();
expect(transferStr0.indexOf("MainAbility2 onWindowStageDestroy")!=-1).assertTrue();
expect(code).assertEqual(0);
console.log("------------Singlehap_WindowStageLifeCycleTest_0100 END-------------");
done();
try {
expect(transferStr0.indexOf("MainAbility2 onWindowStageCreate")!=-1).assertTrue();
expect(transferStr0.indexOf("MainAbility2 onWindowStageActive")!=-1).assertTrue();
expect(transferStr0.indexOf("MainAbility2 onWindowStageInactive")!=-1).assertTrue();
expect(transferStr0.indexOf("MainAbility2 onWindowStageDestroy")!=-1).assertTrue();
expect(code).assertEqual(0);
done();
console.log("------------Singlehap_WindowStageLifeCycleTest_0100 END-------------");
} catch (error) {
console.log(`Singlehap_WindowStageLifeCycleTest_0100 startRunning failed : ${JSON.stringify(error)}`);
done();
}
}, 1000);
}, 3000);
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录