提交 58fd7513 编写于 作者: D dy_study

IssueNo:接口能力补齐与整改对应测试用例补充

Description:接口能力补齐与整改对应测试用例补充
Sig:SIG_ApplicationFramework
Feature or Bugfix: Feature
Binary Source: No
Signed-off-by: Ndy_study <dingyao5@huawei.com>
Change-Id: I75aa847c69b9f150a763347a281682a77818add7
上级 bc78002e
......@@ -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
......@@ -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');
})
})
......@@ -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.
先完成此消息的编辑!
想要评论请 注册