Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4bbd8b3a
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看板
未验证
提交
4bbd8b3a
编写于
12月 30, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
!7044 xts-失败用例适配
Merge pull request !7044 from chengxingzhen/master
上级
969f266f
ff258d04
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
180 addition
and
52 deletion
+180
-52
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/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json
...unction/actsonandoffscreentest/entry/src/main/module.json
+0
-10
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/signature/openharmony_sx.p7b
...ction/actsonandoffscreentest/signature/openharmony_sx.p7b
+0
-0
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/featureability/actsfeatureabilitytest/entry/src/main/config.json
...ability/actsfeatureabilitytest/entry/src/main/config.json
+2
-29
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+4
-4
ability/ability_runtime/featureability/actsfeatureabilitytest/signature/openharmony_sx.p7b
...ility/actsfeatureabilitytest/signature/openharmony_sx.p7b
+0
-0
未找到文件。
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/ContextJsunit.test.ets
浏览文件 @
4bbd8b3a
...
...
@@ -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
浏览文件 @
4bbd8b3a
...
...
@@ -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
浏览文件 @
4bbd8b3a
...
...
@@ -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
浏览文件 @
4bbd8b3a
...
...
@@ -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
浏览文件 @
4bbd8b3a
...
...
@@ -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
浏览文件 @
4bbd8b3a
...
...
@@ -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/actssupportfunction/actsonandoffscreentest/entry/src/main/module.json
浏览文件 @
4bbd8b3a
...
...
@@ -35,16 +35,6 @@
}
]
}
],
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.START_ABILITIES_FROM_BACKGROUND"
,
"reason"
:
"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
},
{
"name"
:
"ohos.permission.START_INVISIBLE_ABILITY"
,
"reason"
:
"need use ohos.permission.START_INVISIBLE_ABILITY"
}
]
}
}
\ No newline at end of file
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/signature/openharmony_sx.p7b
浏览文件 @
4bbd8b3a
无法预览此类型文件
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
浏览文件 @
4bbd8b3a
...
...
@@ -586,6 +586,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"
]
...
...
@@ -598,6 +599,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
()
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json
浏览文件 @
4bbd8b3a
...
...
@@ -14,7 +14,6 @@
},
"deviceConfig"
:
{
"default"
:
{
"process"
:
"processTestAbility"
}
},
"module"
:
{
...
...
@@ -55,7 +54,6 @@
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"singleton"
,
"process"
:
"processTestAbility"
,
"permissions"
:
[
"ohos.permission.ACCELEROMETER"
],
"deviceCapability"
:
[
"SystemCapability.Ability.AbilityBase"
],
"uri"
:
"uriTest"
,
...
...
@@ -75,8 +73,7 @@
"launchType"
:
"singleton"
,
"permissions"
:
[
"ohos.permission.ACCELEROMETER"
],
"deviceCapability"
:
[
"SystemCapability.Ability.AbilityBase"
],
"uri"
:
"uriTest"
,
"process"
:
"processTestAbility"
"uri"
:
"uriTest"
}
],
"reqCapabilities"
:
[
"reqCapabilitiesTest1"
,
"reqCapabilitiesTest2"
],
...
...
@@ -96,36 +93,12 @@
"when"
:
"always"
}
},
{
"name"
:
"ohos.permission.INSTALL_BUNDLE"
,
"reason"
:
"need use ohos.permission.INSTALL_BUNDLE"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
,
"reason"
:
"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name"
:
"ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
,
"reason"
:
"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name"
:
"ohos.permission.REMOVE_CACHE_FILES"
,
"reason"
:
"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name"
:
"ohos.permission.LISTEN_BUNDLE_CHANGE"
,
"reason"
:
"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name"
:
"ohos.permission.KEEP_BACKGROUND_RUNNING"
},
{
"name"
:
"ohos.permission.ACCELEROMETER"
,
"reason"
:
"need use ohos.permission.ACCELEROMETER"
},
{
"name"
:
"ohos.permission.START_ABILITIES_FROM_BACKGROUND"
,
"reason"
:
"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
"name"
:
"ohos.permission.KEEP_BACKGROUND_RUNNING"
}
],
"js"
:
[
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
4bbd8b3a
...
...
@@ -905,7 +905,7 @@ describe('ActsFeatureAbilityTest', function () {
// expect(info.labelId).assertEqual(0); //create by DevEco when building HAP.
expect
(
info
.
icon
).
assertEqual
(
"
$media:icon
"
);
// expect(info.iconId).assertEqual(0); //create by DevEco when building HAP.
expect
(
info
.
process
).
assertEqual
(
"
processTestAbility
"
);
expect
(
info
.
process
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
info
.
supportedModes
).
assertEqual
(
0
);
expect
(
info
.
moduleSourceDirs
[
0
]).
assertEqual
(
"
/data/app/el1/bundle/public/
"
+
"
com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest
"
);
...
...
@@ -965,7 +965,7 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
typeof
(
info
)).
assertEqual
(
"
object
"
);
expect
(
typeof
(
info
.
processName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
info
.
pid
)).
assertEqual
(
"
number
"
);
expect
(
info
.
processName
).
assertEqual
(
"
processTestAbility
"
);
expect
(
info
.
processName
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
}
/**
...
...
@@ -1158,7 +1158,7 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
data
.
moduleName
).
assertEqual
(
"
entry
"
);
expect
(
data
.
process
).
assertEqual
(
"
processTestAbility
"
);
expect
(
data
.
process
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
data
.
targetAbility
).
assertEqual
(
""
);
expect
(
data
.
backgroundModes
).
assertEqual
(
0
);
expect
(
data
.
isVisible
).
assertEqual
(
true
);
...
...
@@ -1304,7 +1304,7 @@ describe('ActsFeatureAbilityTest', function () {
function
checkProcessName
(
info
)
{
console
.
info
(
"
checkProcessName processName :
"
+
info
);
expect
(
typeof
(
info
)).
assertEqual
(
"
string
"
);
expect
(
info
).
assertEqual
(
"
processTestAbility
"
);
expect
(
info
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
}
/**
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/signature/openharmony_sx.p7b
浏览文件 @
4bbd8b3a
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录