提交 0e0aac78 编写于 作者: Z zwx1016320

optimization input API 1

Signed-off-by: Nzwx1016320 <zhangyushuai1@huawei-partners.com>
上级 1f28a7f4
...@@ -17,6 +17,13 @@ import inputMethod from '@ohos.inputmethod' ...@@ -17,6 +17,13 @@ import inputMethod from '@ohos.inputmethod'
export default function imeAbilityTest(abilityContext) { export default function imeAbilityTest(abilityContext) {
describe('imeAbilityTest', function () { describe('imeAbilityTest', function () {
var prop = {
packageName: '',
methodId: '',
name:'',
id:'',
extra:{}
}
/** /**
* sleep function. * sleep function.
*/ */
...@@ -28,28 +35,26 @@ export default function imeAbilityTest(abilityContext) { ...@@ -28,28 +35,26 @@ export default function imeAbilityTest(abilityContext) {
/** /**
* beforeEach: Prerequisites at the test case level, which are executed before each test case is executed. * beforeEach: Prerequisites at the test case level, which are executed before each test case is executed.
*/ */
beforeEach(function () { beforeAll(function () {
console.info('====>beforeEach: switchInputMethod to kikakeyboard.'); let inputM = inputMethod.getCurrentInputMethod()
let serviceAbilityProperty = { console.info("====>beforeAll: switchInputMethod to: " + JSON.stringify(inputM));
packageName: "com.example.kikakeyboard", prop.packageName = inputM.packageName;
methodId: "ServiceExtAbility", prop.methodId = inputM.methodId;
name:"com.example.kikakeyboard", prop.name = inputM.packageName;
id:"ServiceExtAbility", prop.id = inputM.methodId;
extra:{}
}
inputMethod.switchInputMethod(serviceAbilityProperty).then((data)=>{
console.info('====>SUB_InputMethod_IMEAbility_0001 switchInputMethod to Kika :' + data);
expect(data == true).assertTrue();
})
}); });
/** /**
* afterEach: Test case-level clearance conditions, which are executed after each test case is executed. * afterEach: Test case-level clearance conditions, which are executed after each test case is executed.
*/ */
afterEach(function () { afterAll(async function () {
console.info('====>afterEach: Test case-level clearance conditions is executed.'); console.info('====>afterAll: switchInputMethod to origionInput.' + JSON.stringify(prop));
await inputMethod.switchInputMethod(prop).then((data)=>{
console.info('====>afterAll switchInputMethod to origionInput :' + data);
expect(data == true).assertTrue();
}).catch(err =>{
console.info('====>afterAll switchInputMethod to origionInput error: ' + err);
})
}); });
/** /**
...@@ -75,7 +80,6 @@ export default function imeAbilityTest(abilityContext) { ...@@ -75,7 +80,6 @@ export default function imeAbilityTest(abilityContext) {
}); });
sleep(Date.now(), 3000); sleep(Date.now(), 3000);
console.info('====>----------SUB_InputMethod_IMEAbility_0001 end-------------'); console.info('====>----------SUB_InputMethod_IMEAbility_0001 end-------------');
done(); done();
}) })
...@@ -98,7 +102,7 @@ export default function imeAbilityTest(abilityContext) { ...@@ -98,7 +102,7 @@ export default function imeAbilityTest(abilityContext) {
} }
inputMethod.switchInputMethod(imExtAbilityProperty).then((data)=>{ inputMethod.switchInputMethod(imExtAbilityProperty).then((data)=>{
console.info('====>SUB_InputMethod_IMEAbility_0004 switchInputMethod to IME :' + data); console.info('====>SUB_InputMethod_IMEAbility_0002 switchInputMethod to IME :' + data);
expect(data == true).assertTrue(); expect(data == true).assertTrue();
}); });
sleep(Date.now(), 2500); sleep(Date.now(), 2500);
......
...@@ -54,21 +54,23 @@ export default function inputMethodStageJSUnit() { ...@@ -54,21 +54,23 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_listInputMethodSubtype_001', 0, async function (done) { it('inputMethod_test_listInputMethodSubtype_001', 0, async function (done) {
console.info("====>-----------------inputMethod_test_listInputMethodSubtype_001 start---------------------"); console.info("====>-----------------inputMethod_test_listInputMethodSubtype_001 start---------------------");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputMethod_test_listInputMethodSubtype_001 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName:"com.example.kikakeyboard", packageName:inputM.packageName,
methodId:"ServiceExtAbility", methodId:inputM.methodId,
name:"com.example.kikakeyboard", name:inputM.packageName,
id:"ServiceExtAbility", id:inputM.methodId,
label: "", label: "",
icon: "", icon: "",
iconId: 124, iconId: 124,
extra:{} extra:{}
} }
try{
let inputMethodSetting = inputMethod.getSetting(); let inputMethodSetting = inputMethod.getSetting();
console.info("====>inputMethod_test_listInputMethodSubtype_001 getSetting result:" + inputMethodSetting); console.info("====>inputMethod_test_listInputMethodSubtype_001 getSetting result:" + inputMethodSetting);
inputMethodSetting.listInputMethodSubtype(inputMethodProperty, (err, data) => { inputMethodSetting.listInputMethodSubtype(inputMethodProperty, (err, data) => {
try {
if(err){ if(err){
console.info("====>inputMethod_test_listInputMethodSubtype_001 failed" + JSON.stringify(err)); console.info("====>inputMethod_test_listInputMethodSubtype_001 failed" + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
...@@ -77,12 +79,11 @@ export default function inputMethodStageJSUnit() { ...@@ -77,12 +79,11 @@ export default function inputMethodStageJSUnit() {
console.info("====>inputMethod_test_listInputMethodSubtype_001 listInputMethodSubtype: " + JSON.stringify(data)); console.info("====>inputMethod_test_listInputMethodSubtype_001 listInputMethodSubtype: " + JSON.stringify(data));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}); } catch (error) {
}catch(error){
console.info("====>inputMethod_test_listInputMethodSubtype_001 listInputMethodSubtype catch error" + JSON.stringify(error)); console.info("====>inputMethod_test_listInputMethodSubtype_001 listInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail();
done(); done();
}; }
});
console.info("====>-----------------inputMethod_test_listInputMethodSubtype_001 end---------------------"); console.info("====>-----------------inputMethod_test_listInputMethodSubtype_001 end---------------------");
}); });
...@@ -94,21 +95,23 @@ export default function inputMethodStageJSUnit() { ...@@ -94,21 +95,23 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_listInputMethodSubtype_002', 0, async function (done) { it('inputMethod_test_listInputMethodSubtype_002', 0, async function (done) {
console.info("====>-----------------inputMethod_test_listInputMethodSubtype_002 start---------------------"); console.info("====>-----------------inputMethod_test_listInputMethodSubtype_002 start---------------------");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputMethod_test_listInputMethodSubtype_002 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName:"com.example.kikakeyboard", packageName:inputM.packageName,
methodId:"ServiceExtAbility", methodId:inputM.methodId,
name:"com.example.kikakeyboard", name:inputM.packageName,
id:"ServiceExtAbility", id:inputM.methodId,
label: "", label: "",
icon: "", icon: "",
iconId: 124, iconId: 124,
extra:{} extra:{}
}; }
try{
let inputMethodSetting = inputMethod.getSetting(); let inputMethodSetting = inputMethod.getSetting();
console.info("====>inputMethod_test_listInputMethodSubtype_002 getSetting result:" + inputMethodSetting); console.info("====>inputMethod_test_listInputMethodSubtype_002 getSetting result:" + inputMethodSetting);
inputMethodSetting.listInputMethodSubtype(inputMethodProperty, (err, data) => { inputMethodSetting.listInputMethodSubtype(inputMethodProperty, (err, data) => {
try {
if(err){ if(err){
console.info("====>inputMethod_test_listInputMethodSubtype_002 failed" + JSON.stringify(err)); console.info("====>inputMethod_test_listInputMethodSubtype_002 failed" + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
...@@ -126,12 +129,11 @@ export default function inputMethodStageJSUnit() { ...@@ -126,12 +129,11 @@ export default function inputMethodStageJSUnit() {
expect().assertFail(); expect().assertFail();
done(); done();
}; };
}); } catch (error) {
}catch(error){
console.info("====>inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype catch error" + JSON.stringify(error)); console.info("====>inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail();
done(); done();
}; }
});
console.info("====>-----------------inputMethod_test_listInputMethodSubtype_002 end---------------------"); console.info("====>-----------------inputMethod_test_listInputMethodSubtype_002 end---------------------");
}); });
...@@ -144,11 +146,13 @@ export default function inputMethodStageJSUnit() { ...@@ -144,11 +146,13 @@ export default function inputMethodStageJSUnit() {
it('inputMethod_test_listInputMethodSubtype_003', 0, async function (done) { it('inputMethod_test_listInputMethodSubtype_003', 0, async function (done) {
console.info("====>-----------------inputMethod_test_listInputMethodSubtype_003 start---------------------"); console.info("====>-----------------inputMethod_test_listInputMethodSubtype_003 start---------------------");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputMethod_test_listInputMethodSubtype_003 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName:"com.example.kikakeyboard", packageName:inputM.packageName,
methodId:"ServiceExtAbility", methodId:inputM.methodId,
name:"com.example.kikakeyboard", name:inputM.packageName,
id:"ServiceExtAbility", id:inputM.methodId,
label: "", label: "",
icon: "", icon: "",
iconId: 124, iconId: 124,
...@@ -183,21 +187,23 @@ export default function inputMethodStageJSUnit() { ...@@ -183,21 +187,23 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_listInputMethodSubtype_004', 0, async function (done) { it('inputMethod_test_listInputMethodSubtype_004', 0, async function (done) {
console.info("====>-----------------inputMethod_test_listInputMethodSubtype_004 start---------------------"); console.info("====>-----------------inputMethod_test_listInputMethodSubtype_004 start---------------------");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputMethod_test_listInputMethodSubtype_004 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName:"com.example.kikakeyboard", packageName:inputM.packageName,
methodId:"ServiceExtAbility", methodId:inputM.methodId,
name:"com.example.kikakeyboard", name:inputM.packageName,
id:"ServiceExtAbility", id:inputM.methodId,
label: "", label: "",
icon: "", icon: "",
iconId: 124, iconId: 124,
extra:{} extra:{}
}; }
try{
let inputMethodSetting = inputMethod.getSetting(); let inputMethodSetting = inputMethod.getSetting();
console.info("====>inputMethod_test_listInputMethodSubtype_004 getSetting result:" + inputMethodSetting); console.info("====>inputMethod_test_listInputMethodSubtype_004 getSetting result:" + inputMethodSetting);
inputMethodSetting.listInputMethodSubtype(inputMethodProperty).then((data) => { inputMethodSetting.listInputMethodSubtype(inputMethodProperty).then((data) => {
try{
console.info("====>inputMethod_test_listInputMethodSubtype_004 listInputMethodSubtype:" + JSON.stringify(data)); console.info("====>inputMethod_test_listInputMethodSubtype_004 listInputMethodSubtype:" + JSON.stringify(data));
if(data.length >= 1){ if(data.length >= 1){
let inputMethodSubtype = data[0] let inputMethodSubtype = data[0]
...@@ -210,16 +216,16 @@ export default function inputMethodStageJSUnit() { ...@@ -210,16 +216,16 @@ export default function inputMethodStageJSUnit() {
expect().assertFail(); expect().assertFail();
done(); done();
} }
}).catch(err => {
console.info("====>inputMethod_test_listInputMethodSubtype_004 failed" + JSON.stringify(err));
expect().assertFail();
done();
});
}catch(error){ }catch(error){
console.info("====>inputMethod_test_listInputMethodSubtype_004 listInputMethodSubtype catch error" + JSON.stringify(error)); console.info("====>inputMethod_test_listInputMethodSubtype_004 listInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} }
}).catch(err => {
console.info("====>inputMethod_test_listInputMethodSubtype_004 failed" + JSON.stringify(err));
expect().assertFail();
done();
});
console.info("====>-----------------inputMethod_test_listInputMethodSubtype_004 end---------------------"); console.info("====>-----------------inputMethod_test_listInputMethodSubtype_004 end---------------------");
}); });
...@@ -231,10 +237,10 @@ export default function inputMethodStageJSUnit() { ...@@ -231,10 +237,10 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_listCurrentInputMethodSubtype_001', 0, async function (done) { it('inputMethod_test_listCurrentInputMethodSubtype_001', 0, async function (done) {
console.info("====>-----------------inputMethod_test_listCurrentInputMethodSubtype_001 start---------------------"); console.info("====>-----------------inputMethod_test_listCurrentInputMethodSubtype_001 start---------------------");
try{
let inputMethodSetting = inputMethod.getSetting(); let inputMethodSetting = inputMethod.getSetting();
console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 getSetting result:" + inputMethodSetting); console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 getSetting result:" + inputMethodSetting);
inputMethodSetting.listCurrentInputMethodSubtype((err, data) => { inputMethodSetting.listCurrentInputMethodSubtype((err, data) => {
try {
if(err){ if(err){
console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 failed" + JSON.stringify(err)); console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 failed" + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
...@@ -243,12 +249,11 @@ export default function inputMethodStageJSUnit() { ...@@ -243,12 +249,11 @@ export default function inputMethodStageJSUnit() {
console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype: " + JSON.stringify(data)); console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype: " + JSON.stringify(data));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}); } catch (error) {
}catch(error){
console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype catch error" + JSON.stringify(error)); console.info("====>inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail();
done(); done();
}; }
});
console.info("====>-----------------inputMethod_test_listCurrentInputMethodSubtype_001 end---------------------"); console.info("====>-----------------inputMethod_test_listCurrentInputMethodSubtype_001 end---------------------");
}); });
...@@ -314,26 +319,34 @@ export default function inputMethodStageJSUnit() { ...@@ -314,26 +319,34 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_switchCurrentInputMethodAndSubtype_001', 0, async function (done) { it('inputMethod_test_switchCurrentInputMethodAndSubtype_001', 0, async function (done) {
console.info("====>************* inputMethod_test_switchCurrentInputMethodAndSubtype_001 Test start*************"); console.info("====>************* inputMethod_test_switchCurrentInputMethodAndSubtype_001 Test start*************");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputMethod_test_switchCurrentInputMethodAndSubtype_001 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName: "com.example.kikakeyboard", packageName:inputM.packageName,
methodId: "ServiceExtAbility", methodId:inputM.methodId,
name:"com.example.kikakeyboard", name:inputM.packageName,
id:"ServiceExtAbility", id:inputM.methodId,
label: "",
icon: "",
iconId: 124,
extra:{} extra:{}
}; }
let inputMS = inputMethod.getCurrentInputMethodSubtype()
console.info("inputMethod_test_switchCurrentInputMethodAndSubtype_001 getCurrentInputMethodSubtype: " + JSON.stringify(inputMS));
let inputMethodSubProperty : subtype = { let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard", id: inputMS.id,
label: "ServiceExtAbility", label: inputMS.label,
name: "", name: "",
mode: "upper", mode: "lower",
locale: "", locale: "",
language: "", language: "",
icon: "", icon: "",
iconId: 0, iconId: 0,
extra: {} extra: {}
}; };
try {
inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty, (err,data) => { inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty, (err,data) => {
try {
if (err) { if (err) {
console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_001 err: ' + JSON.stringify(err)); console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_001 err: ' + JSON.stringify(err));
expect( err.code == 12800008 ).assertTrue(); expect( err.code == 12800008 ).assertTrue();
...@@ -342,12 +355,11 @@ export default function inputMethodStageJSUnit() { ...@@ -342,12 +355,11 @@ export default function inputMethodStageJSUnit() {
console.info("====>inputMethod_test_switchCurrentInputMethodAndSubtype_001 data: " + JSON.stringify(data)); console.info("====>inputMethod_test_switchCurrentInputMethodAndSubtype_001 data: " + JSON.stringify(data));
expect(data != null).assertTrue(); expect(data != null).assertTrue();
done(); done();
});
} catch (error) { } catch (error) {
console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_001 catch error: ' + JSON.stringify(error)); console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_001 catch error: ' + JSON.stringify(error));
expect().assertFail();
done(); done();
}; }
});
console.info("====>************* inputMethod_test_switchCurrentInputMethodAndSubtype_001 Test end*************"); console.info("====>************* inputMethod_test_switchCurrentInputMethodAndSubtype_001 Test end*************");
}); });
...@@ -359,16 +371,23 @@ export default function inputMethodStageJSUnit() { ...@@ -359,16 +371,23 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_switchCurrentInputMethodAndSubtype_002', 0, async function (done) { it('inputMethod_test_switchCurrentInputMethodAndSubtype_002', 0, async function (done) {
console.info("====>************* inputMethod_test_switchCurrentInputMethodAndSubtype_002 Test start*************"); console.info("====>************* inputMethod_test_switchCurrentInputMethodAndSubtype_002 Test start*************");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputMethod_test_switchCurrentInputMethodAndSubtype_002 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName: "com.example.kikakeyboard", packageName:inputM.packageName,
methodId: "ServiceExtAbility", methodId:inputM.methodId,
name:"com.example.kikakeyboard", name:inputM.packageName,
id:"ServiceExtAbility", id:inputM.methodId,
label: "",
icon: "",
iconId: 124,
extra:{} extra:{}
}; }
let inputMS = inputMethod.getCurrentInputMethodSubtype()
console.info("inputMethod_test_switchCurrentInputMethodAndSubtype_002 getCurrentInputMethodSubtype: " + JSON.stringify(inputMS));
let inputMethodSubProperty : subtype = { let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard", id: inputMS.id,
label: "ServiceExtAbility", label: inputMS.label,
name: "", name: "",
mode: "lower", mode: "lower",
locale: "", locale: "",
...@@ -377,6 +396,7 @@ export default function inputMethodStageJSUnit() { ...@@ -377,6 +396,7 @@ export default function inputMethodStageJSUnit() {
iconId: 0, iconId: 0,
extra: {} extra: {}
}; };
try { try {
inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty).then((data) => { inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty).then((data) => {
console.info("====>inputMethod_test_switchCurrentInputMethodAndSubtype_002 data: " + JSON.stringify(data)); console.info("====>inputMethod_test_switchCurrentInputMethodAndSubtype_002 data: " + JSON.stringify(data));
...@@ -403,19 +423,22 @@ export default function inputMethodStageJSUnit() { ...@@ -403,19 +423,22 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_switchCurrentInputMethodSubtype_001', 0, async function (done) { it('inputMethod_test_switchCurrentInputMethodSubtype_001', 0, async function (done) {
console.info("====>************* inputMethod_test_switchCurrentInputMethodSubtype_001 Test start*************"); console.info("====>************* inputMethod_test_switchCurrentInputMethodSubtype_001 Test start*************");
let inputMS = inputMethod.getCurrentInputMethodSubtype()
console.info("inputMethod_test_switchCurrentInputMethodSubtype_001 getCurrentInputMethodSubtype: " + JSON.stringify(inputMS));
let inputMethodSubProperty : subtype = { let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard", id: inputMS.id,
label: "ServiceExtAbility", label: inputMS.label,
name: "", name: "",
mode: "upper", mode: "lower",
locale: "", locale: "",
language: "", language: "",
icon: "", icon: "",
iconId: 0, iconId: 0,
extra: {} extra: {}
}; };
try {
inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty, (err,data) => { inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty, (err,data) => {
try {
if (err) { if (err) {
console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 err: ' + JSON.stringify(err)); console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 err: ' + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
...@@ -424,12 +447,11 @@ export default function inputMethodStageJSUnit() { ...@@ -424,12 +447,11 @@ export default function inputMethodStageJSUnit() {
console.info("====>inputMethod_test_switchCurrentInputMethodSubtype_001 data: " + JSON.stringify(data)); console.info("====>inputMethod_test_switchCurrentInputMethodSubtype_001 data: " + JSON.stringify(data));
expect(data != null).assertTrue(); expect(data != null).assertTrue();
done(); done();
});
} catch (error) { } catch (error) {
console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 catch error: ' + JSON.stringify(error)); console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 catch error: ' + JSON.stringify(error));
expect().assertFail();
done(); done();
}; }
});
console.info("====>************* inputMethod_test_switchCurrentInputMethodSubtype_001 Test end*************"); console.info("====>************* inputMethod_test_switchCurrentInputMethodSubtype_001 Test end*************");
}); });
...@@ -441,9 +463,11 @@ export default function inputMethodStageJSUnit() { ...@@ -441,9 +463,11 @@ export default function inputMethodStageJSUnit() {
*/ */
it('inputMethod_test_switchCurrentInputMethodSubtype_002', 0, async function (done) { it('inputMethod_test_switchCurrentInputMethodSubtype_002', 0, async function (done) {
console.info("====>************* inputMethod_test_switchCurrentInputMethodSubtype_002 Test start*************"); console.info("====>************* inputMethod_test_switchCurrentInputMethodSubtype_002 Test start*************");
let inputMS = inputMethod.getCurrentInputMethodSubtype()
console.info("inputMethod_test_switchCurrentInputMethodSubtype_002 getCurrentInputMethodSubtype: " + JSON.stringify(inputMS));
let inputMethodSubProperty : subtype = { let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard", id: inputMS.id,
label: "ServiceExtAbility", label: inputMS.label,
name: "", name: "",
mode: "lower", mode: "lower",
locale: "", locale: "",
...@@ -452,6 +476,7 @@ export default function inputMethodStageJSUnit() { ...@@ -452,6 +476,7 @@ export default function inputMethodStageJSUnit() {
iconId: 0, iconId: 0,
extra: {} extra: {}
}; };
try { try {
inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty).then((data) => { inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty).then((data) => {
console.info("====>inputMethod_test_switchCurrentInputMethodSubtype_002 data: " + JSON.stringify(data)); console.info("====>inputMethod_test_switchCurrentInputMethodSubtype_002 data: " + JSON.stringify(data));
...@@ -480,9 +505,9 @@ export default function inputMethodStageJSUnit() { ...@@ -480,9 +505,9 @@ export default function inputMethodStageJSUnit() {
it('inputMethod_test_showOptionalInputMethods_001', 0, async function (done) { it('inputMethod_test_showOptionalInputMethods_001', 0, async function (done) {
console.info("====>-----------------inputMethod_test_showOptionalInputMethods_001 start---------------------"); console.info("====>-----------------inputMethod_test_showOptionalInputMethods_001 start---------------------");
let inputMethodSetting = inputMethod.getSetting(); let inputMethodSetting = inputMethod.getSetting();
try{
console.info("====>inputMethod_test_showOptionalInputMethods_001 result:" + inputMethodSetting); console.info("====>inputMethod_test_showOptionalInputMethods_001 result:" + inputMethodSetting);
inputMethodSetting.showOptionalInputMethods((err, data) => { inputMethodSetting.showOptionalInputMethods((err, data) => {
try {
if(err){ if(err){
console.info("====>inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods faild: " + JSON.stringify(err)); console.info("====>inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods faild: " + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
...@@ -492,13 +517,12 @@ export default function inputMethodStageJSUnit() { ...@@ -492,13 +517,12 @@ export default function inputMethodStageJSUnit() {
expect(true).assertTrue(); expect(true).assertTrue();
setTimeout(() => { setTimeout(() => {
done(); done();
}, 1000); }, 1500);
}); } catch (error) {
}catch(error){
console.info("====>inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods catch error: " + JSON.stringify(error)); console.info("====>inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods catch error: " + JSON.stringify(error));
expect().assertFail();
done(); done();
}; }
});
console.info("====>-----------------inputMethod_test_showOptionalInputMethods_001 end---------------------"); console.info("====>-----------------inputMethod_test_showOptionalInputMethods_001 end---------------------");
}); });
...@@ -567,8 +591,8 @@ export default function inputMethodStageJSUnit() { ...@@ -567,8 +591,8 @@ export default function inputMethodStageJSUnit() {
console.info("====>-----------------inputMethod_test_stopInputSession_001 start---------------------"); console.info("====>-----------------inputMethod_test_stopInputSession_001 start---------------------");
let inputMethodCtrl = inputMethod.getController(); let inputMethodCtrl = inputMethod.getController();
console.debug("inputMethod_test_stopInputSession_001 result: " + typeof inputMethodCtrl); console.debug("inputMethod_test_stopInputSession_001 result: " + typeof inputMethodCtrl);
try{
inputMethodCtrl.stopInputSession((err)=>{ inputMethodCtrl.stopInputSession((err)=>{
try {
if(err){ if(err){
console.info("====>inputMethod_test_stopInputSession_001 faild: " + JSON.stringify(err)); console.info("====>inputMethod_test_stopInputSession_001 faild: " + JSON.stringify(err));
expect(err.code).assertEqual('12800003'); expect(err.code).assertEqual('12800003');
...@@ -577,11 +601,10 @@ export default function inputMethodStageJSUnit() { ...@@ -577,11 +601,10 @@ export default function inputMethodStageJSUnit() {
expect().assertFail(); expect().assertFail();
done(); done();
} }
}) } catch (err) {
}catch(err){
expect().assertFail();
done(); done();
} }
})
}); });
/* /*
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
import inputMethod from '@ohos.inputmethod'; import inputMethod from '@ohos.inputmethod';
export default function inputMethodJSUnit() { export default function inputMethodJSUnit() {
...@@ -23,7 +23,7 @@ export default function inputMethodJSUnit() { ...@@ -23,7 +23,7 @@ export default function inputMethodJSUnit() {
console.info("====>inputmethoh_test_001 result:" + JSON.stringify(inputMethodSetting)); console.info("====>inputmethoh_test_001 result:" + JSON.stringify(inputMethodSetting));
inputMethodSetting.listInputMethod((arr) => { inputMethodSetting.listInputMethod((arr) => {
console.info("====>appInfoTest_input_2 listInputMethod result---" + JSON.stringify(arr)); console.info("====>appInfoTest_input_2 listInputMethod result---" + JSON.stringify(arr));
expect(1==1).assertTrue(); expect(1 == 1).assertTrue();
done(); done();
}); });
}); });
...@@ -32,12 +32,12 @@ export default function inputMethodJSUnit() { ...@@ -32,12 +32,12 @@ export default function inputMethodJSUnit() {
let inputMethodSetting = inputMethod.getInputMethodSetting(); let inputMethodSetting = inputMethod.getInputMethodSetting();
console.info("====>inputmethoh_test_002 result:" + JSON.stringify(inputMethodSetting)); console.info("====>inputmethoh_test_002 result:" + JSON.stringify(inputMethodSetting));
inputMethodSetting.listInputMethod().then(inputMethodProperty => { inputMethodSetting.listInputMethod().then(inputMethodProperty => {
if (inputMethodProperty.length > 0){ if (inputMethodProperty.length > 0) {
let obj = inputMethodProperty[0] let obj = inputMethodProperty[0]
console.info("====>inputmethoh_test_002 listInputMethod obj---" + JSON.stringify(obj)); console.info("====>inputmethoh_test_002 listInputMethod obj---" + JSON.stringify(obj));
expect(obj.packageName != null).assertTrue(); expect(obj.packageName != null).assertTrue();
expect(obj.methodId != null).assertTrue(); expect(obj.methodId != null).assertTrue();
}else{ } else {
console.info("====>inputmethoh_test_002 listInputMethod is null"); console.info("====>inputmethoh_test_002 listInputMethod is null");
expect().assertFail() expect().assertFail()
} }
...@@ -51,10 +51,10 @@ export default function inputMethodJSUnit() { ...@@ -51,10 +51,10 @@ export default function inputMethodJSUnit() {
it('inputmethoh_test_003', 0, async function (done) { it('inputmethoh_test_003', 0, async function (done) {
let inputMethodSetting = inputMethod.getInputMethodSetting(); let inputMethodSetting = inputMethod.getInputMethodSetting();
console.info("====>inputmethoh_test_003 result:" + JSON.stringify(inputMethodSetting)); console.info("====>inputmethoh_test_003 result:" + JSON.stringify(inputMethodSetting));
setTimeout(()=>{ setTimeout(() => {
try{
inputMethodSetting.displayOptionalInputMethod((err) => { inputMethodSetting.displayOptionalInputMethod((err) => {
if(err){ try {
if (err) {
console.info("====>inputmethoh_test_003 displayOptionalInputMethod err:" + JSON.stringify(err)); console.info("====>inputmethoh_test_003 displayOptionalInputMethod err:" + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done(); done();
...@@ -62,19 +62,18 @@ export default function inputMethodJSUnit() { ...@@ -62,19 +62,18 @@ export default function inputMethodJSUnit() {
expect(true).assertTrue(); expect(true).assertTrue();
console.info("====>inputmethoh_test_003 displayOptionalInputMethod---"); console.info("====>inputmethoh_test_003 displayOptionalInputMethod---");
done(); done();
}); } catch (err) {
}catch(err){
console.info("====>inputmethoh_test_004 displayOptionalInputMethod throw_err: " + JSON.stringify(err)); console.info("====>inputmethoh_test_004 displayOptionalInputMethod throw_err: " + JSON.stringify(err));
expect().assertFail()
done(); done();
} }
},100) });
}, 500)
}); });
it('inputmethoh_test_004', 0, async function (done) { it('inputmethoh_test_004', 0, async function (done) {
let inputMethodSetting = inputMethod.getInputMethodSetting(); let inputMethodSetting = inputMethod.getInputMethodSetting();
console.info("====>inputmethoh_test_004 result:" + JSON.stringify(inputMethodSetting)); console.info("====>inputmethoh_test_004 result:" + JSON.stringify(inputMethodSetting));
setTimeout(()=>{ setTimeout(() => {
inputMethodSetting.displayOptionalInputMethod().then(() => { inputMethodSetting.displayOptionalInputMethod().then(() => {
console.info("====>inputmethoh_test_004 displayOptionalInputMethod is called"); console.info("====>inputmethoh_test_004 displayOptionalInputMethod is called");
expect(true).assertTrue() expect(true).assertTrue()
...@@ -84,7 +83,7 @@ export default function inputMethodJSUnit() { ...@@ -84,7 +83,7 @@ export default function inputMethodJSUnit() {
expect().assertFail() expect().assertFail()
done(); done();
}); });
},100) }, 500)
}); });
it('inputmethoh_test_005', 0, async function (done) { it('inputmethoh_test_005', 0, async function (done) {
...@@ -131,24 +130,25 @@ export default function inputMethodJSUnit() { ...@@ -131,24 +130,25 @@ export default function inputMethodJSUnit() {
*/ */
it('inputmethod_test_switchInputMethod_001', 0, async function (done) { it('inputmethod_test_switchInputMethod_001', 0, async function (done) {
console.info("====>************* inputmethod_test_switchInputMethod_001 Test start*************"); console.info("====>************* inputmethod_test_switchInputMethod_001 Test start*************");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputmethod_test_switchInputMethod_001 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName: "com.example.kikakeyboard", packageName: inputM.packageName,
methodId: "ServiceExtAbility", methodId: inputM.methodId,
name:"com.example.kikakeyboard", name: inputM.packageName,
id:"ServiceExtAbility", id: inputM.methodId,
extra:{} extra: {}
} }
inputMethod.switchInputMethod(inputMethodProperty).then(data => { inputMethod.switchInputMethod(inputMethodProperty).then(data => {
console.info("====>inputmethod_test_switchInputMethod_001 data:" + data) console.info("====>inputmethod_test_switchInputMethod_001 data:" + data)
expect(data == true).assertTrue(); expect(data == true).assertTrue();
console.info("====>************* inputmethod_test_switchInputMethod_001 Test end*************"); console.info("====>************* inputmethod_test_switchInputMethod_001 Test end*************");
done(); done();
}).catch( err=> { }).catch(err => {
console.info("====>inputmethod_test_switchInputMethod_001 err:" + err) console.info("====>inputmethod_test_switchInputMethod_001 err:" + err)
expect().assertFail(); expect().assertFail();
done(); done();
}) });
}); });
/* /*
...@@ -159,15 +159,18 @@ export default function inputMethodJSUnit() { ...@@ -159,15 +159,18 @@ export default function inputMethodJSUnit() {
*/ */
it('inputmethod_test_switchInputMethod_002', 0, async function (done) { it('inputmethod_test_switchInputMethod_002', 0, async function (done) {
console.info("====>************* inputmethod_test_switchInputMethod_002 Test start*************"); console.info("====>************* inputmethod_test_switchInputMethod_002 Test start*************");
let inputM = inputMethod.getCurrentInputMethod()
console.info("inputmethod_test_switchInputMethod_002 getCurrentInputMethod: " + JSON.stringify(inputM));
let inputMethodProperty = { let inputMethodProperty = {
packageName: "com.example.kikakeyboard", packageName: inputM.packageName,
methodId: "ServiceExtAbility", methodId: inputM.methodId,
name:"com.example.kikakeyboard", name: inputM.packageName,
id:"ServiceExtAbility", id: inputM.methodId,
extra:{} extra: {}
} }
inputMethod.switchInputMethod(inputMethodProperty, (err, data)=>{ inputMethod.switchInputMethod(inputMethodProperty, (err, data) => {
if(err){ try {
if (err) {
console.info("====>inputmethod_test_switchInputMethod_002 error:" + err); console.info("====>inputmethod_test_switchInputMethod_002 error:" + err);
expect().assertFail(); expect().assertFail();
done(); done();
...@@ -176,8 +179,11 @@ export default function inputMethodJSUnit() { ...@@ -176,8 +179,11 @@ export default function inputMethodJSUnit() {
console.info("====>************* inputmethod_test_switchInputMethod_002 Test end*************"); console.info("====>************* inputmethod_test_switchInputMethod_002 Test end*************");
expect(data == true).assertTrue(); expect(data == true).assertTrue();
done(); done();
} catch (err) {
console.info("====>inputmethod_test_switchInputMethod_002 catch error:" + err);
done();
}
}); });
}); });
/* /*
...@@ -188,27 +194,27 @@ export default function inputMethodJSUnit() { ...@@ -188,27 +194,27 @@ export default function inputMethodJSUnit() {
*/ */
it('inputmethod_test_showSoftKeyboard_001', 0, async function (done) { it('inputmethod_test_showSoftKeyboard_001', 0, async function (done) {
let inputMethodCtrl = inputMethod.getInputMethodController() let inputMethodCtrl = inputMethod.getInputMethodController()
try{ inputMethodCtrl.showSoftKeyboard((err) => {
inputMethodCtrl.showSoftKeyboard((err)=>{ try {
expect(err.code).assertEqual('12800003') expect(err.code).assertEqual('12800003')
console.info("====>************* inputmethod_test_showSoftKeyboard_001 Test end*************"); console.info("====>************* inputmethod_test_showSoftKeyboard_001 Test end*************");
done(); done();
}); } catch (err) {
}catch(err){
expect().assertFail() expect().assertFail()
done(); done();
} }
}); });
});
/* /*
* @tc.number inputmethod_test_showSoftKeyboard_001 * @tc.number inputmethod_test_showSoftKeyboard_002
* @tc.name Test Indicates the input method which will show softboard with Promise. * @tc.name Test Indicates the input method which will show softboard with Promise.
* @tc.desc Function test * @tc.desc Function test
* @tc.level 2 * @tc.level 2
*/ */
it('inputmethod_test_showSoftKeyboard_002', 0, async function (done) { it('inputmethod_test_showSoftKeyboard_002', 0, async function (done) {
let inputMethodCtrl = inputMethod.getInputMethodController() let inputMethodCtrl = inputMethod.getInputMethodController()
inputMethodCtrl.showSoftKeyboard().then(() =>{ inputMethodCtrl.showSoftKeyboard().then(() => {
expect().assertFail() expect().assertFail()
done(); done();
}).catch((err) => { }).catch((err) => {
...@@ -220,35 +226,35 @@ export default function inputMethodJSUnit() { ...@@ -220,35 +226,35 @@ export default function inputMethodJSUnit() {
}); });
/* /*
* @tc.number inputmethod_test_showSoftKeyboard_001 * @tc.number inputmethod_test_hideSoftKeyboard_001
* @tc.name Test Indicates the input method which will hide softboard with calback. * @tc.name Test Indicates the input method which will hide softboard with calback.
* @tc.desc Function test * @tc.desc Function test
* @tc.level 2 * @tc.level 2
*/ */
it('inputmethod_test_hideSoftKeyboard_001', 0, async function (done) { it('inputmethod_test_hideSoftKeyboard_001', 0, async function (done) {
let inputMethodCtrl = inputMethod.getInputMethodController() let inputMethodCtrl = inputMethod.getInputMethodController()
try{ inputMethodCtrl.hideSoftKeyboard((err) => {
inputMethodCtrl.hideSoftKeyboard((err)=>{ try {
console.info('====>hideSoftKeyboard callbacek failed : ' + JSON.stringify(err)) console.info('====>hideSoftKeyboard callbacek failed : ' + JSON.stringify(err))
expect(err.code).assertEqual('12800003') expect(err.code).assertEqual('12800003')
console.info("====>************* inputmethod_test_hideSoftKeyboard_001 Test end*************"); console.info("====>************* inputmethod_test_hideSoftKeyboard_001 Test end*************");
done(); done();
}) } catch (err) {
}catch(err){
expect().assertFail(); expect().assertFail();
done(); done();
} }
})
}); });
/* /*
* @tc.number inputmethod_test_showSoftKeyboard_001 * @tc.number inputmethod_test_hideSoftKeyboard_002
* @tc.name Test Indicates the input method which will hide softboard with Promise. * @tc.name Test Indicates the input method which will hide softboard with Promise.
* @tc.desc Function test * @tc.desc Function test
* @tc.level 2 * @tc.level 2
*/ */
it('inputmethod_test_hideSoftKeyboard_002', 0, async function (done) { it('inputmethod_test_hideSoftKeyboard_002', 0, async function (done) {
let inputMethodCtrl = inputMethod.getInputMethodController() let inputMethodCtrl = inputMethod.getInputMethodController()
inputMethodCtrl.hideSoftKeyboard().then(() =>{ inputMethodCtrl.hideSoftKeyboard().then(() => {
expect().assertFail(); expect().assertFail();
done(); done();
}).catch((err) => { }).catch((err) => {
...@@ -287,15 +293,21 @@ export default function inputMethodJSUnit() { ...@@ -287,15 +293,21 @@ export default function inputMethodJSUnit() {
let inputMethodSetting = inputMethod.getInputMethodSetting(); let inputMethodSetting = inputMethod.getInputMethodSetting();
console.info("====>inputmethod_test_getInputMethods_001 result:" + JSON.stringify(inputMethodSetting)); console.info("====>inputmethod_test_getInputMethods_001 result:" + JSON.stringify(inputMethodSetting));
inputMethodSetting.getInputMethods(true, (err, arr) => { inputMethodSetting.getInputMethods(true, (err, arr) => {
try {
if (err) { if (err) {
console.error("inputmethod_test_getInputMethods_001 failed because: " + JSON.stringify(err)); console.error("inputmethod_test_getInputMethods_001 failed because: " + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done(); done();
}; }
;
console.info("====>inputmethod_test_getInputMethods_001 listInputMethod result---" + JSON.stringify(arr)); console.info("====>inputmethod_test_getInputMethods_001 listInputMethod result---" + JSON.stringify(arr));
expect(arr != null).assertTrue(); expect(arr != null).assertTrue();
console.info("====>************* inputmethod_test_getInputMethods_001 Test end*************"); console.info("====>************* inputmethod_test_getInputMethods_001 Test end*************");
done(); done();
} catch (err) {
console.error("inputmethod_test_getInputMethods_001 catch error: " + err);
done();
}
}); });
}); });
...@@ -310,13 +322,19 @@ export default function inputMethodJSUnit() { ...@@ -310,13 +322,19 @@ export default function inputMethodJSUnit() {
let inputMethodSetting = inputMethod.getInputMethodSetting(); let inputMethodSetting = inputMethod.getInputMethodSetting();
console.info("====>inputmethod_test_getInputMethods_002 result:" + JSON.stringify(inputMethodSetting)); console.info("====>inputmethod_test_getInputMethods_002 result:" + JSON.stringify(inputMethodSetting));
inputMethodSetting.getInputMethods(false, (err, arr) => { inputMethodSetting.getInputMethods(false, (err, arr) => {
try {
if (err) { if (err) {
console.error("inputmethod_test_getInputMethods_002 failed because: " + JSON.stringify(err)); console.error("inputmethod_test_getInputMethods_002 failed because: " + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
}; }
;
console.info("====>inputmethod_test_getInputMethods_002 listInputMethod result---" + JSON.stringify(arr)); console.info("====>inputmethod_test_getInputMethods_002 listInputMethod result---" + JSON.stringify(arr));
expect(arr != null).assertTrue(); expect(arr != null).assertTrue();
done(); done();
} catch (err) {
console.error("inputmethod_test_getInputMethods_002 catch error: " + err);
done();
}
}); });
}); });
}); });
......
...@@ -208,7 +208,7 @@ export default function systemTimerTest() { ...@@ -208,7 +208,7 @@ export default function systemTimerTest() {
done(); done();
}); });
} catch (e) { } catch (e) {
console.info('====>SUB_time_systemTimer_createTimer_0002 arv wrong since ' + e); console.info('====>SUB_time_systemTimer_createTimer_0003 arv wrong since ' + e);
expect().assertTrue(); expect().assertTrue();
done(); done();
}; };
...@@ -502,35 +502,35 @@ export default function systemTimerTest() { ...@@ -502,35 +502,35 @@ export default function systemTimerTest() {
}); });
/** /**
* @tc.number SUB_time_systemTimer_createTimer_0002 * @tc.number SUB_time_systemTimer_createTimerPromise_0001
* @tc.name SUB_time_systemTimer_createTimer_0002 * @tc.name SUB_time_systemTimer_createTimerPromise_0001
* @tc.desc Test createTimer() interfaces, type = TIMER_TYPE_REALTIME, repeat = false (Promise) * @tc.desc Test createTimer() interfaces, type = TIMER_TYPE_REALTIME, repeat = false (Promise)
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 0 * @tc.level Level 0
*/ */
it('SUB_time_systemTimer_createTimer_0002', 0, async function (done) { it('SUB_time_systemTimer_createTimerPromise_0001', 0, async function (done) {
console.info('====>SUB_time_systemTimer_createTimer_0002 start.'); console.info('====>SUB_time_systemTimer_createTimerPromise_0001 start.');
let options = { let options = {
type: systemTimer.TIMER_TYPE_REALTIME, type: systemTimer.TIMER_TYPE_REALTIME,
repeat: false repeat: false
}; };
try { try {
console.info('====>SUB_time_systemTimer_createTimer_0002 create timer.'); console.info('====>SUB_time_systemTimer_createTimerPromise_0001 create timer.');
systemTimer.createTimer(options).then((timerID)=>{ systemTimer.createTimer(options).then((timerID)=>{
console.info('====>SUB_time_systemTimer_createTimer_0002 timerID:' + timerID); console.info('====>SUB_time_systemTimer_createTimerPromise_0001 timerID:' + timerID);
expect(Number.isInteger(timerID)).assertTrue(); expect(Number.isInteger(timerID)).assertTrue();
globalTimerID = timerID; globalTimerID = timerID;
done(); done();
}).catch( error => { }).catch( error => {
// 捕获业务逻辑错误 // 捕获业务逻辑错误
console.info('====>SUB_time_systemTimer_createTimer_0002 failed to create timer.'); console.info('====>SUB_time_systemTimer_createTimerPromise_0001 failed to create timer.');
expect().assertTrue(); expect().assertTrue();
done(); done();
}); });
} catch (err) { } catch (err) {
// 捕获参数错误 // 捕获参数错误
console.info('====>SUB_time_systemTimer_createTimer_0002 has failed for ' + err); console.info('====>SUB_time_systemTimer_createTimerPromise_0001 has failed for ' + err);
expect().assertTrue(); expect().assertTrue();
done(); done();
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册