提交 64ab41d1 编写于 作者: Y yichengzhao

modify name of barrierfree test

Signed-off-by: Nyichengzhao <yichengzhao1@huawei.com>
Change-Id: I7b59abd2333965787264593fdc528e4e50795acd
上级 357fdc6f
......@@ -17,11 +17,11 @@ group("barrierfree") {
testonly = true
if (is_standard_system) {
deps = [
"accessibleabilitylist:AccessibleAbilityList",
"accessiblecaptionconfiguration:AccessibleCaptionConfiguration",
"accessiblecheckability:AccessibleCheckAbility",
"accessibleregisterstate:AccessibleRegisterState",
"accessiblesendevent:AccessibleSendEvent",
"accessibleabilitylist:ActsAccessibleAbilityListTest",
"accessiblecaptionconfiguration:ActsAccessibleCaptionConfigurationTest",
"accessiblecheckability:ActsAccessibleCheckAbilityTest",
"accessibleregisterstate:ActsAccessibleRegisterStateTest",
"accessiblesendevent:ActsAccessibleSendEventTest",
]
}
}
......@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AccessibleAbilityList") {
ohos_js_hap_suite("ActsAccessibleAbilityListTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
......
......@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AccessibleCaptionConfiguration") {
ohos_js_hap_suite("ActsAccessibleCaptionConfigurationTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
......
......@@ -16,24 +16,25 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
import accessibility from '@ohos.accessibility'
//import accessibility from '@ohos.application.AccessibilityExtension'
describe('AccessibleCaptionConfiguration', function () {
beforeEach(async function (done) {
console.info(`AccessibleCaptionConfiguration: beforeEach starts`);
let captionManager = accessibility.getCaptionsManager();
captionManager.off("enableChange");
captionManager.off("styleChange");
done();
})
afterEach(async function (done) {
console.info(`AccessibleCaptionConfiguration: afterEach starts`);
let captionManager = accessibility.getCaptionsManager();
captionManager.off("enableChange");
captionManager.off("styleChange");
setTimeout(done, 1000);
})
beforeEach(async function (done) {
console.info(`AccessibleCaptionConfiguration: beforeEach starts`);
let captionManager = accessibility.getCaptionsManager();
captionManager.off("enableChange");
captionManager.off("styleChange");
done();
})
afterEach(async function (done) {
console.info(`AccessibleCaptionConfiguration: afterEach starts`);
let captionManager = accessibility.getCaptionsManager();
captionManager.off("enableChange");
captionManager.off("styleChange");
setTimeout(done, 1000);
})
var CaptionsStyle = {
fontFamily: "default",
fontScale: 75,
......@@ -52,7 +53,6 @@ describe('AccessibleCaptionConfiguration', function () {
windowColor: "green"
}
/*
* @tc.number CaptionConfiguration_0010
* @tc.name CaptionConfiguration_0010
......@@ -105,17 +105,17 @@ describe('AccessibleCaptionConfiguration', function () {
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0020', 0, async function (done) {
console.info('CaptionConfiguration_0020');
let captionManager = accessibility.getCaptionsManager();
captionManager.style = CaptionsStyle;
let stateEventType = 'styleChange';
captionManager.on(stateEventType, (data) => {
expect(true).assertEqual(true);
done();
});
captionManager.style = StyleTest;
})
it('CaptionConfiguration_0020', 0, async function (done) {
console.info('CaptionConfiguration_0020');
let captionManager = accessibility.getCaptionsManager();
captionManager.style = CaptionsStyle;
let stateEventType = 'styleChange';
captionManager.on(stateEventType, (data) => {
expect(true).assertEqual(true);
done();
});
captionManager.style = StyleTest;
})
/*
* @tc.number CaptionConfiguration_0021
......@@ -237,6 +237,58 @@ describe('AccessibleCaptionConfiguration', function () {
captionManager.style.windowColor = "TmepwindowColor";
})
/*
* @tc.number CaptionConfiguration_0030
* @tc.name CaptionConfiguration_0030
* @tc.desc The parameter input is 'enableChange', test the captionManager.off() function,
* and return true
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0030', 0, async function (done) {
console.info('CaptionConfiguration_0030');
let stateEventType = 'enableChange';
let captionManager = accessibility.getCaptionsManager();
captionManager.off(stateEventType);
captionManager.enabled = false;
captionManager.on(stateEventType, (data) => {
let ret = false;
expect(ret).assertEqual(true);
});
let ret = captionManager.off(stateEventType);
captionManager.enabled = true;
expect(true).assertEqual(true);
done();
})
/*
* @tc.number CaptionConfiguration_0031
* @tc.name CaptionConfiguration_0031
* @tc.desc The parameter input is 'enableChange', test the captionManager.off() function,
* and return true
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0031', 0, async function (done) {
console.info('CaptionConfiguration_0031');
let stateEventType = 'enableChange';
let captionManager = accessibility.getCaptionsManager();
captionManager.off(stateEventType);
captionManager.enabled = true;
captionManager.on(stateEventType, (data) => {
let ret = false;
expect(ret).assertEqual(true);
});
captionManager.off(stateEventType, (data) => {
expect(data).assertEqual(true);
});
captionManager.enabled = false;
expect(true).assertEqual(true);
done();
})
/*
* @tc.number CaptionConfiguration_0032
* @tc.name CaptionConfiguration_0032
......@@ -261,6 +313,57 @@ describe('AccessibleCaptionConfiguration', function () {
});
})
/*
* @tc.number CaptionConfiguration_0040
* @tc.name CaptionConfiguration_0040
* @tc.desc The parameter input is 'styleChange', test the captionManager.off() function,
* and return true
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0040', 0, async function (done) {
console.info('CaptionConfiguration_0040');
let stateEventType = 'styleChange';
let captionManager = accessibility.getCaptionsManager();
captionManager.off(stateEventType);
captionManager.on(stateEventType, (data) => {
let ret = false;
expect(ret).assertEqual(true);
});
captionManager.off(stateEventType);
captionManager.style = StyleTest;
done();
})
/*
* @tc.number CaptionConfiguration_0041
* @tc.name CaptionConfiguration_0041
* @tc.desc The parameter input is 'styleChange', test the captionManager.off() function,
* and return true
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0041', 0, async function (done) {
console.info('CaptionConfiguration_0041');
let stateEventType = 'styleChange';
let captionManager = accessibility.getCaptionsManager();
captionManager.off(stateEventType);
captionManager.on(stateEventType, (data) => {
let ret = false;
expect(ret).assertEqual(true);
});
captionManager.off(stateEventType, (data) => {
expect(data.fontFamily).assertEqual(StyleTest.fontFamily);
expect(data.fontScale).assertEqual(StyleTest.fontScale);
expect(data.fontColor).assertEqual(StyleTest.fontColor);
expect(data.fontEdgeType).assertEqual(StyleTest.fontEdgeType);
expect(data.backgroundColor).assertEqual(StyleTest.backgroundColor);
expect(data.windowColor).assertEqual(StyleTest.windowColor);
});
captionManager.style = CaptionsStyle;
done();
})
/*
* @tc.number CaptionConfiguration_0042
* @tc.name CaptionConfiguration_0042
......@@ -282,7 +385,6 @@ describe('AccessibleCaptionConfiguration', function () {
});
})
/*
* @tc.number CaptionConfiguration_0050
* @tc.name CaptionConfiguration_0050
......@@ -292,13 +394,13 @@ describe('AccessibleCaptionConfiguration', function () {
* @tc.type User
*/
it('CaptionConfiguration_0050', 0, async function (done) {
console.info('CaptionConfiguration_0050');
let captionManager = accessibility.getCaptionsManager();
let fontFamily = "default";
captionManager.style.fontFamily = fontFamily;
let value = captionManager.style.fontFamily;
expect(value).assertEqual(fontFamily);
done();
console.info('CaptionConfiguration_0050');
let captionManager = accessibility.getCaptionsManager();
let fontFamily = "default";
captionManager.style.fontFamily = fontFamily;
let value = captionManager.style.fontFamily;
expect(value).assertEqual(fontFamily);
done();
})
/*
......@@ -517,6 +619,60 @@ describe('AccessibleCaptionConfiguration', function () {
done();
})
/*
* @tc.number CaptionConfiguration_0070
* @tc.name CaptionConfiguration_0070
* @tc.desc Test getCaptionsManager() function by modifying fontColor.
* Return CaptionsManager.
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0070', 0, async function (done) {
console.info('CaptionConfiguration_0070');
let captionManager = accessibility.getCaptionsManager();
let fontColor ="TmepfontColor";
captionManager.style.fontColor = fontColor;
let value = captionManager.style.fontColor;
expect(value).assertEqual(fontColor);
done();
})
/*
* @tc.number CaptionConfiguration_0071
* @tc.name CaptionConfiguration_0071
* @tc.desc Test getCaptionsManager() function by modifying fontColor.
* Return CaptionsManager.
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0071', 0, async function (done) {
console.info('CaptionConfiguration_0071');
let captionManager = accessibility.getCaptionsManager();
let fontColor ="none";
captionManager.style.fontColor = fontColor;
let value = captionManager.style.fontColor;
expect(value).assertEqual(fontColor);
done();
})
/*
* @tc.number CaptionConfiguration_0072
* @tc.name CaptionConfiguration_0072
* @tc.desc Test getCaptionsManager() function by modifying fontColor.
* Return CaptionsManager.
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0072', 0, async function (done) {
console.info('CaptionConfiguration_0072');
let captionManager = accessibility.getCaptionsManager();
let fontColor ="";
captionManager.style.fontColor = fontColor;
let value = captionManager.style.fontColor;
expect(value).assertEqual(fontColor);
done();
})
/*
* @tc.number CaptionConfiguration_0080
* @tc.name CaptionConfiguration_0080
......@@ -696,7 +852,7 @@ describe('AccessibleCaptionConfiguration', function () {
expect(value).assertEqual(windowColor);
done();
})
/*
* @tc.number CaptionConfiguration_0101
* @tc.name CaptionConfiguration_0101
......@@ -714,7 +870,7 @@ describe('AccessibleCaptionConfiguration', function () {
expect(value).assertEqual(windowColor);
done();
})
/*
* @tc.number CaptionConfiguration_0102
* @tc.name CaptionConfiguration_0102
......@@ -732,5 +888,65 @@ describe('AccessibleCaptionConfiguration', function () {
expect(value).assertEqual(windowColor);
done();
})
/*
* @tc.number CaptionConfiguration_0110
* @tc.name CaptionConfiguration_0110
* @tc.desc Test getCaptionsManager() function by modifying style.
* Return CaptionsManager.
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0110', 0, async function (done) {
console.info('CaptionConfiguration_0110');
let captionManager = accessibility.getCaptionsManager();
let StyleTest = {
fontFamily: "monospacedSerif",
fontScale: 99,
fontColor: "red",
fontEdgeType: "uniform",
backgroundColor: "pink",
windowColor: "green"
};
captionManager.style = StyleTest;
let value = captionManager.style;
expect(value.fontFamily).assertEqual(StyleTest.fontFamily);
expect(value.fontScale).assertEqual(StyleTest.fontScale);
expect(value.fontColor).assertEqual(StyleTest.fontColor);
expect(value.fontEdgeType).assertEqual(StyleTest.fontEdgeType);
expect(value.backgroundColor).assertEqual(StyleTest.backgroundColor);
expect(value.windowColor).assertEqual(StyleTest.windowColor);
done();
})
/*
* @tc.number CaptionConfiguration_0111
* @tc.name CaptionConfiguration_0111
* @tc.desc Test getCaptionsManager() function by modifying style.
* Return CaptionsManager.
* @tc.size SmallTest
* @tc.type User
*/
it('CaptionConfiguration_0111', 0, async function (done) {
console.info('CaptionConfiguration_0111');
let captionManager = accessibility.getCaptionsManager();
let StyleTest = {
fontFamily: "default",
fontScale: 75,
fontColor: "blue",
fontEdgeType: "none",
backgroundColor: "green",
windowColor: "pink"
};
captionManager.style = StyleTest;
let value = captionManager.style;
expect(value.fontFamily).assertEqual(StyleTest.fontFamily);
expect(value.fontScale).assertEqual(StyleTest.fontScale);
expect(value.fontColor).assertEqual(StyleTest.fontColor);
expect(value.fontEdgeType).assertEqual(StyleTest.fontEdgeType);
expect(value.backgroundColor).assertEqual(StyleTest.backgroundColor);
expect(value.windowColor).assertEqual(StyleTest.windowColor);
done();
})
})
......@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AccessibleCheckAbility") {
ohos_js_hap_suite("ActsAccessibleCheckAbilityTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
......
......@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AccessibleRegisterState") {
ohos_js_hap_suite("ActsAccessibleRegisterStateTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
......
......@@ -38,14 +38,14 @@ describe('AccessibleRegisterState', function () {
/*
* @tc.number RegisterStateOnOff_0330
* @tc.name RegisterStateOnOff_0330
* @tc.desc The parameter input is 'accessibility', test the accessibility.on() function,
* @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.on() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0330', 0, async function (done) {
console.info('RegisterStateOnOff_0330');
const stateEventType = 'accessibility';
let stateEventType = 'accessibilityStateChange';
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -54,14 +54,14 @@ describe('AccessibleRegisterState', function () {
/*
* @tc.number RegisterStateOnOff_0340
* @tc.name RegisterStateOnOff_0340
* @tc.desc The parameter input is 'touchGuide', test the accessibility.on() function,
* @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.on() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0340', 0, async function (done) {
console.info('RegisterStateOnOff_0340');
const stateEventType = 'touchGuide';
let stateEventType = 'touchGuideStateChange';
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -77,7 +77,7 @@ describe('AccessibleRegisterState', function () {
*/
it('RegisterStateOnOff_0350', 0, async function (done) {
console.info('RegisterStateOnOff_0350');
const stateEventType = '';
let stateEventType = '';
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -93,7 +93,7 @@ describe('AccessibleRegisterState', function () {
*/
it('RegisterStateOnOff_0360', 0, async function (done) {
console.info('RegisterStateOnOff_0360');
const stateEventType = null;
let stateEventType = null;
let ret = accessibility.on(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -106,14 +106,14 @@ describe('AccessibleRegisterState', function () {
/*
* @tc.number RegisterStateOnOff_0370
* @tc.name RegisterStateOnOff_0370
* @tc.desc The parameter input is 'accessibility', test the accessibility.off() function,
* @tc.desc The parameter input is 'accessibilityStateChange', test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0370', 0, async function (done) {
console.info('RegisterStateOnOff_0370');
const stateEventType = 'accessibility';
let stateEventType = 'accessibilityStateChange';
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -122,14 +122,14 @@ describe('AccessibleRegisterState', function () {
/*
* @tc.number RegisterStateOnOff_0380
* @tc.name RegisterStateOnOff_0380
* @tc.desc The parameter input is 'touchGuide', test the accessibility.off() function,
* @tc.desc The parameter input is 'touchGuideStateChange', test the accessibility.off() function,
* and return void.
* @tc.size SmallTest
* @tc.type User
*/
it('RegisterStateOnOff_0380', 0, async function (done) {
console.info('RegisterStateOnOff_0380');
const stateEventType = 'touchGuide';
let stateEventType = 'touchGuideStateChange';
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -145,7 +145,7 @@ describe('AccessibleRegisterState', function () {
*/
it('RegisterStateOnOff_0390', 0, async function (done) {
console.info('RegisterStateOnOff_0390');
const stateEventType = '';
let stateEventType = '';
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -161,7 +161,7 @@ describe('AccessibleRegisterState', function () {
*/
it('RegisterStateOnOff_0400', 0, async function (done) {
console.info('RegisterStateOnOff_0400');
const stateEventType = null;
let stateEventType = null;
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......@@ -177,7 +177,7 @@ describe('AccessibleRegisterState', function () {
*/
it('RegisterStateOnOff_0410', 0, async function (done) {
console.info('RegisterStateOnOff_0410');
const stateEventType = null;
let stateEventType = null;
let ret = accessibility.off(stateEventType, (data) => {});
expect(ret).assertEqual(undefined);
done();
......
......@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AccessibleSendEvent") {
ohos_js_hap_suite("ActsAccessibleSendEventTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
......
......@@ -32,20 +32,20 @@ describe('AccessibleSendEvent', function () {
})
/******************************************************************************** */
/* Cases SendEventAccessibility_0010-0020 & SendEventAccessibilityNull_0010-0020 */
/* Cases SendEvent_0010-0020 & SendEvent_Null_0010-0020 */
/* are for accessibility.sendEvent() API test */
/******************************************************************************** */
/*
* @tc.number SendEventAccessibility_0010
* @tc.name SendEventAccessibility_0010
* @tc.number SendEvent_0010
* @tc.name SendEvent_0010
* @tc.desc The parameter input is EventInfo, test the sendEvent() function,
* and should return true.
* @tc.size SmallTest
* @tc.type User
*/
it('SendEventAccessibility_0010', 0, async function (done) {
console.info('SendEventAccessibility_0010');
it('SendEvent_0010', 0, async function (done) {
console.info('SendEvent_0010');
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
......@@ -53,88 +53,3847 @@ describe('AccessibleSendEvent', function () {
accessibility.sendEvent(event, (err, data) => {
if (err.code != 0) {
console.error(`AccessibleSendEvent: SendEventAccessibility_0010 has error: ${err.code}`);
console.error(`AccessibleSendEvent: SendEvent_0010 has error: ${err.code}`);
expect(null).assertFail();
done();
}
console.info(`AccessibleSendEvent: SendEventAccessibility_0010 data ${data}`);
console.info(`AccessibleSendEvent: SendEvent_0010 data ${data}`);
expect(data).assertEqual(true);
done();
})
})
/*
* @tc.number SendEventAccessibility_0020
* @tc.name SendEventAccessibility_0020
* @tc.number SendEvent_0020
* @tc.name SendEvent_0020
* @tc.desc The parameter input is EventInfo, test the sendEvent() function,
* and should return true.
* @tc.size SmallTest
* @tc.type User
*/
it('SendEventAccessibility_0020', 0, async function (done) {
console.info('SendEventAccessibility_0020');
it('SendEvent_0020', 0, async function (done) {
console.info('SendEvent_0020');
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
console.info(`AccessibleSendEvent: SendEventAccessibility_0020 data ${result}`);
console.info(`AccessibleSendEvent: SendEvent_0020 data ${result}`);
expect(result).assertEqual(true);
done();
}).catch((err) => {
console.error(`AccessibleSendEvent: SendEventAccessibility_0020 has error: ${err}`);
console.error(`AccessibleSendEvent: SendEvent_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEventAccessibilityNull_0010
* @tc.name SendEventAccessibilityNull_0010
* @tc.number SendEvent_null_0010
* @tc.name SendEvent_null_0010
* @tc.desc The parameter input is null, test the sendEvent() function,
* and should return false.
* @tc.size SmallTest
* @tc.type User
*/
it('SendEventAccessibilityNull_0010', 0, async function (done) {
console.info('SendEventAccessibilityNull_0010');
it('SendEvent_null_0010', 0, async function (done) {
console.info('SendEvent_null_0010');
let event = null;
accessibility.sendEvent(event, (err, data) => {
if (err.code != 0) {
console.error(`AccessibleSendEvent: SendEventAccessibilityNull_0010 has error: ${err.code}`);
console.error(`AccessibleSendEvent: SendEvent_null_0010 has error: ${err.code}`);
expect(null).assertFail();
done();
}
console.info(`AccessibleSendEvent: SendEventAccessibilityNull_0010 data ${data}`);
console.info(`AccessibleSendEvent: SendEvent_null_0010 data ${data}`);
expect(data).assertEqual(false);
done();
})
})
/*
* @tc.number SendEventAccessibilityNull_0020
* @tc.name SendEventAccessibilityNull_0020
* @tc.number SendEvent_null_0020
* @tc.name SendEvent_null_0020
* @tc.desc The parameter input is null, test the sendEvent() function,
* and should return false.
* @tc.size SmallTest
* @tc.type User
*/
it('SendEventAccessibilityNull_0020', 0, async function (done) {
console.info('SendEventAccessibilityNull_0020');
it('SendEvent_null_0020', 0, async function (done) {
console.info('SendEvent_null_0020');
let event = null;
accessibility.sendEvent(event).then((result) => {
console.info(`AccessibleSendEvent: SendEventAccessibilityNull_0020 data ${result}`);
console.info(`AccessibleSendEvent: SendEvent_null_0020 data ${result}`);
expect(result).assertEqual(false);
done();
}).catch((err) => {
console.error(`AccessibleSendEvent: SendEventAccessibilityNull_0020 has error: ${err}`);
console.error(`AccessibleSendEvent: SendEvent_null_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*********************************************************************************************************** */
/* Cases SendEvent_type_0010-SendEvent_gestureType_0180 are for interface accessibility.EventInfo API test */
/*********************************************************************************************************** */
/*
* @tc.number SendEvent_type_0010
* @tc.name SendEvent_type_0010
* @tc.desc The type of EventInfo is 'accessibilityFocus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0010 starts`);
let eventType = 'accessibilityFocus';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0020
* @tc.name SendEvent_type_0020
* @tc.desc The type of EventInfo is 'accessibilityFocusClear', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0020 starts`);
let eventType = 'accessibilityFocusClear';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0030
* @tc.name SendEvent_type_0030
* @tc.desc The type of EventInfo is 'click', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0030 starts`);
let eventType = 'click';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0040
* @tc.name SendEvent_type_0040
* @tc.desc The type of EventInfo is 'longClick', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0040', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0040 starts`);
let eventType = 'longClick';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0040 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0050
* @tc.name SendEvent_type_0050
* @tc.desc The type of EventInfo is 'focus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0050', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0050 starts`);
let eventType = 'focus';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0050 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0060
* @tc.name SendEvent_type_0060
* @tc.desc The type of EventInfo is 'select', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0060', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0060 starts`);
let eventType = 'select';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0060 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0070
* @tc.name SendEvent_type_0070
* @tc.desc The type of EventInfo is 'hoverEnter', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0070', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0070 starts`);
let eventType = 'hoverEnter';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0070 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0080
* @tc.name SendEvent_type_0080
* @tc.desc The type of EventInfo is 'hoverExit', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0080', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0080 starts`);
let eventType = 'hoverExit';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0080 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0090
* @tc.name SendEvent_type_0090
* @tc.desc The type of EventInfo is 'textUpdate', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0090', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0090 starts`);
let eventType = 'textUpdate';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0090 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0100
* @tc.name SendEvent_type_0100
* @tc.desc The type of EventInfo is 'textSelectionUpdate', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0100', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0100 starts`);
let eventType = 'textSelectionUpdate';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0100 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0110
* @tc.name SendEvent_type_0110
* @tc.desc The type of EventInfo is 'scroll', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0110', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0110 starts`);
let eventType = 'scroll';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0110 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0120
* @tc.name SendEvent_type_0120
* @tc.desc The type of EventInfo is 'textMoveUnit', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0120', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0120 starts`);
let eventType = 'textMoveUnit';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0120 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0130
* @tc.name SendEvent_type_0130
* @tc.desc The type of EventInfo is 'touchBegin', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0130', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0130 starts`);
let eventType = 'touchBegin';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0130 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0140
* @tc.name SendEvent_type_0140
* @tc.desc The type of EventInfo is 'touchEnd', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0140', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0140 starts`);
let eventType = 'touchEnd';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0140 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0150
* @tc.name SendEvent_type_0150
* @tc.desc The type of EventInfo is 'touchGuideBegin', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0150', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0150 starts`);
let eventType = 'touchGuideBegin';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0150 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0160
* @tc.name SendEvent_type_0160
* @tc.desc The type of EventInfo is 'touchGuideEnd', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0160', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0160 starts`);
let eventType = 'touchGuideEnd';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0160 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0170
* @tc.name SendEvent_type_0170
* @tc.desc The type of EventInfo is 'touchGuideGestureBegin', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0170', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0170 starts`);
let eventType = 'touchGuideGestureBegin';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0170 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0180
* @tc.name SendEvent_type_0180
* @tc.desc The type of EventInfo is 'touchGuideGestureEnd', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0180', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0180 starts`);
let eventType = 'touchGuideGestureEnd';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0180 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0190
* @tc.name SendEvent_type_0190
* @tc.desc The type of EventInfo is 'windowUpdate', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0190', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0190 starts`);
let eventType = 'windowUpdate';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0190 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0200
* @tc.name SendEvent_type_0200
* @tc.desc The type of EventInfo is 'pageContentUpdate', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0200', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0200 starts`);
let eventType = 'pageContentUpdate';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0200 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0210
* @tc.name SendEvent_type_0210
* @tc.desc The type of EventInfo is 'pageStateUpdate', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0210', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0210 starts`);
let eventType = 'pageStateUpdate';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0210 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0220
* @tc.name SendEvent_type_0220
* @tc.desc The type of EventInfo is 'publicNotice', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0220', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0220 starts`);
let eventType = 'publicNotice';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0220 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0230
* @tc.name SendEvent_type_0230
* @tc.desc The type of EventInfo is 'notificationUpdate', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0230', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0230 starts`);
let eventType = 'notificationUpdate';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0230 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0240
* @tc.name SendEvent_type_0240
* @tc.desc The type of EventInfo is 'interrupt', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0240', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0240 starts`);
let eventType = 'interrupt';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0240 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0250
* @tc.name SendEvent_type_0250
* @tc.desc The type of EventInfo is 'gesture', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0250', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0250 starts`);
let eventType = 'gesture';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0250 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0260
* @tc.name SendEvent_type_0260
* @tc.desc The type of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to false
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0260', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0260 starts`);
let eventType = '';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(false);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0260 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_type_0270
* @tc.name SendEvent_type_0270
* @tc.desc The type of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to false
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0270', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0270 starts`);
let eventType = null;
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(false);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0270 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0010
* @tc.name SendEvent_windowUpdateType_0010
* @tc.desc The windowUpdateType of EventInfo is 'add', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0010 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'add';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0020
* @tc.name SendEvent_windowUpdateType_0020
* @tc.desc The windowUpdateType of EventInfo is 'remove', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0020 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'remove';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0030
* @tc.name SendEvent_windowUpdateType_0030
* @tc.desc The windowUpdateType of EventInfo is 'title', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0030 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'title';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0040
* @tc.name SendEvent_windowUpdateType_0040
* @tc.desc The windowUpdateType of EventInfo is 'bounds', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0040', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0040 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'bounds';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0040 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0050
* @tc.name SendEvent_windowUpdateType_0050
* @tc.desc The windowUpdateType of EventInfo is 'layer', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0050', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0050 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'layer';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0050 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0060
* @tc.name SendEvent_windowUpdateType_0060
* @tc.desc The windowUpdateType of EventInfo is 'active', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0060', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0060 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'active';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0060 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0070
* @tc.name SendEvent_windowUpdateType_0070
* @tc.desc The windowUpdateType of EventInfo is 'focus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0070', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0070 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'focus';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0070 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0080
* @tc.name SendEvent_windowUpdateType_0080
* @tc.desc The windowUpdateType of EventInfo is 'accessibilityFocus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0080', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0080 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'accessibilityFocus';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0080 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0090
* @tc.name SendEvent_windowUpdateType_0090
* @tc.desc The windowUpdateType of EventInfo is 'parent', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0090', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0090 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'parent';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0090 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0010
* @tc.name SendEvent_windowUpdateType_0010
* @tc.desc The windowUpdateType of EventInfo is 'children', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0010 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'children';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0011
* @tc.name SendEvent_windowUpdateType_0011
* @tc.desc The windowUpdateType of EventInfo is 'pip', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0011', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0011 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = 'pip';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0011 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0012
* @tc.name SendEvent_windowUpdateType_0012
* @tc.desc The windowUpdateType of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0012', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0012 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = '';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0012 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0013
* @tc.name SendEvent_windowUpdateType_0013
* @tc.desc The windowUpdateType of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowUpdateType_0013', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowUpdateType_0013 starts`);
let event = new accessibility.EventInfo();
let windowUpdateType = null;
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0013 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_bundleName_0010
* @tc.name SendEvent_bundleName_0010
* @tc.desc The bundleName of EventInfo is 'com.ixaa.testfora11y', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_bundleName_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_bundleName_0010 starts`);
let event = new accessibility.EventInfo();
let localBundleName = 'com.ixaa.testfora11y';
event.type = eventType;
event.bundleName = localBundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_bundleName_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_bundleName_0020
* @tc.name SendEvent_bundleName_0020
* @tc.desc The bundleName of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to false
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_bundleName_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_bundleName_0020 starts`);
let event = new accessibility.EventInfo();
let localBundleName = '';
event.type = eventType;
event.bundleName = localBundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(false);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_bundleName_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_bundleName_0030
* @tc.name SendEvent_bundleName_0030
* @tc.desc The bundleName of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to false
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_bundleName_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_bundleName_0030 starts`);
let event = new accessibility.EventInfo();
let localBundleName = null;
event.type = eventType;
event.bundleName = localBundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(false);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_bundleName_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_componentType_0010
* @tc.name SendEvent_componentType_0010
* @tc.desc The componentType of EventInfo is 'button', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_componentType_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_componentType_0010 starts`);
let event = new accessibility.EventInfo();
let componentType = 'button';
event.type = eventType;
event.bundleName = bundleName;
event.componentType = componentType;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentType_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_componentType_0020
* @tc.name SendEvent_componentType_0020
* @tc.desc The componentType of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_componentType_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_componentType_0020 starts`);
let event = new accessibility.EventInfo();
let componentType = '';
event.type = eventType;
event.bundleName = bundleName;
event.componentType = componentType;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentType_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_componentType_0030
* @tc.name SendEvent_componentType_0030
* @tc.desc The componentType of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_componentType_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_componentType_0030 starts`);
let event = new accessibility.EventInfo();
let componentType = null;
event.type = eventType;
event.bundleName = bundleName;
event.componentType = componentType;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentType_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_timeStamp_0010
* @tc.name SendEvent_timeStamp_0010
* @tc.desc The timeStamp of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_timeStamp_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_timeStamp_0010 starts`);
let event = new accessibility.EventInfo();
let timeStamp = 1;
event.type = eventType;
event.bundleName = bundleName;
event.timeStamp = timeStamp;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_timeStamp_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_timeStamp_0020
* @tc.name SendEvent_timeStamp_0020
* @tc.desc The timeStamp of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_timeStamp_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_timeStamp_0020 starts`);
let event = new accessibility.EventInfo();
let timeStamp = 0;
event.type = eventType;
event.bundleName = bundleName;
event.timeStamp = timeStamp;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_timeStamp_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_timeStamp_0030
* @tc.name SendEvent_timeStamp_0030
* @tc.desc The timeStamp of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_timeStamp_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_timeStamp_0030 starts`);
let event = new accessibility.EventInfo();
let timeStamp = -1;
event.type = eventType;
event.bundleName = bundleName;
event.timeStamp = timeStamp;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_timeStamp_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowId_0010
* @tc.name SendEvent_windowId_0010
* @tc.desc The windowId of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowId_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowId_0010 starts`);
let event = new accessibility.EventInfo();
let windowId = 1;
event.type = eventType;
event.bundleName = bundleName;
event.windowId = windowId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowId_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowId_0020
* @tc.name SendEvent_windowId_0020
* @tc.desc The windowId of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowId_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowId_0020 starts`);
let event = new accessibility.EventInfo();
let windowId = 0;
event.type = eventType;
event.bundleName = bundleName;
event.windowId = windowId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowId_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_windowId_0030
* @tc.name SendEvent_windowId_0030
* @tc.desc The windowId of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_windowId_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_windowId_0030 starts`);
let event = new accessibility.EventInfo();
let windowId = -1;
event.type = eventType;
event.bundleName = bundleName;
event.windowId = windowId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowId_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_pageId_0010
* @tc.name SendEvent_pageId_0010
* @tc.desc The pageId of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_pageId_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_pageId_0010 starts`);
let event = new accessibility.EventInfo();
let pageId = 1;
event.type = eventType;
event.bundleName = bundleName;
event.pageId = pageId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_pageId_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_pageId_0020
* @tc.name SendEvent_pageId_0020
* @tc.desc The pageId of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_pageId_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_pageId_0020 starts`);
let event = new accessibility.EventInfo();
let pageId = 0;
event.type = eventType;
event.bundleName = bundleName;
event.pageId = pageId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_pageId_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_pageId_0030
* @tc.name SendEvent_pageId_0030
* @tc.desc The pageId of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_pageId_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_pageId_0030 starts`);
let event = new accessibility.EventInfo();
let pageId = -1;
event.type = eventType;
event.bundleName = bundleName;
event.pageId = pageId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_pageId_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_componentId_0010
* @tc.name SendEvent_componentId_0010
* @tc.desc The componentId of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_componentId_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_componentId_0010 starts`);
let event = new accessibility.EventInfo();
let componentId = 1;
event.type = eventType;
event.bundleName = bundleName;
event.componentId = componentId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentId_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_componentId_0020
* @tc.name SendEvent_componentId_0020
* @tc.desc The componentId of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_componentId_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_componentId_0020 starts`);
let event = new accessibility.EventInfo();
let componentId = 0;
event.type = eventType;
event.bundleName = bundleName;
event.componentId = componentId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentId_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_componentId_0030
* @tc.name SendEvent_componentId_0030
* @tc.desc The componentId of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_componentId_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_componentId_0030 starts`);
let event = new accessibility.EventInfo();
let componentId = -1;
event.type = eventType;
event.bundleName = bundleName;
event.componentId = componentId;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentId_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_description_0010
* @tc.name SendEvent_description_0010
* @tc.desc The description of EventInfo is '1', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_description_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_description_0010 starts`);
let event = new accessibility.EventInfo();
let description = '1';
event.type = eventType;
event.bundleName = bundleName;
event.description = description;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_description_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_description_0020
* @tc.name SendEvent_description_0020
* @tc.desc The description of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_description_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_description_0020 starts`);
let event = new accessibility.EventInfo();
let description = '';
event.type = eventType;
event.bundleName = bundleName;
event.description = description;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_description_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_description_0030
* @tc.name SendEvent_description_0030
* @tc.desc The description of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_description_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_description_0030 starts`);
let event = new accessibility.EventInfo();
let description = null;
event.type = eventType;
event.bundleName = bundleName;
event.description = description;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_description_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0010
* @tc.name SendEvent_triggerAction_0010
* @tc.desc The triggerAction of EventInfo is 'accessibilityFocus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0010 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'accessibilityFocus';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0020
* @tc.name SendEvent_triggerAction_0020
* @tc.desc The triggerAction of EventInfo is 'clearAccessibilityFocus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0020 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'clearAccessibilityFocus';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0030
* @tc.name SendEvent_triggerAction_0030
* @tc.desc The triggerAction of EventInfo is 'focus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0030 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'focus';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0040
* @tc.name SendEvent_triggerAction_0040
* @tc.desc The triggerAction of EventInfo is 'clearFocus', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0040', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0040 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'clearFocus';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0040 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0050
* @tc.name SendEvent_triggerAction_0050
* @tc.desc The triggerAction of EventInfo is 'clearSelection', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0050', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0050 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'clearSelection';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0050 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0060
* @tc.name SendEvent_triggerAction_0060
* @tc.desc The triggerAction of EventInfo is 'click', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0060', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0060 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'click';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0060 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0070
* @tc.name SendEvent_triggerAction_0070
* @tc.desc The triggerAction of EventInfo is 'longClick', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0070', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0070 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'longClick';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0070 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0080
* @tc.name SendEvent_triggerAction_0080
* @tc.desc The triggerAction of EventInfo is 'cut', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0080', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0080 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'cut';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0080 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0090
* @tc.name SendEvent_triggerAction_0090
* @tc.desc The triggerAction of EventInfo is 'copy', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0090', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0090 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'copy';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0090 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0100
* @tc.name SendEvent_triggerAction_0100
* @tc.desc The triggerAction of EventInfo is 'paste', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0100', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0100 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'paste';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0100 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0110
* @tc.name SendEvent_triggerAction_0110
* @tc.desc The triggerAction of EventInfo is 'select', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0110', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0110 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'select';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0110 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0120
* @tc.name SendEvent_triggerAction_0120
* @tc.desc The triggerAction of EventInfo is 'setText', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0120', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0120 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'setText';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0120 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0130
* @tc.name SendEvent_triggerAction_0130
* @tc.desc The triggerAction of EventInfo is 'delete', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0130', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0130 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'delete';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0130 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0140
* @tc.name SendEvent_triggerAction_0140
* @tc.desc The triggerAction of EventInfo is 'scrollForward', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0140', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0140 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'scrollForward';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0140 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0150
* @tc.name SendEvent_triggerAction_0150
* @tc.desc The triggerAction of EventInfo is 'scrollBackward', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0150', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0150 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'scrollBackward';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0150 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0160
* @tc.name SendEvent_triggerAction_0160
* @tc.desc The triggerAction of EventInfo is 'setSelection', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0160', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0160 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'setSelection';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0160 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0170
* @tc.name SendEvent_triggerAction_0170
* @tc.desc The triggerAction of EventInfo is 'unfold', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0170', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0170 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'unfold';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0170 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0180
* @tc.name SendEvent_triggerAction_0180
* @tc.desc The triggerAction of EventInfo is 'fold', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0180', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0180 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'fold';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0180 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0190
* @tc.name SendEvent_triggerAction_0190
* @tc.desc The triggerAction of EventInfo is 'nextText', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0190', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0190 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'nextText';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0190 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0200
* @tc.name SendEvent_triggerAction_0200
* @tc.desc The triggerAction of EventInfo is 'previousText', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0200', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0200 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'previousText';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0200 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0210
* @tc.name SendEvent_triggerAction_0210
* @tc.desc The triggerAction of EventInfo is 'nextHtmlItem', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0210', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0210 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'nextHtmlItem';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0210 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0220
* @tc.name SendEvent_triggerAction_0220
* @tc.desc The triggerAction of EventInfo is 'previousHtmlItem', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0220', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0220 starts`);
let event = new accessibility.EventInfo();
let triggerAction = 'previousHtmlItem';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0220 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0230
* @tc.name SendEvent_triggerAction_0230
* @tc.desc The triggerAction of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to false
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0230', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0230 starts`);
let event = new accessibility.EventInfo();
let triggerAction = '';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(false);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0230 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_triggerAction_0240
* @tc.name SendEvent_triggerAction_0240
* @tc.desc The triggerAction of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to false
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_triggerAction_0240', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0240 starts`);
let event = new accessibility.EventInfo();
let triggerAction = null;
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(false);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0240 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_0010
* @tc.name SendEvent_textMoveUnit_0010
* @tc.desc The textMoveUnit of EventInfo is 'char', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_textMoveUnit_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_textMoveUnit_0010 starts`);
let event = new accessibility.EventInfo();
let textMoveUnit = 'char';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.textMoveUnit = textMoveUnit;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_0020
* @tc.name SendEvent_textMoveUnit_0020
* @tc.desc The textMoveUnit of EventInfo is 'word', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_textMoveUnit_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_textMoveUnit_0020 starts`);
let event = new accessibility.EventInfo();
let textMoveUnit = 'word';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.textMoveUnit = textMoveUnit;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_0030
* @tc.name SendEvent_textMoveUnit_0030
* @tc.desc The textMoveUnit of EventInfo is 'line', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_textMoveUnit_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_textMoveUnit_0030 starts`);
let event = new accessibility.EventInfo();
let textMoveUnit = 'line';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.textMoveUnit = textMoveUnit;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_0040
* @tc.name SendEvent_textMoveUnit_0040
* @tc.desc The textMoveUnit of EventInfo is 'page', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_textMoveUnit_0040', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_textMoveUnit_0040 starts`);
let event = new accessibility.EventInfo();
let textMoveUnit = 'page';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.textMoveUnit = textMoveUnit;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0040 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_0050
* @tc.name SendEvent_textMoveUnit_0050
* @tc.desc The textMoveUnit of EventInfo is 'paragraph', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_textMoveUnit_0050', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_textMoveUnit_0050 starts`);
let event = new accessibility.EventInfo();
let textMoveUnit = 'paragraph';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.textMoveUnit = textMoveUnit;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0050 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_0060
* @tc.name SendEvent_textMoveUnit_0060
* @tc.desc The textMoveUnit of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_textMoveUnit_0060', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_textMoveUnit_0060 starts`);
let event = new accessibility.EventInfo();
let textMoveUnit = '';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.textMoveUnit = textMoveUnit;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0060 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_0070
* @tc.name SendEvent_textMoveUnit_0070
* @tc.desc The textMoveUnit of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_textMoveUnit_0070', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_textMoveUnit_0070 starts`);
let event = new accessibility.EventInfo();
let textMoveUnit = null;
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.textMoveUnit = textMoveUnit;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0070 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_contents_0010
* @tc.name SendEvent_contents_0010
* @tc.desc The contents of EventInfo is ['1'], test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_contents_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_contents_0010 starts`);
let event = new accessibility.EventInfo();
let contents = ['1'];
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.contents = contents;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_contents_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_contents_0020
* @tc.name SendEvent_contents_0020
* @tc.desc The contents of EventInfo is [], test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_contents_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_contents_0020 starts`);
let event = new accessibility.EventInfo();
let contents = [];
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.contents = contents;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_contents_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_lastContent_0010
* @tc.name SendEvent_lastContent_0010
* @tc.desc The lastContent of EventInfo is '1', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_lastContent_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_lastContent_0010 starts`);
let event = new accessibility.EventInfo();
let lastContent = '1';
event.type = eventType;
event.bundleName = bundleName;
event.lastContent = lastContent;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_lastContent_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_lastContent_0020
* @tc.name SendEvent_lastContent_0020
* @tc.desc The lastContent of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_lastContent_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_lastContent_0020 starts`);
let event = new accessibility.EventInfo();
let lastContent = '';
event.type = eventType;
event.bundleName = bundleName;
event.lastContent = lastContent;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_lastContent_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_lastContent_0030
* @tc.name SendEvent_lastContent_0030
* @tc.desc The lastContent of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_lastContent_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_lastContent_0030 starts`);
let event = new accessibility.EventInfo();
let lastContent = null;
event.type = eventType;
event.bundleName = bundleName;
event.lastContent = lastContent;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_lastContent_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_beginIndex_0010
* @tc.name SendEvent_beginIndex_0010
* @tc.desc The beginIndex of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_beginIndex_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_beginIndex_0010 starts`);
let event = new accessibility.EventInfo();
let beginIndex = 1;
event.type = eventType;
event.bundleName = bundleName;
event.beginIndex = beginIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_beginIndex_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_beginIndex_0020
* @tc.name SendEvent_beginIndex_0020
* @tc.desc The beginIndex of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_beginIndex_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_beginIndex_0020 starts`);
let event = new accessibility.EventInfo();
let beginIndex = 0;
event.type = eventType;
event.bundleName = bundleName;
event.beginIndex = beginIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_beginIndex_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_beginIndex_0030
* @tc.name SendEvent_beginIndex_0030
* @tc.desc The beginIndex of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_beginIndex_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_beginIndex_0030 starts`);
let event = new accessibility.EventInfo();
let beginIndex = -1;
event.type = eventType;
event.bundleName = bundleName;
event.beginIndex = beginIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_beginIndex_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_currentIndex_0010
* @tc.name SendEvent_currentIndex_0010
* @tc.desc The currentIndex of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_currentIndex_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_currentIndex_0010 starts`);
let event = new accessibility.EventInfo();
let currentIndex = 1;
event.type = eventType;
event.bundleName = bundleName;
event.currentIndex = currentIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_currentIndex_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_currentIndex_0020
* @tc.name SendEvent_currentIndex_0020
* @tc.desc The currentIndex of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_currentIndex_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_currentIndex_0020 starts`);
let event = new accessibility.EventInfo();
let currentIndex = 0;
event.type = eventType;
event.bundleName = bundleName;
event.currentIndex = currentIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_currentIndex_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_currentIndex_0030
* @tc.name SendEvent_currentIndex_0030
* @tc.desc The currentIndex of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_currentIndex_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_currentIndex_0030 starts`);
let event = new accessibility.EventInfo();
let currentIndex = -1;
event.type = eventType;
event.bundleName = bundleName;
event.currentIndex = currentIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_currentIndex_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_endIndex_0010
* @tc.name SendEvent_endIndex_0010
* @tc.desc The endIndex of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_endIndex_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_endIndex_0010 starts`);
let event = new accessibility.EventInfo();
let endIndex = 1;
event.type = eventType;
event.bundleName = bundleName;
event.endIndex = endIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_endIndex_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_endIndex_0020
* @tc.name SendEvent_endIndex_0020
* @tc.desc The endIndex of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_endIndex_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_endIndex_0020 starts`);
let event = new accessibility.EventInfo();
let endIndex = 0;
event.type = eventType;
event.bundleName = bundleName;
event.endIndex = endIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_endIndex_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_endIndex_0030
* @tc.name SendEvent_endIndex_0030
* @tc.desc The endIndex of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_endIndex_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_endIndex_0030 starts`);
let event = new accessibility.EventInfo();
let endIndex = -1;
event.type = eventType;
event.bundleName = bundleName;
event.endIndex = endIndex;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_endIndex_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_itemCount_0010
* @tc.name SendEvent_itemCount_0010
* @tc.desc The itemCount of EventInfo is 1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_itemCount_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_itemCount_0010 starts`);
let event = new accessibility.EventInfo();
let itemCount = 1;
event.type = eventType;
event.bundleName = bundleName;
event.itemCount = itemCount;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_itemCount_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_itemCount_0020
* @tc.name SendEvent_itemCount_0020
* @tc.desc The itemCount of EventInfo is 0, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_itemCount_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_itemCount_0020 starts`);
let event = new accessibility.EventInfo();
let itemCount = 0;
event.type = eventType;
event.bundleName = bundleName;
event.itemCount = itemCount;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_itemCount_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_itemCount_0030
* @tc.name SendEvent_itemCount_0030
* @tc.desc The itemCount of EventInfo is -1, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_itemCount_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_itemCount_0030 starts`);
let event = new accessibility.EventInfo();
let itemCount = -1;
event.type = eventType;
event.bundleName = bundleName;
event.itemCount = itemCount;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_itemCount_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0010
* @tc.name SendEvent_categoryNotification_0010
* @tc.desc The categoryNotification of EventInfo is 'call', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0010 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'call';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0020
* @tc.name SendEvent_categoryNotification_0020
* @tc.desc The categoryNotification of EventInfo is 'msg', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0020 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'msg';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0030
* @tc.name SendEvent_categoryNotification_0030
* @tc.desc The categoryNotification of EventInfo is 'email', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0030 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'email';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0040
* @tc.name SendEvent_categoryNotification_0040
* @tc.desc The categoryNotification of EventInfo is 'event', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0040', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0040 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'event';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0040 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0050
* @tc.name SendEvent_categoryNotification_0050
* @tc.desc The categoryNotification of EventInfo is 'promo', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0050', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0050 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'promo';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0050 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0060
* @tc.name SendEvent_categoryNotification_0060
* @tc.desc The categoryNotification of EventInfo is 'alarm', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0060', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0060 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'alarm';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0060 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0070
* @tc.name SendEvent_categoryNotification_0070
* @tc.desc The categoryNotification of EventInfo is 'progress', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0070', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0070 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'progress';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0070 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0080
* @tc.name SendEvent_categoryNotification_0080
* @tc.desc The categoryNotification of EventInfo is 'social', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0080', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0080 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'social';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0080 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0090
* @tc.name SendEvent_categoryNotification_0090
* @tc.desc The categoryNotification of EventInfo is 'err', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0090', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0090 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'err';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0090 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0100
* @tc.name SendEvent_categoryNotification_0100
* @tc.desc The categoryNotification of EventInfo is 'transport', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0100', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0100 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'transport';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0100 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0110
* @tc.name SendEvent_categoryNotification_0110
* @tc.desc The categoryNotification of EventInfo is 'sys', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0110', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0110 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'sys';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0110 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0120
* @tc.name SendEvent_categoryNotification_0120
* @tc.desc The categoryNotification of EventInfo is 'service', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0120', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0120 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = 'service';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0120 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0130
* @tc.name SendEvent_categoryNotification_0130
* @tc.desc The categoryNotification of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0130', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0130 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = '';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0130 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_categoryNotification_0140
* @tc.name SendEvent_categoryNotification_0140
* @tc.desc The categoryNotification of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_categoryNotification_0140', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_categoryNotification_0140 starts`);
let event = new accessibility.EventInfo();
let categoryNotification = null;
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.categoryNotification = categoryNotification;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_categoryNotification_0140 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0010
* @tc.name SendEvent_gestureType_0010
* @tc.desc The gestureType of EventInfo is 'left', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0010', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0010 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'left';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0010 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0020
* @tc.name SendEvent_gestureType_0020
* @tc.desc The gestureType of EventInfo is 'leftThenRight', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0020', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0020 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'leftThenRight';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0020 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0030
* @tc.name SendEvent_gestureType_0030
* @tc.desc The gestureType of EventInfo is 'leftThenUp', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0030', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0030 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'leftThenUp';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0030 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0040
* @tc.name SendEvent_gestureType_0040
* @tc.desc The gestureType of EventInfo is 'leftThenDown', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0040', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0040 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'leftThenDown';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0040 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0050
* @tc.name SendEvent_gestureType_0050
* @tc.desc The gestureType of EventInfo is 'right', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0050', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0050 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'right';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0050 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0060
* @tc.name SendEvent_gestureType_0060
* @tc.desc The gestureType of EventInfo is 'rightThenLeft', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0060', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0060 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'rightThenLeft';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0060 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0070
* @tc.name SendEvent_gestureType_0070
* @tc.desc The gestureType of EventInfo is 'rightThenUp', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0070', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0070 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'rightThenUp';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0070 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0080
* @tc.name SendEvent_gestureType_0080
* @tc.desc The gestureType of EventInfo is 'rightThenDown', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0080', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0080 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'rightThenDown';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0080 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0090
* @tc.name SendEvent_gestureType_0090
* @tc.desc The gestureType of EventInfo is 'up', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0090', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0090 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'up';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0090 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0100
* @tc.name SendEvent_gestureType_0100
* @tc.desc The gestureType of EventInfo is 'upThenLeft', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0100', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0100 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'upThenLeft';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0100 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0110
* @tc.name SendEvent_gestureType_0110
* @tc.desc The gestureType of EventInfo is 'upThenRight', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0110', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0110 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'upThenRight';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0110 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0120
* @tc.name SendEvent_gestureType_0120
* @tc.desc The gestureType of EventInfo is 'upThenDown', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0120', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0120 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'upThenDown';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0120 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0130
* @tc.name SendEvent_gestureType_0130
* @tc.desc The gestureType of EventInfo is 'down', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0130', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0130 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'down';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0130 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0140
* @tc.name SendEvent_gestureType_0140
* @tc.desc The gestureType of EventInfo is 'downThenLeft', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0140', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0140 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'downThenLeft';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0140 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0150
* @tc.name SendEvent_gestureType_0150
* @tc.desc The gestureType of EventInfo is 'downThenRight', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0150', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0150 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'downThenRight';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0150 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0160
* @tc.name SendEvent_gestureType_0160
* @tc.desc The gestureType of EventInfo is 'downThenUp', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0160', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0160 starts`);
let event = new accessibility.EventInfo();
let gestureType = 'downThenUp';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0160 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0170
* @tc.name SendEvent_gestureType_0170
* @tc.desc The gestureType of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0170', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0170 starts`);
let event = new accessibility.EventInfo();
let gestureType = '';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0170 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
/*
* @tc.number SendEvent_gestureType_0180
* @tc.name SendEvent_gestureType_0180
* @tc.desc The gestureType of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to true
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_gestureType_0180', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_gestureType_0180 starts`);
let event = new accessibility.EventInfo();
let gestureType = null;
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
event.gestureType = gestureType;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(true);
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_gestureType_0180 has error: ${err}`);
expect(null).assertFail();
}).finally(() => {
done();
});
})
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册