未验证 提交 957b8a4c 编写于 作者: O openharmony_ci 提交者: Gitee

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

Merge pull request !2696 from dy/OpenHarmony-3.1-Release
......@@ -258,4 +258,157 @@ describe('ActsContextTest', function () {
expect("false").assertEqual(stageMode1.toString());
done();
})
/*
* @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');
})
})
......@@ -2388,4 +2388,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.
先完成此消息的编辑!
想要评论请 注册