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

!4674 合入无障碍的xts api全case

Merge pull request !4674 from Mupceet/release_0726_xts
......@@ -22,6 +22,7 @@ group("barrierfree") {
"accessibilityevent:ActsAccessibilityEventTest",
"accessibilityextension:ActsAccessibilityExtensionTest",
"accessibilityextensioncontext:ActsAccessibilityExtensionContextTest",
"accessibilitygestureevent:ActsAccessibilityGestureEventTest",
"accessibleabilitylist:ActsAccessibleAbilityListTest",
"accessiblecaptionconfiguration:ActsAccessibleCaptionConfigurationTest",
"accessiblecheckability:ActsAccessibleCheckAbilityTest",
......
......@@ -28,6 +28,1688 @@ export default function abilityTest() {
setTimeout(done, 1000);
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_0100
* @tc.name AccessibilityConfigTest_set_asyncCallback_0100
* @tc.desc Test highContrastText.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_0100', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_0100');
config.highContrastText.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_0100 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_0200
* @tc.name AccessibilityConfigTest_set_asyncPromise_0200
* @tc.desc Test highContrastText.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_0200', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_0200');
config.highContrastText.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_0200 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_0200 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_0300
* @tc.name AccessibilityConfigTest_get_asyncCallback_0300
* @tc.desc Test highContrastText.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_0300', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_0300');
config.highContrastText.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_0300 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_0400
* @tc.name AccessibilityConfigTest_get_asyncPromise_0400
* @tc.desc Test highContrastText.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_0400', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_0400');
config.highContrastText.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_0400 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_0400 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_0500
* @tc.name AccessibilityConfigTest_on_asyncCallback_0500
* @tc.desc Test highContrastText.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_0500', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_0500');
let ret = config.highContrastText.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_0600
* @tc.name AccessibilityConfigTest_off_asyncCallback_0600
* @tc.desc Test highContrastText.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_0600', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_0600');
let ret = config.highContrastText.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_0700
* @tc.name AccessibilityConfigTest_set_asyncCallback_0700
* @tc.desc Test invertColor.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_0700', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_0700');
config.invertColor.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_0700 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_0800
* @tc.name AccessibilityConfigTest_set_asyncPromise_0800
* @tc.desc Test invertColor.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_0800', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_0800');
config.invertColor.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_0800 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_0800 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_0900
* @tc.name AccessibilityConfigTest_get_asyncCallback_0900
* @tc.desc Test invertColor.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_0900', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_0900');
config.invertColor.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_0900 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_1000
* @tc.name AccessibilityConfigTest_get_asyncPromise_1000
* @tc.desc Test invertColor.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_1000', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_1000');
config.invertColor.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_1000 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_1000 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_1100
* @tc.name AccessibilityConfigTest_on_asyncCallback_1100
* @tc.desc Test invertColor.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_1100', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_1100');
let ret = config.invertColor.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_1200
* @tc.name AccessibilityConfigTest_off_asyncCallback_1200
* @tc.desc Test invertColor.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_1200', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_1200');
let ret = config.invertColor.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_1300
* @tc.name AccessibilityConfigTest_set_asyncCallback_1300
* @tc.desc Test contentTimeout.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_1300', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_1300');
config.contentTimeout.set(0, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_1300 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_1400
* @tc.name AccessibilityConfigTest_set_asyncPromise_1400
* @tc.desc Test contentTimeout.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_1400', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_1400');
config.contentTimeout.set(5000).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_1400 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_1400 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_1500
* @tc.name AccessibilityConfigTest_get_asyncCallback_1500
* @tc.desc Test contentTimeout.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_1500', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_1500');
config.contentTimeout.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_1500 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('number').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_1600
* @tc.name AccessibilityConfigTest_get_asyncPromise_1600
* @tc.desc Test contentTimeout.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_1600', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_1600');
config.contentTimeout.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_1600 result: ${result}`);
expect('number').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_1600 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_1700
* @tc.name AccessibilityConfigTest_on_asyncCallback_1700
* @tc.desc Test contentTimeout.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_1700', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_1700');
let ret = config.contentTimeout.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_1800
* @tc.name AccessibilityConfigTest_off_asyncCallback_1800
* @tc.desc Test contentTimeout.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_1800', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_1800');
let ret = config.contentTimeout.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_1900
* @tc.name AccessibilityConfigTest_set_asyncCallback_1900
* @tc.desc Test animationOff.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_1900', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_1900');
config.animationOff.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_1900 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_2000
* @tc.name AccessibilityConfigTest_set_asyncPromise_2000
* @tc.desc Test animationOff.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_2000', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_2000');
config.animationOff.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_2000 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_2000 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_2100
* @tc.name AccessibilityConfigTest_get_asyncCallback_2100
* @tc.desc Test animationOff.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_2100', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_2100');
config.animationOff.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_2100 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_2200
* @tc.name AccessibilityConfigTest_get_asyncPromise_2200
* @tc.desc Test animationOff.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_2200', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_2200');
config.animationOff.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_2200 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_2200 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_2300
* @tc.name AccessibilityConfigTest_on_asyncCallback_2300
* @tc.desc Test animationOff.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_2300', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_2300');
let ret = config.animationOff.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_2400
* @tc.name AccessibilityConfigTest_off_asyncCallback_2400
* @tc.desc Test animationOff.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_2400', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_2400');
let ret = config.animationOff.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_2500
* @tc.name AccessibilityConfigTest_set_asyncCallback_2500
* @tc.desc Test brightnessDiscount.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_2500', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_2500');
config.brightnessDiscount.set(0.1, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_2500 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_2600
* @tc.name AccessibilityConfigTest_set_asyncPromise_2600
* @tc.desc Test brightnessDiscount.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_2600', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_2600');
config.brightnessDiscount.set(0.9).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_2600 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_2600 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_2700
* @tc.name AccessibilityConfigTest_get_asyncCallback_2700
* @tc.desc Test brightnessDiscount.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_2700', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_2700');
config.brightnessDiscount.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_2700 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('number').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_2800
* @tc.name AccessibilityConfigTest_get_asyncPromise_2800
* @tc.desc Test brightnessDiscount.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_2800', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_2800');
config.brightnessDiscount.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_2800 result: ${result}`);
expect('number').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_2800 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_2900
* @tc.name AccessibilityConfigTest_on_asyncCallback_2900
* @tc.desc Test brightnessDiscount.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_2900', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_2900');
let ret = config.brightnessDiscount.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_3000
* @tc.name AccessibilityConfigTest_off_asyncCallback_3000
* @tc.desc Test brightnessDiscount.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_3000', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_3000');
let ret = config.brightnessDiscount.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_3100
* @tc.name AccessibilityConfigTest_set_asyncCallback_3100
* @tc.desc Test screenMagnifier.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_3100', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_3100');
config.screenMagnifier.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_3100 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_3200
* @tc.name AccessibilityConfigTest_set_asyncPromise_3200
* @tc.desc Test screenMagnifier.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_3200', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_3200');
config.screenMagnifier.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_3200 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_3200 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_3300
* @tc.name AccessibilityConfigTest_get_asyncCallback_3300
* @tc.desc Test screenMagnifier.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_3300', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_3300');
config.screenMagnifier.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_3300 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_3400
* @tc.name AccessibilityConfigTest_get_asyncPromise_3400
* @tc.desc Test screenMagnifier.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_3400', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_3400');
config.screenMagnifier.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_3400 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_3400 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_3500
* @tc.name AccessibilityConfigTest_on_asyncCallback_3500
* @tc.desc Test screenMagnifier.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_3500', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_3500');
let ret = config.screenMagnifier.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_3600
* @tc.name AccessibilityConfigTest_off_asyncCallback_3600
* @tc.desc Test screenMagnifier.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_3600', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_3600');
let ret = config.screenMagnifier.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_3700
* @tc.name AccessibilityConfigTest_set_asyncCallback_3700
* @tc.desc Test audioMono.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_3700', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_3700');
config.audioMono.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_3700 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_3800
* @tc.name AccessibilityConfigTest_set_asyncPromise_3800
* @tc.desc Test audioMono.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_3800', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_3800');
config.audioMono.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_3800 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_3800 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_3900
* @tc.name AccessibilityConfigTest_get_asyncCallback_3900
* @tc.desc Test audioMono.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_3900', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_3900');
config.audioMono.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_3900 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_4000
* @tc.name AccessibilityConfigTest_get_asyncPromise_4000
* @tc.desc Test audioMono.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_4000', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_4000');
config.audioMono.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_4000 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_4000 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_4100
* @tc.name AccessibilityConfigTest_on_asyncCallback_4100
* @tc.desc Test audioMono.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_4100', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_4100');
let ret = config.audioMono.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_4200
* @tc.name AccessibilityConfigTest_off_asyncCallback_4200
* @tc.desc Test audioMono.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_4200', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_4200');
let ret = config.audioMono.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_4300
* @tc.name AccessibilityConfigTest_set_asyncCallback_4300
* @tc.desc Test audioBalance.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_4300', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_4300');
config.audioBalance.set(0, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_4300 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_4400
* @tc.name AccessibilityConfigTest_set_asyncPromise_4400
* @tc.desc Test audioBalance.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_4400', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_4400');
config.audioBalance.set(-1).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_4400 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_4400 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_4500
* @tc.name AccessibilityConfigTest_get_asyncCallback_4500
* @tc.desc Test audioBalance.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_4500', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_4500');
config.audioBalance.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_4500 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('number').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_4600
* @tc.name AccessibilityConfigTest_get_asyncPromise_4600
* @tc.desc Test audioBalance.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_4600', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_4600');
config.audioBalance.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_4600 result: ${result}`);
expect('number').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_4600 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_4700
* @tc.name AccessibilityConfigTest_on_asyncCallback_4700
* @tc.desc Test audioBalance.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_4700', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_4700');
let ret = config.audioBalance.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_4800
* @tc.name AccessibilityConfigTest_off_asyncCallback_4800
* @tc.desc Test audioBalance.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_4800', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_4800');
let ret = config.audioBalance.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_4900
* @tc.name AccessibilityConfigTest_set_asyncCallback_4900
* @tc.desc Test mouseKey.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_4900', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_4900');
config.mouseKey.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_4900 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_5000
* @tc.name AccessibilityConfigTest_set_asyncPromise_5000
* @tc.desc Test mouseKey.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_5000', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_5000');
config.mouseKey.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_5000 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_5000 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_5100
* @tc.name AccessibilityConfigTest_get_asyncCallback_5100
* @tc.desc Test mouseKey.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_5100', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_5100');
config.mouseKey.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_5100 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_5200
* @tc.name AccessibilityConfigTest_get_asyncPromise_5200
* @tc.desc Test mouseKey.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_5200', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_5200');
config.mouseKey.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_5200 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_5200 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_5300
* @tc.name AccessibilityConfigTest_on_asyncCallback_5300
* @tc.desc Test mouseKey.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_5300', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_5300');
let ret = config.mouseKey.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_5400
* @tc.name AccessibilityConfigTest_off_asyncCallback_5400
* @tc.desc Test mouseKey.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_5400', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_5400');
let ret = config.mouseKey.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_5500
* @tc.name AccessibilityConfigTest_set_asyncCallback_5500
* @tc.desc Test mouseAutoClick.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_5500', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_5500');
config.mouseAutoClick.set(-1, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_5500 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_5600
* @tc.name AccessibilityConfigTest_set_asyncPromise_5600
* @tc.desc Test mouseAutoClick.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_5600', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_5600');
config.mouseAutoClick.set(5000).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_5600 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_5600 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_5700
* @tc.name AccessibilityConfigTest_get_asyncCallback_5700
* @tc.desc Test mouseAutoClick.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_5700', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_5700');
config.mouseAutoClick.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_5700 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('number').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_5800
* @tc.name AccessibilityConfigTest_get_asyncPromise_5800
* @tc.desc Test mouseAutoClick.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_5800', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_5800');
config.mouseAutoClick.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_5800 result: ${result}`);
expect('number').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_5800 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_5900
* @tc.name AccessibilityConfigTest_on_asyncCallback_5900
* @tc.desc Test mouseAutoClick.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_5900', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_5900');
let ret = config.mouseAutoClick.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_6000
* @tc.name AccessibilityConfigTest_off_asyncCallback_6000
* @tc.desc Test mouseAutoClick.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_6000', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_6000');
let ret = config.mouseAutoClick.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_6100
* @tc.name AccessibilityConfigTest_set_asyncCallback_6100
* @tc.desc Test shortkey.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_6100', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_6100');
config.shortkey.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_6100 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_6200
* @tc.name AccessibilityConfigTest_set_asyncPromise_6200
* @tc.desc Test shortkey.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_6200', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_6200');
config.shortkey.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_6200 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_6200 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_6300
* @tc.name AccessibilityConfigTest_get_asyncCallback_6300
* @tc.desc Test shortkey.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_6300', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_6300');
config.shortkey.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_6300 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_6400
* @tc.name AccessibilityConfigTest_get_asyncPromise_6400
* @tc.desc Test shortkey.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_6400', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_6400');
config.shortkey.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_6400 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_6400 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_6500
* @tc.name AccessibilityConfigTest_on_asyncCallback_6500
* @tc.desc Test shortkey.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_6500', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_6500');
let ret = config.shortkey.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_6600
* @tc.name AccessibilityConfigTest_off_asyncCallback_6600
* @tc.desc Test shortkey.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_6600', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_6600');
let ret = config.shortkey.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_6700
* @tc.name AccessibilityConfigTest_set_asyncCallback_6700
* @tc.desc Test shortkeyTarget.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_6700', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_6700');
let value = 'teststr'
config.shortkeyTarget.set(value, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_6700 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_6800
* @tc.name AccessibilityConfigTest_set_asyncPromise_6800
* @tc.desc Test shortkeyTarget.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_6800', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_6800');
let value = 'test'
config.shortkeyTarget.set(value).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_6800 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_6800 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_6900
* @tc.name AccessibilityConfigTest_get_asyncCallback_6900
* @tc.desc Test shortkeyTarget.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_6900', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_6900');
config.shortkeyTarget.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_6900 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('string').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_7000
* @tc.name AccessibilityConfigTest_get_asyncPromise_7000
* @tc.desc Test shortkeyTarget.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_7000', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_7000');
config.shortkeyTarget.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_7000 result: ${result}`);
expect('string').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_7000 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_7100
* @tc.name AccessibilityConfigTest_on_asyncCallback_7100
* @tc.desc Test shortkeyTarget.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_7100', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_7100');
let ret = config.shortkeyTarget.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_7200
* @tc.name AccessibilityConfigTest_off_asyncCallback_7200
* @tc.desc Test shortkeyTarget.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_7200', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_7200');
let ret = config.shortkeyTarget.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_7300
* @tc.name AccessibilityConfigTest_set_asyncCallback_7300
* @tc.desc Test captions.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_7300', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_7300');
config.captions.set(true, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_7300 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_7400
* @tc.name AccessibilityConfigTest_set_asyncPromise_7400
* @tc.desc Test captions.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_7400', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_7400');
config.captions.set(false).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_7400 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_7400 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_7500
* @tc.name AccessibilityConfigTest_get_asyncCallback_7500
* @tc.desc Test captions.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_7500', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_7500');
config.captions.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_7500 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('boolean').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_7600
* @tc.name AccessibilityConfigTest_get_asyncPromise_7600
* @tc.desc Test captions.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_7600', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_7600');
config.captions.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_7600 result: ${result}`);
expect('boolean').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_7600 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_7700
* @tc.name AccessibilityConfigTest_on_asyncCallback_7700
* @tc.desc Test captions.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_7700', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_7700');
let ret = config.captions.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_7800
* @tc.name AccessibilityConfigTest_off_asyncCallback_7800
* @tc.desc Test captions.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_7800', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_7800');
let ret = config.captions.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_7900
* @tc.name AccessibilityConfigTest_set_asyncCallback_7900
* @tc.desc Test daltonizationColorFilter.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_7900', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_7900');
let value = 'Normal';
config.daltonizationColorFilter.set(value, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_7900 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_8000
* @tc.name AccessibilityConfigTest_set_asyncCallback_8000
* @tc.desc Test daltonizationColorFilter.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_8000', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_8000');
let value = 'Deuteranomaly';
config.daltonizationColorFilter.set(value, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_8000 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_8100
* @tc.name AccessibilityConfigTest_set_asyncPromise_8100
* @tc.desc Test daltonizationColorFilter.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_8100', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_8100');
let value = 'Protanomaly';
config.daltonizationColorFilter.set(value).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_8100 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_8100 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_8200
* @tc.name AccessibilityConfigTest_set_asyncPromise_8200
* @tc.desc Test daltonizationColorFilter.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_8200', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_8200');
let value = 'Tritanomaly';
config.daltonizationColorFilter.set(value).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_8200 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_8200 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_8300
* @tc.name AccessibilityConfigTest_get_asyncCallback_8300
* @tc.desc Test daltonizationColorFilter.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_8300', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_8300');
config.daltonizationColorFilter.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_8300 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('string').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_8400
* @tc.name AccessibilityConfigTest_get_asyncPromise_8400
* @tc.desc Test daltonizationColorFilter.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_8400', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_8400');
config.daltonizationColorFilter.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_8400 result: ${result}`);
expect('string').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_8400 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_8500
* @tc.name AccessibilityConfigTest_on_asyncCallback_8500
* @tc.desc Test daltonizationColorFilter.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_8500', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_8500');
let ret = config.daltonizationColorFilter.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_8600
* @tc.name AccessibilityConfigTest_off_asyncCallback_8600
* @tc.desc Test daltonizationColorFilter.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_8600', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_8600');
let ret = config.daltonizationColorFilter.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_set_asyncCallback_8700
* @tc.name AccessibilityConfigTest_set_asyncCallback_8700
* @tc.desc Test captionsStyle.set() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncCallback_8700', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncCallback_8700');
let value = {};
value.fontFamily = 'default';
value.fontScale = 10;
value.fontColor = 'blue';
value.fontEdgeType = 'none';
value.backgroundColor = 'blue';
value.windowColor = 'blue';
config.captionsStyle.set(value, (err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_set_asyncCallback_8700 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect(result).assertEqual(undefined);
done();
});
})
/*
* @tc.number AccessibilityConfigTest_set_asyncPromise_8800
* @tc.name AccessibilityConfigTest_set_asyncPromise_8800
* @tc.desc Test captionsStyle.set() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_set_asyncPromise_8800', 0, async function(done) {
console.info('AccessibilityConfigTest_set_asyncPromise_8800');
let value = {};
value.fontFamily = 'default';
value.fontScale = 10;
value.fontColor = 'blue';
value.fontEdgeType = 'none';
value.backgroundColor = 'blue';
value.windowColor = 'blue';
config.captionsStyle.set(value).then((result) => {
console.info(`AccessibilityConfigTest_set_asyncPromise_8800 result: ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_set_asyncPromise_8800 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncCallback_8900
* @tc.name AccessibilityConfigTest_get_asyncCallback_8900
* @tc.desc Test captionsStyle.get() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncCallback_8900', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncCallback_8900');
config.captionsStyle.get((err, result) => {
if (err.code != 0) {
console.error(`AccessibilityConfigTest_get_asyncCallback_8900 has error: ${err.code}`);
expect(null).assertFail();
done();
}
expect('object').assertEqual(typeof (result));
done();
});
})
/*
* @tc.number AccessibilityConfigTest_get_asyncPromise_9000
* @tc.name AccessibilityConfigTest_get_asyncPromise_9000
* @tc.desc Test captionsStyle.get() function in promise mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_get_asyncPromise_9000', 0, async function(done) {
console.info('AccessibilityConfigTest_get_asyncPromise_9000');
config.captionsStyle.get().then((result) => {
console.info(`AccessibilityConfigTest_get_asyncPromise_9000 result: ${result}`);
expect('object').assertEqual(typeof (result));
done();
}).catch((err) => {
console.error(`AccessibilityConfigTest_get_asyncPromise_9000 has error: ${err.code}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number AccessibilityConfigTest_on_asyncCallback_9100
* @tc.name AccessibilityConfigTest_on_asyncCallback_9100
* @tc.desc Test captionsStyle.on() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_on_asyncCallback_9100', 0, async function(done) {
console.info('AccessibilityConfigTest_on_asyncCallback_9100');
let ret = config.captionsStyle.on((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_off_asyncCallback_9200
* @tc.name AccessibilityConfigTest_off_asyncCallback_9200
* @tc.desc Test captionsStyle.off() function in callback mode.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityConfigTest_off_asyncCallback_9200', 0, async function(done) {
console.info('AccessibilityConfigTest_off_asyncCallback_9200');
let ret = config.captionsStyle.off((data) => {});
expect(ret).assertEqual(undefined);
done();
})
/*
* @tc.number AccessibilityConfigTest_enableAbility_asyncCallback_9300
* @tc.name AccessibilityConfigTest_enableAbility_asyncCallback_9300
......
......@@ -32,8 +32,6 @@ class AccessibilityExtAbility extends AccessibilityExtensionAbility {
function publishCallback(err) {
console.info("onConnect====>onConnect publish call back result:" + JSON.stringify(err));
}
this.context.setEventTypeFilter(['click']);
}
onDisconnect() {
......
......@@ -157,7 +157,13 @@ export class ElementTest {
result = await this.executeAttributeValuePromise(caseName, 'endIndex', 'number');
break;
case 'AccessibilityElementTest_attributeValue_asyncPromise_3700':
result = await this.executeAttributeValuePromise(caseName, 'rangeInfo', 'object');
result = await this.executeAttributeValuePromise(caseName, 'valueMax', 'number');
break;
case 'AccessibilityElementTest_attributeValue_asyncPromise_3800':
result = await this.executeAttributeValuePromise(caseName, 'valueMin', 'number');
break;
case 'AccessibilityElementTest_attributeValue_asyncPromise_3900':
result = await this.executeAttributeValuePromise(caseName, 'valueNow', 'number');
break;
case 'AccessibilityElementTest_attributeValue_asyncPromise_4200':
result = await this.executeAttributeValuePromise(caseName, 'error', 'string');
......@@ -391,7 +397,13 @@ export class ElementTest {
await this.executeAttributeValueCallback(caseName, 'endIndex', 'number');
return;
case 'AccessibilityElementTest_attributeValue_asyncCallback_3700':
await this.executeAttributeValueCallback(caseName, 'rangeInfo', 'object');
await this.executeAttributeValueCallback(caseName, 'valueMax', 'number');
return;
case 'AccessibilityElementTest_attributeValue_asyncCallback_3800':
await this.executeAttributeValueCallback(caseName, 'valueMin', 'number');
return;
case 'AccessibilityElementTest_attributeValue_asyncCallback_3900':
await this.executeAttributeValueCallback(caseName, 'valueNow', 'number');
return;
case 'AccessibilityElementTest_attributeValue_asyncCallback_4200':
await this.executeAttributeValueCallback(caseName, 'error', 'string');
......
......@@ -136,6 +136,35 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_0300
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_0300
* @tc.desc Test attributeValue() when input is 'pageId', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_0300', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_0300';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_0500
......@@ -557,6 +586,36 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_2000
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_2000
* @tc.desc Test attributeValue() when input is 'accessibilityFocused', should return a boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_2000', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_2000';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_2100
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_2100
......@@ -797,6 +856,36 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_3100
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_3100
* @tc.desc Test attributeValue() when input is 'isHint', should return a boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_3100', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_3100';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_3300
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_3300
......@@ -917,6 +1006,126 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_3700
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_3700
* @tc.desc Test attributeValue() when input is 'valueMax', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_3700', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_3700';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_3800
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_3800
* @tc.desc Test attributeValue() when input is 'valueMin', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_3800', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_3800';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_3900
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_3900
* @tc.desc Test attributeValue() when input is 'valueNow', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_3900', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_3900';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_4200
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_4200
* @tc.desc Test attributeValue() when input is 'error', should return a string type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_4200', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_4200';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_4300
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_4300
......@@ -1217,6 +1426,66 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_5600
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_5600
* @tc.desc Test attributeValue() when input is 'rootElement', should return an AccessibilityElement type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_5600', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_5600';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_5700
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_5700
* @tc.desc Test attributeValue() when input is 'windowId', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncPromise_5700', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncPromise_5700';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncPromise_5800
* @tc.name AccessibilityElementTest_attributeValue_asyncPromise_5800
......@@ -2267,6 +2536,35 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_0300
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_0300
* @tc.desc Test attributeValue() when input is 'pageId', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_0300', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_0300';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_0500
......@@ -2688,6 +2986,36 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_2000
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_2000
* @tc.desc Test attributeValue() when input is 'accessibilityFocused', should return a boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_2000', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_2000';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_2100
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_2100
......@@ -2928,6 +3256,36 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_3100
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_3100
* @tc.desc Test attributeValue() when input is 'isHint', should return a boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_3100', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_3100';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_3300
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_3300
......@@ -3048,6 +3406,126 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_3700
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_3700
* @tc.desc Test attributeValue() when input is 'valueMax', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_3700', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_3700';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_3800
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_3800
* @tc.desc Test attributeValue() when input is 'valueMin', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_3800', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_3800';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_3900
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_3900
* @tc.desc Test attributeValue() when input is 'valueNow', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_3900', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_3900';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_4200
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_4200
* @tc.desc Test attributeValue() when input is 'error', should return a string type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_4200', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_4200';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_4300
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_4300
......@@ -3348,6 +3826,66 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_5600
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_5600
* @tc.desc Test attributeValue() when input is 'rootElement', should return an AccessibilityElement type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_5600', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_5600';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_5700
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_5700
* @tc.desc Test attributeValue() when input is 'windowId', should return a number type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityElementTest_attributeValue_asyncCallback_5700', 0, async function (done) {
let caseName = 'AccessibilityElementTest_attributeValue_asyncCallback_5700';
console.info(caseName + ' start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': fail, for no caseResult');
expect(null).assertFail();
}
done();
}, 2000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityElementTest_attributeValue_asyncCallback_5800
* @tc.name AccessibilityElementTest_attributeValue_asyncCallback_5800
......
......@@ -26,11 +26,6 @@ class AccessibilityExtAbility extends AccessibilityExtensionAbility {
function publishCallback(err) {
console.info("[Demo] onConnect====>onConnect publish call back result:" + JSON.stringify(err));
}
this.context.setEventTypeFilter([
'accessibilityFocus', 'accessibilityFocusClear', 'click', 'longClick', 'focus', 'select', 'hoverEnter',
'hoverExit', 'textUpdate', 'textSelectionUpdate', 'scroll'
]);
}
onDisconnect() {
......
......@@ -62,62 +62,6 @@ export class ExtensionContextTest {
let gesturePos3 = {};
switch (caseName) {
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0100':
eventType = ['accessibilityFocus'];
this.setEventTypeFilterCallback(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0200':
eventType = ['accessibilityFocusClear'];
this.setEventTypeFilterCallback(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0300':
eventType = ['click', 'longClick'];
this.setEventTypeFilterCallback(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0400':
eventType = ['focus', 'select'];
this.setEventTypeFilterCallback(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0500':
eventType = ['hoverEnter', 'hoverExit'];
this.setEventTypeFilterCallback(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0600':
eventType = ['accessibilityFocus', 'accessibilityFocusClear', 'click', 'longClick',
'focus', 'select', 'hoverEnter', 'hoverExit', 'textUpdate', 'textSelectionUpdate','scroll'];
this.setEventTypeFilterCallback(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0700':
this.setEventTypeFilterCallback(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0800':
eventType = ['accessibilityFocus'];
this.setEventTypeFilterPromise(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0900':
eventType = ['accessibilityFocusClear'];
this.setEventTypeFilterPromise(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1000':
eventType = ['click', 'longClick'];
this.setEventTypeFilterPromise(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1100':
eventType = ['focus', 'select'];
this.setEventTypeFilterPromise(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1200':
eventType = ['hoverEnter', 'hoverExit'];
this.setEventTypeFilterPromise(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1300':
eventType = ['accessibilityFocus', 'accessibilityFocusClear', 'click', 'longClick',
'focus', 'select', 'hoverEnter', 'hoverExit', 'textUpdate', 'textSelectionUpdate','scroll'];
this.setEventTypeFilterPromise(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1400':
this.setEventTypeFilterPromise(caseName, eventType);
break;
case 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500':
bundleName = ['com.example.accessibleformextension'];
this.setTargetBundleNameCallback(caseName, bundleName);
......@@ -374,83 +318,26 @@ export class ExtensionContextTest {
}
}
private async setEventTypeFilterCallback(caseName: string, eventType: Array<accessibility.Event>) {
let result = false;
if (eventType.length == 0) {
this.context.setEventTypeFilter(eventType, (err, res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (err.code != 0 ) {
console.error(caseName + " err: " + JSON.stringify(err.code));
result = true;
}
if (res == undefined) {
result = true;
}
this.publishCaseResult(caseName, result);
});
} else {
this.context.setEventTypeFilter(eventType, (err, res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (err.code != 0 ) {
console.error(caseName + " err: " + JSON.stringify(err.code));
}
if (typeof(res) == 'boolean') {
result = true;
}
this.publishCaseResult(caseName, result);
});
}
}
private async setEventTypeFilterPromise(caseName: string, eventType: Array<accessibility.Event>) {
let result = false;
if (eventType.length == 0) {
this.context.setEventTypeFilter(eventType).then((res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (res == undefined) {
result = true;
}
this.publishCaseResult(caseName, result);
}).catch((error) => {
console.error(caseName + " error: " + JSON.stringify(error));
result = true;
this.publishCaseResult(caseName, result);
});
} else {
this.context.setEventTypeFilter(eventType).then((res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (typeof(res) == 'boolean') {
result = true;
}
this.publishCaseResult(caseName, result);
}).catch((error) => {
console.error(caseName + " error: " + JSON.stringify(error));
this.publishCaseResult(caseName, result);
});
}
}
private async setTargetBundleNameCallback(caseName: string, bundleName: Array<string>) {
let result = false;
let result = true;
this.context.setTargetBundleName(bundleName, (err, res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (err.code != 0) {
console.error(caseName + " err: " + JSON.stringify(err.code));
}
if (typeof(res) == 'boolean') {
result = true;
result = false;
}
this.publishCaseResult(caseName, result);
});
}
private async setTargetBundleNamePromise(caseName: string, bundleName: Array<string>) {
let result = false;
let result = true;
this.context.setTargetBundleName(bundleName).then((res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (typeof(res) == 'boolean') {
result = true;
}
this.publishCaseResult(caseName, result);
}).catch((error) => {
console.error(caseName + " error: " + JSON.stringify(error));
result = false;
this.publishCaseResult(caseName, result);
});
}
......@@ -718,7 +605,7 @@ export class ExtensionContextTest {
private async gestureInjectCallback(caseName: string, gesturePath: object) {
let result = false;
if (gesturePath == undefined) {
this.context.gestureInject(gesturePath, () => {}, (err, res) => {
this.context.injectGesture(gesturePath, (err, res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (err.code != 0) {
console.error(caseName + " err: " + JSON.stringify(err.code));
......@@ -730,15 +617,11 @@ export class ExtensionContextTest {
this.publishCaseResult(caseName, result);
});
} else {
this.context.gestureInject(gesturePath, () => {}, (err, res) => {
this.context.injectGesture(gesturePath, (err, res) => {
console.info(caseName + " res: " + JSON.stringify(res));
result = true;
if (err.code != 0) {
console.error(caseName + " err: " + JSON.stringify(err.code));
}
if (typeof(res) == 'boolean') {
result = true;
}
if (res == undefined) {
result = false;
}
this.publishCaseResult(caseName, result);
......@@ -750,7 +633,7 @@ export class ExtensionContextTest {
private async gestureInjectPromise(caseName: string, gesturePath: object) {
let result = false;
if (gesturePath == undefined) {
this.context.gestureInject(gesturePath, () => {}).then((res) => {
this.context.injectGesture(gesturePath).then((res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (res == undefined) {
result = true;
......@@ -762,17 +645,13 @@ export class ExtensionContextTest {
this.publishCaseResult(caseName, result);
});
} else {
this.context.gestureInject(gesturePath, () => {}).then((res) => {
this.context.injectGesture(gesturePath).then((res) => {
console.info(caseName + " res: " + JSON.stringify(res));
if (typeof(res) == 'boolean') {
result = true;
}
if (res == undefined) {
result = false;
}
this.publishCaseResult(caseName, result);
}).catch ((err) => {
console.error(caseName + 'error:' + JSON.stringify(err));
result = false;
this.publishCaseResult(caseName, result);
});
}
......
......@@ -77,411 +77,16 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0100
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0100
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0100', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0100';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0200
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0200
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0200', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0200';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0300
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0300
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0300', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0300';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0400
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0400
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0400', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0400';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0500
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0500
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0500', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0500';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0600
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0600
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0600', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0600';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0700
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0700
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0700', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncCallback_0700';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0800
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0800
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0800', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0800';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0900
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0900
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0900', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_0900';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1000
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1000
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1000', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1000';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1100
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1100
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1100', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1100';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1200
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1200
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1200', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1200';
console.info(caseName + 'start');
if (isConnect) {
publishCaseExecute(caseName);
setTimeout(() => {
if (caseResult != undefined) {
console.info(caseName + ':' + caseResult.data);
expect(passStr).assertEqual(caseResult.data);
expect(caseName).assertEqual(caseResult.parameters.case);
} else {
console.info(caseName + ': caseResult is undefined');
expect(null).assertFail();
}
done();
}, 3000);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
done();
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1300
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1300
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1300', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1300';
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500';
console.info(caseName + 'start');
if (isConnect) {
......@@ -506,15 +111,16 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1400
* @tc.name AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1400
* @tc.desc The parameter input is type of event, test the setEventTypeFilter() function,
* The result of setEventTypeFilter() should be boolean type.
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1400', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setEventTypeFilter_asyncPromise_1400';
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600';
console.info(caseName + 'start');
if (isConnect) {
......@@ -539,16 +145,16 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500';
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700';
console.info(caseName + 'start');
if (isConnect) {
......@@ -573,16 +179,16 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1600';
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800';
console.info(caseName + 'start');
if (isConnect) {
......@@ -607,16 +213,16 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1700';
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900';
console.info(caseName + 'start');
if (isConnect) {
......@@ -641,16 +247,16 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1800';
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000';
console.info(caseName + 'start');
if (isConnect) {
......@@ -675,16 +281,15 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100
* @tc.desc The parameter input is null,
* The result of getWindowRootElement() should be AccessibilityElement type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_1900';
it('AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100';
console.info(caseName + 'start');
if (isConnect) {
......@@ -700,7 +305,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -708,17 +313,17 @@ export default function abilityTest() {
}
})
/*
* @tc.number AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000
* @tc.name AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000
* @tc.desc The parameter input is 'com.example.accessibleformextension',
* test the setTargetBundleName() function,
* The result of setTargetBundleName() should be boolean type.
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2200
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2200
* @tc.desc The parameter input is null,
* The result of getWindowRootElement() should be AccessibilityElement type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_setTargetBundleName_asyncPromise_2000';
it('AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2200', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2200';
console.info(caseName + 'start');
if (isConnect) {
......@@ -734,7 +339,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -743,15 +348,15 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100
* @tc.desc The parameter input is null,
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300
* @tc.desc The parameter input is windowId, test the getWindowRootElement() function.
* The result of getWindowRootElement() should be AccessibilityElement type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2100';
it('AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300';
console.info(caseName + 'start');
if (isConnect) {
......@@ -767,7 +372,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -776,15 +381,15 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400
* @tc.desc The parameter input is windowId, test the getWindowRootElement() function.
* The result of getWindowRootElement() should be AccessibilityElement type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2300';
it('AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400';
console.info(caseName + 'start');
if (isConnect) {
......@@ -800,7 +405,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -809,15 +414,15 @@ export default function abilityTest() {
})
/*
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400
* @tc.number AccessibilityExtensionContextTest_getWindowRootElement_Promise_2500
* @tc.name AccessibilityExtensionContextTest_getWindowRootElement_Promise_2500
* @tc.desc The parameter input is windowId, test the getWindowRootElement() function.
* The result of getWindowRootElement() should be AccessibilityElement type.
* @tc.size SmallTest
* @tc.type User
*/
it('AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_asyncCallback_2400';
it('AccessibilityExtensionContextTest_getWindowRootElement_Promise_2500', 0, async function (done) {
let caseName = 'AccessibilityExtensionContextTest_getWindowRootElement_Promise_2500';
console.info(caseName + 'start');
if (isConnect) {
......@@ -833,7 +438,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -867,7 +472,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -900,7 +505,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -933,7 +538,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -966,7 +571,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -999,7 +604,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1032,7 +637,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1065,7 +670,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1098,7 +703,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1131,7 +736,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1164,7 +769,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1197,7 +802,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1231,7 +836,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1264,7 +869,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1297,7 +902,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1330,7 +935,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1363,7 +968,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1397,7 +1002,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1430,7 +1035,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......@@ -1463,7 +1068,7 @@ export default function abilityTest() {
expect(null).assertFail();
}
done();
}, 3000);
}, 5500);
} else {
console.error(caseName + ': extension not connected');
expect(null).assertFail();
......
......@@ -32,8 +32,6 @@ class AccessibilityExtAbility extends AccessibilityExtensionAbility {
function publishCallback(err) {
console.info("onConnect====>onConnect publish call back result:" + JSON.stringify(err));
}
this.context.setEventTypeFilter(['gesture']);
}
onDisconnect() {
......
......@@ -280,7 +280,7 @@ export class GestureEventTest {
}
private async gestureInject(caseName: string, gesturePath: object) {
let ret = await this.context?.gestureInject(gesturePath, () => {});
console.info('GestureEventTest processCase: ' + caseName + ' ret: ' + ret);
await this.context?.injectGesture(gesturePath);
console.info('GestureEventTest processCase: ' + caseName);
}
}
\ No newline at end of file
......@@ -37,56 +37,6 @@ describe('AccessibleSendEvent', function () {
/* are for accessibility.sendEvent() API test */
/******************************************************************************** */
/*
* @tc.number SendEvent_0010
* @tc.name SendEvent_0010
* @tc.desc The parameter input is EventInfo, test the sendEvent() function
* The result of sendEvent() should be equal to an error code with no error
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_0010', 0, async function (done) {
console.info('SendEvent_0010');
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event, (err, data) => {
console.info(`AccessibleSendEvent: SendEvent_0010 has error: ${err.code}`);
expect(err.code).assertEqual(0);
console.info(`AccessibleSendEvent: SendEvent_0010 has data: ${data}`);
expect(data).assertEqual(undefined);
done();
})
})
/*
* @tc.number SendEvent_0020
* @tc.name SendEvent_0020
* @tc.desc The parameter input is EventInfo, test the sendEvent() function
* The result of sendEvent() should be equal to a promise of undefined
* @tc.size SmallTest
* @tc.type User
*/
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: SendEvent_0020 result ${result}`);
expect(result).assertEqual(undefined);
done();
}).catch((err) => {
console.error(`AccessibleSendEvent: SendEvent_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_null_0010
* @tc.name SendEvent_null_0010
......@@ -165,32 +115,6 @@ describe('AccessibleSendEvent', function () {
/* 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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0010
* @tc.name SendEvent_type_0010
......@@ -224,32 +148,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0020
* @tc.name SendEvent_type_0020
......@@ -283,32 +181,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0030
* @tc.name SendEvent_type_constructor_0030
......@@ -342,32 +214,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0040 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0040
* @tc.name SendEvent_type_constructor_0040
......@@ -401,86 +247,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0050 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0050
* @tc.name SendEvent_type_constructor_0050
* @tc.desc The type of EventInfo is 'focus', test sendEvent() function
* The result of sendEvent() should be equal to a promise of undefined
* Another test point is to test whether the modified constructor (EventInfo)
* works correctly.
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_constructor_0050', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_constructor_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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_constructor_0050 has error: ${err}`);
expect(null).assertFail();
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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0060 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0060
* @tc.name SendEvent_type_constructor_0060
......@@ -514,32 +280,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0070 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0070
* @tc.name SendEvent_type_constructor_0070
......@@ -573,32 +313,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0080 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0080
* @tc.name SendEvent_type_constructor_0080
......@@ -632,32 +346,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0090 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0090
* @tc.name SendEvent_type_constructor_0090
......@@ -691,32 +379,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0100 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0100
* @tc.name SendEvent_type_constructor_0100
......@@ -750,32 +412,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_type_0110 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0110
* @tc.name SendEvent_type_constructor_0110
......@@ -809,33 +445,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @tc.number SendEvent_type_0120
* @tc.name SendEvent_type_0120
* @tc.desc The type of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to a rejected promise of undefined
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0120', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0120 starts`);
let eventType = '';
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) =>{
console.error(`AccessibleSendEvent: SendEvent_type_0120 result ${result}`);
expect(null).assertFail();
done();
}).catch((err) => {
console.info(`AccessibleSendEvent: SendEvent_type_0120 has error: ${err}`);
expect(err).assertEqual(undefined);
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0120
* @tc.name SendEvent_type_constructor_0120
......@@ -871,44 +480,17 @@ describe('AccessibleSendEvent', function () {
})
/*
* @tc.number SendEvent_type_0130
* @tc.name SendEvent_type_0130
* @tc.number SendEvent_type_constructor_0130
* @tc.name SendEvent_type_constructor_0130
* @tc.desc The type of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to a rejected promise of undefined
* Another test point is to test whether the modified constructor (EventInfo)
* works correctly.
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_0130', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_0130 starts`);
let eventType = null;
let event = new accessibility.EventInfo();
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) =>{
console.error(`AccessibleSendEvent: SendEvent_type_0130 result ${result}`);
expect(null).assertFail();
done();
}).catch((err) => {
console.info(`AccessibleSendEvent: SendEvent_type_0130 has error: ${err}`);
expect(err).assertEqual(undefined);
done();
});
})
/*
* @tc.number SendEvent_type_constructor_0130
* @tc.name SendEvent_type_constructor_0130
* @tc.desc The type of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to a rejected promise of undefined
* Another test point is to test whether the modified constructor (EventInfo)
* works correctly.
* @tc.size SmallTest
* @tc.type User
*/
it('SendEvent_type_constructor_0130', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_constructor_0130 starts`);
it('SendEvent_type_constructor_0130', 0, async function (done) {
console.info(`AccessibleSendEvent: SendEvent_type_constructor_0130 starts`);
let eventType = null;
......@@ -931,168 +513,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0010 has error: ${err}`);
expect(null).assertFail();
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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0030
* @tc.name SendEvent_windowUpdateType_0030
* @tc.desc The windowUpdateType of EventInfo is 'bounds', test sendEvent() function
* The result of sendEvent() should be equal to a promise of undefined
* @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 = 'bounds';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0040
* @tc.name SendEvent_windowUpdateType_0040
* @tc.desc The windowUpdateType of EventInfo is 'active', test sendEvent() function
* The result of sendEvent() should be equal to a promise of undefined
* @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 = 'active';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0040 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0050
* @tc.name SendEvent_windowUpdateType_0050
* @tc.desc The windowUpdateType of EventInfo is 'focus', test sendEvent() function
* The result of sendEvent() should be equal to a promise of undefined
* @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 = 'focus';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0050 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_0060
* @tc.name SendEvent_windowUpdateType_0060
* @tc.desc The windowUpdateType of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to a promise of undefined
* @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 = '';
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0060 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_constructor_0060
* @tc.name SendEvent_windowUpdateType_constructor_0060
......@@ -1126,33 +546,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @tc.number SendEvent_windowUpdateType_0070
* @tc.name SendEvent_windowUpdateType_0070
* @tc.desc The windowUpdateType of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to a promise of undefined
* @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 = null;
event.type = eventType;
event.windowUpdateType = windowUpdateType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) => {
expect(result).assertEqual(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_windowUpdateType_0070 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_windowUpdateType_constructor_0070
* @tc.name SendEvent_windowUpdateType_constructor_0070
......@@ -1186,32 +579,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_bundleName_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_bundleName_constructor_0010
* @tc.name SendEvent_bundleName_constructor_0010
......@@ -1244,33 +611,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a rejected promise of undefined
* @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) =>{
console.error(`AccessibleSendEvent: SendEvent_bundleName_0020 result ${result}`);
expect(null).assertFail();
done();
}).catch((err) => {
console.info(`AccessibleSendEvent: SendEvent_bundleName_0020 has error: ${err}`);
expect(err).assertEqual(undefined);
done();
});
})
/*
* @tc.number SendEvent_bundleName_constructor_0020
* @tc.name SendEvent_bundleName_constructor_0020
......@@ -1304,33 +644,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a rejected promise of undefined
* @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) =>{
console.error(`AccessibleSendEvent: SendEvent_bundleName_0030 result ${result}`);
expect(null).assertFail();
done();
}).catch((err) => {
console.info(`AccessibleSendEvent: SendEvent_bundleName_0030 has error: ${err}`);
expect(err).assertEqual(undefined);
done();
});
})
/*
* @tc.number SendEvent_bundleName_constructor_0030
* @tc.name SendEvent_bundleName_constructor_0030
......@@ -1364,33 +677,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentType_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_componentType_constructor_0010
* @tc.name SendEvent_componentType_constructor_0010
......@@ -1424,33 +710,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentType_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_componentType_constructor_0020
* @tc.name SendEvent_componentType_constructor_0020
......@@ -1484,33 +743,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_componentType_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_componentType_constructor_0030
* @tc.name SendEvent_componentType_constructor_0030
......@@ -1544,33 +776,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_pageId_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_pageId_constructor_0010
* @tc.name SendEvent_pageId_constructor_0010
......@@ -1604,33 +809,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_pageId_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_pageId_constructor_0020
* @tc.name SendEvent_pageId_constructor_0020
......@@ -1664,33 +842,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_pageId_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_pageId_constructor_0030
* @tc.name SendEvent_pageId_constructor_0030
......@@ -1724,33 +875,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_description_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_description_constructor_0010
* @tc.name SendEvent_description_constructor_0010
......@@ -1784,33 +908,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_description_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_description_constructor_0020
* @tc.name SendEvent_description_constructor_0020
......@@ -1844,33 +941,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_description_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_description_constructor_0030
* @tc.name SendEvent_description_constructor_0030
......@@ -1904,32 +974,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0010
* @tc.name SendEvent_triggerAction_constructor_0010
......@@ -1962,32 +1006,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0020
* @tc.name SendEvent_triggerAction_constructor_0020
......@@ -2020,32 +1038,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0030
* @tc.name SendEvent_triggerAction_constructor_0030
......@@ -2076,32 +1068,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0040 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0040
* @tc.name SendEvent_triggerAction_constructor_0040
......@@ -2134,32 +1100,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0050 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0050
* @tc.name SendEvent_triggerAction_constructor_0050
......@@ -2192,32 +1132,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0060 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0060
* @tc.name SendEvent_triggerAction_constructor_0060
......@@ -2250,32 +1164,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0070 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0070
* @tc.name SendEvent_triggerAction_constructor_0070
......@@ -2308,32 +1196,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0080 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0080
* @tc.name SendEvent_triggerAction_constructor_0080
......@@ -2366,32 +1228,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0090 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0090
* @tc.name SendEvent_triggerAction_constructor_0090
......@@ -2424,32 +1260,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0100 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0100
* @tc.name SendEvent_triggerAction_constructor_0100
......@@ -2482,32 +1292,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0110 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0110
* @tc.name SendEvent_triggerAction_constructor_0110
......@@ -2534,33 +1318,7 @@ describe('AccessibleSendEvent', function () {
expect(result).assertEqual(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_constructor_0110 has error: ${err}`);
expect(null).assertFail();
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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0120 has error: ${err}`);
console.error(`AccessibleSendEvent: SendEvent_triggerAction_constructor_0110 has error: ${err}`);
expect(null).assertFail();
done();
});
......@@ -2598,32 +1356,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0130 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0130
* @tc.name SendEvent_triggerAction_constructor_0130
......@@ -2656,32 +1388,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0140 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0140
* @tc.name SendEvent_triggerAction_constructor_0140
......@@ -2714,32 +1420,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0150 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0150
* @tc.name SendEvent_triggerAction_constructor_0150
......@@ -2772,32 +1452,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0160 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0160
* @tc.name SendEvent_triggerAction_constructor_0160
......@@ -2830,33 +1484,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @tc.number SendEvent_triggerAction_0170
* @tc.name SendEvent_triggerAction_0170
* @tc.desc The triggerAction of EventInfo is '', test sendEvent() function
* The result of sendEvent() should be equal to a rejected promise of undefined
* @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 = '';
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) =>{
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0170 result ${result}`);
expect(null).assertFail();
done();
}).catch((err) => {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0170 has error: ${err}`);
expect(err).assertEqual(undefined);
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0170
* @tc.name SendEvent_triggerAction_constructor_0170
......@@ -2890,33 +1517,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @tc.number SendEvent_triggerAction_0180
* @tc.name SendEvent_triggerAction_0180
* @tc.desc The triggerAction of EventInfo is null, test sendEvent() function
* The result of sendEvent() should be equal to a rejected promise of undefined
* @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 = null;
event.type = eventType;
event.bundleName = bundleName;
event.triggerAction = triggerAction;
accessibility.sendEvent(event).then((result) =>{
console.error(`AccessibleSendEvent: SendEvent_triggerAction_0180 result ${result}`);
expect(null).assertFail();
done();
}).catch((err) => {
console.info(`AccessibleSendEvent: SendEvent_triggerAction_0180 has error: ${err}`);
expect(err).assertEqual(undefined);
done();
});
})
/*
* @tc.number SendEvent_triggerAction_constructor_0180
* @tc.name SendEvent_triggerAction_constructor_0180
......@@ -2950,33 +1550,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_constructor_0010
* @tc.name SendEvent_textMoveUnit_constructor_0010
......@@ -3010,33 +1583,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_constructor_0020
* @tc.name SendEvent_textMoveUnit_constructor_0020
......@@ -3070,33 +1616,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_constructor_0030
* @tc.name SendEvent_textMoveUnit_constructor_0030
......@@ -3130,33 +1649,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0040 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_constructor_0040
* @tc.name SendEvent_textMoveUnit_constructor_0040
......@@ -3190,33 +1682,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0050 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_constructor_0050
* @tc.name SendEvent_textMoveUnit_constructor_0050
......@@ -3250,33 +1715,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0060 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_constructor_0060
* @tc.name SendEvent_textMoveUnit_constructor_0060
......@@ -3310,33 +1748,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_textMoveUnit_0070 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_textMoveUnit_constructor_0070
* @tc.name SendEvent_textMoveUnit_constructor_0070
......@@ -3370,33 +1781,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_contents_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_contents_constructor_0010
* @tc.name SendEvent_contents_constructor_0010
......@@ -3430,33 +1814,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_contents_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_contents_constructor_0020
* @tc.name SendEvent_contents_constructor_0020
......@@ -3490,33 +1847,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_lastContent_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_lastContent_constructor_0010
* @tc.name SendEvent_lastContent_constructor_0010
......@@ -3550,33 +1880,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_lastContent_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_lastContent_constructor_0020
* @tc.name SendEvent_lastContent_constructor_0020
......@@ -3610,33 +1913,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_lastContent_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_lastContent_constructor_0030
* @tc.name SendEvent_lastContent_constructor_0030
......@@ -3670,34 +1946,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_beginIndex_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_beginIndex_constructor_0010
* @tc.name SendEvent_beginIndex_constructor_0010
......@@ -3731,33 +1979,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_beginIndex_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_beginIndex_constructor_0020
* @tc.name SendEvent_beginIndex_constructor_0020
......@@ -3791,33 +2012,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_beginIndex_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_beginIndex_constructor_0030
* @tc.name SendEvent_beginIndex_constructor_0030
......@@ -3851,33 +2045,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_currentIndex_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_currentIndex_constructor_0010
* @tc.name SendEvent_currentIndex_constructor_0010
......@@ -3911,33 +2078,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_currentIndex_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_currentIndex_constructor_0020
* @tc.name SendEvent_currentIndex_constructor_0020
......@@ -3969,33 +2109,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_currentIndex_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_currentIndex_constructor_0030
* @tc.name SendEvent_currentIndex_constructor_0030
......@@ -4029,33 +2142,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_endIndex_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_endIndex_constructor_0010
* @tc.name SendEvent_endIndex_constructor_0010
......@@ -4089,33 +2175,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_endIndex_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_endIndex_constructor_0020
* @tc.name SendEvent_endIndex_constructor_0020
......@@ -4149,33 +2208,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_endIndex_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_endIndex_constructor_0030
* @tc.name SendEvent_endIndex_constructor_0030
......@@ -4209,33 +2241,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_itemCount_0010 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_itemCount_constructor_0010
* @tc.name SendEvent_itemCount_constructor_0010
......@@ -4269,33 +2274,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_itemCount_0020 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_itemCount_constructor_0020
* @tc.name SendEvent_itemCount_constructor_0020
......@@ -4329,33 +2307,6 @@ describe('AccessibleSendEvent', function () {
});
})
/*
* @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 a promise of undefined
* @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(undefined);
done();
}).catch(err => {
console.error(`AccessibleSendEvent: SendEvent_itemCount_0030 has error: ${err}`);
expect(null).assertFail();
done();
});
})
/*
* @tc.number SendEvent_itemCount_constructor_0030
* @tc.name SendEvent_itemCount_constructor_0030
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册