Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
bbbbb0e7
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看板
未验证
提交
bbbbb0e7
编写于
3月 15, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2457 接口能力补齐与整改对应测试用例补充
Merge pull request !2457 from dy/master
上级
aa2988b9
58fd7513
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
206 addition
and
0 deletion
+206
-0
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/addContextAndAbilityJsunit.test.ets
.../ets/MainAbility/test/addContextAndAbilityJsunit.test.ets
+16
-0
aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js
...scontexttest/entry/src/main/js/test/ContextJsunit.test.js
+152
-0
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+38
-0
未找到文件。
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/addContextAndAbilityJsunit.test.ets
浏览文件 @
bbbbb0e7
...
...
@@ -15,6 +15,7 @@
import {describe, it, expect} from "deccjsunit/index.ets";
import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility';
import ability_particleAbility from '@ohos.ability.particleAbility';
import abilityManager from "@ohos.app.abilitymanager"
const TAG_TEST_0100 = ' context_isUpdatingConfigurations_test_0100 ';
...
...
@@ -29,6 +30,7 @@ const TAG_TEST_0900 = ' context_featureAbility_test_0100 ';
const TAG_TEST_0010 = ' context_featureAbility_test_0200 ';
const TAG_TEST_0011 = ' context_featureAbility_test_0300 ';
const TAG_TEST_0012 = ' context_featureAbility_test_0400 ';
const TAG_TEST_0013 = ' context_particleAbility_test_0100 ';
export default function addContextAndAbilityJsunit() {
describe('appInfoTest', function () {
...
...
@@ -296,5 +298,19 @@ export default function addContextAndAbilityJsunit() {
done();
console.log('------------------ ' + TAG_TEST_0012 + ' end -------------------');
});
/*
* @tc.number: context_particleAbility_test_0100
* @tc.name: particleAbility.ErrorCode : particleAbility.ErrorCode
* @tc.desc: Check the particleAbility.ErrorCode.INVALID_PARAMETER
* @tc.level 0
*/
it(TAG_TEST_0013, 0, async function (done) {
console.info(TAG_TEST_0013 + ' INVALID_PARAMETER START');
var invalid_parameter = ability_particleAbility.ErrorCode.INVALID_PARAMETER
console.info(TAG_TEST_0013 + ' featureAbility invalid_parameter is: ' + invalid_parameter);
done();
console.log('------------------ ' + TAG_TEST_0013 + ' end -------------------');
});
})
}
\ No newline at end of file
aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js
浏览文件 @
bbbbb0e7
...
...
@@ -245,4 +245,156 @@ describe('ActsContextTest', function () {
},
1000
)
})
/*
* @tc.number: ACTS_GetDisplayOrientation_0100
* @tc.name: context.getDisplayOrientation : Get an ability display orientation.
* @tc.desc: Check the return display orientation of the interface (by AsyncCallback)
*/
it
(
'
ACTS_GetDisplayOrientation_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_GetDisplayOrientation_0100====<begin
'
);
try
{
context
.
getDisplayOrientation
((
err
,
data
)
=>
{
console
.
log
(
'
getDisplayOrientation call back
'
);
done
();
});
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_GetDisplayOrientation_0100====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_GetDisplayOrientation_0100====<end
'
);
})
/*
* @tc.number: ACTS_GetDisplayOrientation_0200
* @tc.name: context.getDisplayOrientation : Get an ability display orientation.
* @tc.desc: Check the return display orientation of the interface
*/
it
(
'
ACTS_GetDisplayOrientation_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_GetDisplayOrientation_0200====<begin
'
);
try
{
var
displayOrientation
=
context
.
getDisplayOrientation
();
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_GetDisplayOrientation_0200====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_GetDisplayOrientation_0200====<end
'
);
})
/*
* @tc.number: ACTS_SetDisplayOrientation_0100
* @tc.name: context.setDisplayOrientation : Set an ability display orientation.
* @tc.desc: Check the return display orientation of the interface (by AsyncCallback)
*/
it
(
'
ACTS_SetDisplayOrientation_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_SetDisplayOrientation_0100====<begin
'
);
try
{
context
.
setDisplayOrientation
(
true
,
(
err
,
data
)
=>
{
console
.
log
(
'
SetDisplayOrientation call back
'
);
done
();
});
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_SetDisplayOrientation_0100====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_SetDisplayOrientation_0100====<end
'
);
})
/*
* @tc.number: ACTS_SetDisplayOrientation_0200
* @tc.name: context.setDisplayOrientation : Set an ability display orientation.
* @tc.desc: Check the return display orientation of the interface
*/
it
(
'
ACTS_SetDisplayOrientation_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_SetDisplayOrientation_0200====<begin
'
);
try
{
context
.
setDisplayOrientation
(
true
);
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_SetDisplayOrientation_0200====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_SetDisplayOrientation_0200====<end
'
);
})
/*
* @tc.number: ACTS_SetShowOnLockScreen_0100
* @tc.name: context.setShowOnLockScreen : Set an ability show on lock screen.
* @tc.desc: Check the return show on lock screen status of the interface (by AsyncCallback)
*/
it
(
'
ACTS_SetShowOnLockScreen_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_SetShowOnLockScreen_0100====<begin
'
);
try
{
context
.
setShowOnLockScreen
(
true
,
(
err
,
data
)
=>
{
console
.
log
(
'
SetShowOnLockScreen call back
'
);
done
();
});
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_SetShowOnLockScreen_0100====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_SetShowOnLockScreen_0100====<end
'
);
})
/*
* @tc.number: ACTS_SetShowOnLockScreen_0200
* @tc.name: context.setShowOnLockScreen : Set an ability show on lock screen.
* @tc.desc: Check the return show on lock screen status of the interface
*/
it
(
'
ACTS_SetShowOnLockScreen_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_SetShowOnLockScreen_0200====<begin
'
);
try
{
context
.
setShowOnLockScreen
(
true
);
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_SetShowOnLockScreen_0200====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_SetShowOnLockScreen_0200====<end
'
);
})
/*
* @tc.number: ACTS_SetWakeUpScreen_0100
* @tc.name: context.setWakeUpScreen : Set an ability wake up screen.
* @tc.desc: Check the return wake up screen status of the interface (by AsyncCallback)
*/
it
(
'
ACTS_SetWakeUpScreen_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_SetWakeUpScreen_0100====<begin
'
);
try
{
context
.
setWakeUpScreen
(
true
,
(
err
,
data
)
=>
{
console
.
log
(
'
setWakeUpScreen call back
'
);
done
();
});
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_SetWakeUpScreen_0100====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_SetWakeUpScreen_0100====<end
'
);
})
/*
* @tc.number: ACTS_SetWakeUpScreen_0200
* @tc.name: context.setWakeUpScreen : Set an ability wake up screen.
* @tc.desc: Check the return wake up screen status of the interface
*/
it
(
'
ACTS_SetWakeUpScreen_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_SetWakeUpScreen_0200====<begin
'
);
try
{
context
.
setWakeUpScreen
(
true
);
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_SetWakeUpScreen_0200====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_SetWakeUpScreen_0200====<end
'
);
})
})
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
bbbbb0e7
...
...
@@ -2855,4 +2855,42 @@ describe('ActsFeatureAbilityTest', function () {
done
();
}
});
/*
* @tc.number: ACTS_StartAbility_0100
* @tc.name: featureAbility.getWindow : Get an ability window.
* @tc.desc: Check the return window of the interface (by AsyncCallback)
*/
it
(
'
ACTS_StartAbility_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_StartAbility_0100====<begin
'
);
try
{
featureAbility
.
getWindow
((
err
,
data
)
=>
{
console
.
log
(
'
getWindow call back
'
);
done
();
});
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_StartAbility_0100====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_StartAbility_0100====<end
'
);
})
/*
* @tc.number: ACTS_StartAbility_0200
* @tc.name: featureAbility.getWindow : Get an ability window.
* @tc.desc: Check the return window of the interface
*/
it
(
'
ACTS_StartAbility_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_StartAbility_0200====<begin
'
);
try
{
var
window
=
featureAbility
.
getWindow
();
done
();
}
catch
(
err
)
{
console
.
log
(
'
ACTS_StartAbility_0200====<end err=
'
+
err
)
done
();
}
console
.
log
(
'
ACTS_StartAbility_0200====<end
'
);
})
})
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录