Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6aa4ffd8
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看板
提交
6aa4ffd8
编写于
12月 28, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xts-失败用例适配
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
c6b4d17f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
174 addition
and
9 deletion
+174
-9
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/ContextJsunit.test.ets
...geretstest/entry/src/main/ets/test/ContextJsunit.test.ets
+28
-1
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/addContextAndAbilityJsunit.test.ets
...try/src/main/ets/test/addContextAndAbilityJsunit.test.ets
+29
-2
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
...est/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
+28
-1
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getAppVersionInfoJsunit.test.ets
.../entry/src/main/ets/test/getAppVersionInfoJsunit.test.ets
+29
-1
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getApplicationContextJsunit.test.ets
...ry/src/main/ets/test/getApplicationContextJsunit.test.ets
+29
-1
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getHapModuleInfoJsunit.test.ets
...t/entry/src/main/ets/test/getHapModuleInfoJsunit.test.ets
+29
-3
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
...rhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
+2
-0
未找到文件。
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/ContextJsunit.test.ets
浏览文件 @
6aa4ffd8
...
...
@@ -14,11 +14,38 @@
*/
import featureAbility from '@ohos.ability.featureAbility'
import {describe, beforeEach, afterEach, it, expect} from '@ohos/hypium';
import {describe, beforeEach, afterEach,
beforeAll, afterAll,
it, expect} from '@ohos/hypium';
import Utils from './Utils';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
export default function ContextJsunit() {
describe('faContextTest', function () {
let TAG1 = "SUB_AA_OpenHarmony == faContextTest: ";
let sleepTimeOne = 1000;
let id = undefined;
beforeAll(async (done) => {
console.log(TAG1 + "beforeAll called");
let myReason = 'test FaShowOnLockTest';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.log(TAG1 + "Request suspension delay will time out.");
})
id = delayInfo.requestId;
console.log(TAG1 + "requestId is : " + id);
setTimeout(function () {
console.log(TAG1 + "beforeAll end");
done();
}, sleepTimeOne);
})
afterAll(async (done) => {
console.log(TAG1 + "afterAll called");
backgroundTaskManager.cancelSuspendDelay(id);
setTimeout(function () {
console.log(TAG1 + "afterAll end");
done();
}, sleepTimeOne);
})
beforeEach(async function (done) {
console.info("context before each called");
done()
...
...
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/addContextAndAbilityJsunit.test.ets
浏览文件 @
6aa4ffd8
...
...
@@ -12,11 +12,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
describe, it, expect
} from '@ohos/hypium';
import {
describe, beforeAll, afterAll, it, expect
} from '@ohos/hypium';
import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility';
import ability_particleAbility from '@ohos.ability.particleAbility';
import abilityManager from "@ohos.application.appManager"
import backgroundTaskManager from '@ohos.backgroundTaskManager';
const TAG_TEST_0100 = ' context_isUpdatingConfigurations_test_0100 ';
const TAG_TEST_0200 = ' context_isUpdatingConfigurations_test_0200 ';
...
...
@@ -33,6 +33,33 @@ const TAG_TEST_0012 = ' context_featureAbility_test_0400 ';
export default function addContextAndAbilityJsunit() {
describe('addContextTest', function () {
let TAG1 = "SUB_AA_OpenHarmony == addContextTest: ";
let sleepTimeOne = 1000;
let id = undefined;
beforeAll(async (done) => {
console.log(TAG1 + "beforeAll called");
let myReason = 'test FaShowOnLockTest';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.log(TAG1 + "Request suspension delay will time out.");
})
id = delayInfo.requestId;
console.log(TAG1 + "requestId is : " + id);
setTimeout(function () {
console.log(TAG1 + "beforeAll end");
done();
}, sleepTimeOne);
})
afterAll(async (done) => {
console.log(TAG1 + "afterAll called");
backgroundTaskManager.cancelSuspendDelay(id);
setTimeout(function () {
console.log(TAG1 + "afterAll end");
done();
}, sleepTimeOne);
})
/*
* @tc.number: context_isUpdatingConfigurations_test_0100
* @tc.name: isUpdatingConfigurations : Obtains whether the configuration of the current ability is changing.
...
...
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
浏览文件 @
6aa4ffd8
...
...
@@ -12,13 +12,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
describe, it, expect
} from '@ohos/hypium';
import {
describe, beforeAll, afterAll, it, expect
} from '@ohos/hypium';
import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
export default function getHapModuleInfoJsunit() {
describe('getAbilityInfoTest', function () {
let TAG1 = "SUB_AA_OpenHarmony == getAbilityInfoTest: ";
let sleepTimeOne = 1000;
let id = undefined;
beforeAll(async (done) => {
console.log(TAG1 + "beforeAll called");
let myReason = 'test FaShowOnLockTest';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.log(TAG1 + "Request suspension delay will time out.");
})
id = delayInfo.requestId;
console.log(TAG1 + "requestId is : " + id);
setTimeout(function () {
console.log(TAG1 + "beforeAll end");
done();
}, sleepTimeOne);
})
afterAll(async (done) => {
console.log(TAG1 + "afterAll called");
backgroundTaskManager.cancelSuspendDelay(id);
setTimeout(function () {
console.log(TAG1 + "afterAll end");
done();
}, sleepTimeOne);
})
/**
* @tc.number: context_getAbilityInfo_test_0100
* @tc.name: getAbilityInfo:Query the current attributionability details.
...
...
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getAppVersionInfoJsunit.test.ets
浏览文件 @
6aa4ffd8
...
...
@@ -12,12 +12,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
describe, it, expect
} from '@ohos/hypium';
import {
describe, beforeAll, afterAll, it, expect
} from '@ohos/hypium';
import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
export default function getHapModuleInfoJsunit() {
describe('getAppVersionInfoTest', function () {
let TAG1 = "SUB_AA_OpenHarmony == getAppVersionInfoTest: ";
let sleepTimeOne = 1000;
let id = undefined;
beforeAll(async (done) => {
console.log(TAG1 + "beforeAll called");
let myReason = 'test FaShowOnLockTest';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.log(TAG1 + "Request suspension delay will time out.");
})
id = delayInfo.requestId;
console.log(TAG1 + "requestId is : " + id);
setTimeout(function () {
console.log(TAG1 + "beforeAll end");
done();
}, sleepTimeOne);
})
afterAll(async (done) => {
console.log(TAG1 + "afterAll called");
backgroundTaskManager.cancelSuspendDelay(id);
setTimeout(function () {
console.log(TAG1 + "afterAll end");
done();
}, sleepTimeOne);
})
/**
* @tc.number: context_getAppVersionInfo_test_0100
* @tc.name: getAppVersionInfo:Gets the version information for the application.
...
...
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getApplicationContextJsunit.test.ets
浏览文件 @
6aa4ffd8
...
...
@@ -12,12 +12,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
describe, it, expect
} from '@ohos/hypium';
import {
describe, beforeAll, afterAll, it, expect
} from '@ohos/hypium';
import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
export default function getHapModuleInfoJsunit() {
describe('getApplicationContextTest', function () {
let TAG1 = "SUB_AA_OpenHarmony == getApplicationContextTest: ";
let sleepTimeOne = 1000;
let id = undefined;
beforeAll(async (done) => {
console.log(TAG1 + "beforeAll called");
let myReason = 'test FaShowOnLockTest';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.log(TAG1 + "Request suspension delay will time out.");
})
id = delayInfo.requestId;
console.log(TAG1 + "requestId is : " + id);
setTimeout(function () {
console.log(TAG1 + "beforeAll end");
done();
}, sleepTimeOne);
})
afterAll(async (done) => {
console.log(TAG1 + "afterAll called");
backgroundTaskManager.cancelSuspendDelay(id);
setTimeout(function () {
console.log(TAG1 + "afterAll end");
done();
}, sleepTimeOne);
})
/**
* @tc.number: context_getApplicationContext_test_0100
* @tc.name: getApplicationContext:Gets the application context information.
...
...
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getHapModuleInfoJsunit.test.ets
浏览文件 @
6aa4ffd8
...
...
@@ -12,14 +12,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
describe, it, expect
} from '@ohos/hypium';
import {
describe, beforeAll, afterAll, it, expect
} from '@ohos/hypium';
import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
export default function getHapModuleInfoJsunit() {
describe('getHapModuleInfoTest', function () {
let TAG1 = "SUB_AA_OpenHarmony == getHapModuleInfoTest: ";
let sleepTimeOne = 1000;
let id = undefined;
beforeAll(async (done) => {
console.log(TAG1 + "beforeAll called");
let myReason = 'test FaShowOnLockTest';
let delayInfo = backgroundTaskManager.requestSuspendDelay(myReason, () => {
console.log(TAG1 + "Request suspension delay will time out.");
})
id = delayInfo.requestId;
console.log(TAG1 + "requestId is : " + id);
setTimeout(function () {
console.log(TAG1 + "beforeAll end");
done();
}, sleepTimeOne);
})
afterAll(async (done) => {
console.log(TAG1 + "afterAll called");
backgroundTaskManager.cancelSuspendDelay(id);
setTimeout(function () {
console.log(TAG1 + "afterAll end");
done();
}, sleepTimeOne);
})
/**
* @tc.number: context_getHapModuleInfo_test_0100
* @tc.name: getHapModuleInfo:Obtains the HapModuleInfo object of the application.
...
...
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
浏览文件 @
6aa4ffd8
...
...
@@ -642,6 +642,7 @@ export default function ApiCoverTest() {
console
.
info
(
"SUB_AA_FMS_AbilityStage_0100===AbilityStage==="
+
JSON
.
stringify
(
globalThis
.
stageContext
))
console
.
info
(
"SUB_AA_FMS_AbilityStage_0100===AbilityStage==="
+
JSON
.
stringify
(
globalThis
.
stageContext
.
config
))
let
directions
=
globalThis
.
stageContext
.
config
.
direction
let
pointer
=
globalThis
.
stageContext
.
config
.
hasPointerDevice
let
subscriber
=
null
let
subscribeInfo
=
{
events
:
[
"AbilityStage_StartAbility"
]
...
...
@@ -654,6 +655,7 @@ export default function ApiCoverTest() {
console
.
info
(
"SUB_AA_FMS_AbilityStage_0100===SubscribeInfoCallback==="
+
JSON
.
stringify
(
data
))
expect
(
data
.
parameters
[
"config"
])
.
assertEqual
(
-
1
)
expect
(
data
.
parameters
[
"config"
])
.
assertEqual
(
directions
)
expect
(
pointer
)
.
assertFalse
()
commonEvent
.
unsubscribe
(
subscriber
,
UnSubscribeInfoCallback
)
await
sleep
(
4000
)
done
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录