提交 f3a8bd07 编写于 作者: C chengxingzhen

XTS系统api下库

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 a73d4f00
......@@ -122,6 +122,62 @@ describe('ActsStServiceAbilityTest', function () {
}
})
/**
* @tc.number: ACTS_AAACommand_0100
* @tc.name: Hide this for inner system use.
* @tc.desc: VHide this for inner system use successfully.
*/
it('ACTS_AAACommand_0100', 0, async function (done) {
console.log("ACTS_AAACommand_0100 --- start")
var currentAlertTimeout = 0;
try {
currentAlertTimeout = setTimeout(mySetTimeout, gSetTimeout);
function mySetTimeout() {
console.log('ACTS_AAACommand_0100====<end mySetTimeout')
done();
}
var AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
AbilityDelegator.finishTest(msg, 1, () => {
console.log("ACTS_AAACommand_0100 finishTest test end ========> callback ")
done()
})
} catch (error) {
clearTimeout(currentAlertTimeout);
console.log("ACTS_AAACommand_0100 : error = " + error);
console.debug('ACTS_AAACommand_0100====<end catch (error)');
done();
}
})
/**
* @tc.number: ACTS_AAACommand_1200
* @tc.name: Hide this for inner system use.
* @tc.desc: VHide this for inner system use successfully.
*/
it('ACTS_AAACommand_1200', 0, async function (done) {
console.log("ACTS_AAACommand_1200 --- start")
var currentAlertTimeout = 0;
try {
currentAlertTimeout = setTimeout(mySetTimeout, gSetTimeout);
function mySetTimeout() {
console.log('ACTS_AAACommand_1200====<end mySetTimeout')
done();
}
var AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
AbilityDelegator.finishTest(msg, Number.MAX_VALUE).then(() => {
console.log("ACTS_AAACommand_1200 finishTest test end ========> callback ")
done()
})
} catch (error) {
clearTimeout(currentAlertTimeout);
console.log("ACTS_AAACommand_1200 : error = " + error);
console.debug('ACTS_AAACommand_1200====<end catch (error)');
done();
}
})
/**
* @tc.number: ACTS_AGetDisplayOrientation_0100
* @tc.name: GetDisplayOrientation
......
......@@ -2157,42 +2157,4 @@ 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');
})
})
......@@ -62,28 +62,6 @@ describe('ConnectAbilityTest', function () {
})
})
/*
* @tc.number: SUB_AA_JsApi_Ability_0400
* @tc.name: testAbility0400.
* @tc.desc: StartAbility-want only configure action (implicit start) - Ability
* without corresponding action (custom action).
*/
it("SUB_AA_JsApi_Ability_0400", 0, async function (done) {
let parameter = {
'want': {
'action': 'action.com.example.mytestw.TwoAbility123'
}
}
await featureAbility.startAbility(parameter).then((data) => {
console.log('testAbility0600 data: ' + JSON.stringify(data))
expect().assertFail()
}).catch((error) => {
console.log('testAbility0600 error: ' + JSON.stringify(error))
expect(errCode1).assertEqual(error.code)
})
done()
})
/*
* @tc.number: SUB_AA_JsApi_Ability_0500
* @tc.name: testAblity0500.
......
......@@ -23,6 +23,39 @@ export default {
},
onShow() {
console.info('============Start Ability onShow finish');
featureAbility.getWant(
(err, data) => {
data = data;
console.debug("==========data=" + JSON.stringify(data));
if (data.parameters.mykey5[1] == 'test123'){
featureAbility.getWant().then((data) =>{
data = data
setTimeout(function(){
console.debug("==========data2 bundleName is==========="
+ JSON.stringify(data.bundleName));
featureAbility.terminateSelfWithResult(
{
resultCode: 1,
want: data
}
);
},1000);
})
}else{
setTimeout(function(){
console.debug("==========data1 bundleName is==========="
+ JSON.stringify(data.bundleName));
featureAbility.terminateSelfWithResult(
{
resultCode: 1,
want: data
}
);
},1000);
}
}
)
},
onReady() {
console.info('onReady');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册