提交 67e2baf8 编写于 作者: H hui1975

miscdevice

Signed-off-by: Nhui1975 <zhaominghui10@huawei.com>
Change-Id: I00264e4240d27a3ebff87865f530b053577020a1
上级 971edb52
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* limitations under the License. * limitations under the License.
*/ */
import VibratorJsTest_misc_1 from './Vibrator_old.test.js' import VibratorJsTest_misc_1 from './Vibrator_old.test.js'
import VibratorJsTest_misc_2 from './Vibrator_new_common.test.js' import VibratorJsTest_misc_4 from './Vibrator_new.test.js'
import VibratorJsTest_misc_3 from './Vibrator_newSupplement_common.test.js' import VibratorJsTest_misc_5 from './Vibrator_newSupplement.test.js'
import VibratorJsTest_misc_6 from './Vibrator_newSupportTest.js' import VibratorJsTest_misc_6 from './Vibrator_newSupportTest.js'
export default function testsuite() { export default function testsuite() {
VibratorJsTest_misc_1() VibratorJsTest_misc_1()
VibratorJsTest_misc_2() VibratorJsTest_misc_4()
VibratorJsTest_misc_3() VibratorJsTest_misc_5()
VibratorJsTest_misc_6() VibratorJsTest_misc_6()
} }
...@@ -67,7 +67,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -67,7 +67,7 @@ describe("VibratorJsTest_misc_5", function () {
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0290 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0290
*/ */
it("VibratorJsTest019", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL0, async function (done) { it("VibratorJsTest019", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL0, async function (done) {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 1000 duration: 1000
}, { }, {
...@@ -93,7 +93,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -93,7 +93,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest020", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest020", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: "", type: "",
duration: 1000 duration: 1000
}, { }, {
...@@ -122,7 +122,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -122,7 +122,7 @@ describe("VibratorJsTest_misc_5", function () {
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0310 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0310
*/ */
it("VibratorJsTest021", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest021", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -149,7 +149,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -149,7 +149,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest022", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest022", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "", effectId: "",
count: 3, count: 3,
...@@ -181,7 +181,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -181,7 +181,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest023", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest023", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 3, count: 3,
...@@ -213,7 +213,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -213,7 +213,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest024", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest024", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate(null, null); vibrator.startVibration(null, null);
} catch (error) { } catch (error) {
console.info(error); console.info(error);
expect(true).assertTrue(); expect(true).assertTrue();
...@@ -227,7 +227,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -227,7 +227,7 @@ describe("VibratorJsTest_misc_5", function () {
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0350 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0350
*/ */
it("VibratorJsTest025", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest025", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
await vibrator.vibrate({ await vibrator.startVibration({
type: "time", type: "time",
duration: 1000, duration: 1000,
}, { }, {
...@@ -247,7 +247,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -247,7 +247,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest026", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest026", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
await vibrator.vibrate({ await vibrator.startVibration({
type: "", type: "",
duration: 1000 duration: 1000
}, { }, {
...@@ -272,7 +272,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -272,7 +272,7 @@ describe("VibratorJsTest_misc_5", function () {
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0370 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0370
*/ */
it("VibratorJsTest027", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest027", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
await vibrator.vibrate({ await vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -293,7 +293,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -293,7 +293,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest028", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest028", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "", effectId: "",
count: 3, count: 3,
...@@ -321,7 +321,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -321,7 +321,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest029", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest029", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 3, count: 3,
...@@ -349,7 +349,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -349,7 +349,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest030", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest030", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: 1, type: 1,
count: 3, count: 3,
}, { }, {
...@@ -370,7 +370,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -370,7 +370,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest031", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest031", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 100 duration: 100
}, { }, {
...@@ -389,7 +389,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -389,7 +389,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 100 duration: 100
}, { }, {
...@@ -421,7 +421,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -421,7 +421,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest032", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest032", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -441,7 +441,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -441,7 +441,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 100 duration: 100
}, { }, {
...@@ -473,7 +473,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -473,7 +473,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest033", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest033", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 3, count: 3,
...@@ -494,7 +494,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -494,7 +494,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 10000 duration: 10000
}, { }, {
...@@ -525,7 +525,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -525,7 +525,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest034", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest034", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -545,7 +545,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -545,7 +545,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 3, count: 3,
...@@ -578,7 +578,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -578,7 +578,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest035", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest035", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 3000, duration: 3000,
}, { }, {
...@@ -597,7 +597,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -597,7 +597,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 3, count: 3,
...@@ -630,7 +630,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -630,7 +630,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest036", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest036", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 3000, duration: 3000,
}, { }, {
...@@ -649,7 +649,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -649,7 +649,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -682,7 +682,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -682,7 +682,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest037", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest037", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 3, count: 3,
...@@ -702,7 +702,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -702,7 +702,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 3, count: 3,
...@@ -735,7 +735,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -735,7 +735,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest038", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest038", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -755,7 +755,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -755,7 +755,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -788,7 +788,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -788,7 +788,7 @@ describe("VibratorJsTest_misc_5", function () {
it("VibratorJsTest039", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest039", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
function vibratePromise() { function vibratePromise() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -808,7 +808,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -808,7 +808,7 @@ describe("VibratorJsTest_misc_5", function () {
} }
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -838,7 +838,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -838,7 +838,7 @@ describe("VibratorJsTest_misc_5", function () {
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0500 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0500
*/ */
it("VibratorJsTest040", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL0, async function (done) { it("VibratorJsTest040", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL0, async function (done) {
vibrator.vibrate({ vibrator.startVibration({
type: "time", type: "time",
duration: 1000 duration: 1000
}, { }, {
...@@ -865,7 +865,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -865,7 +865,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest041", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest041", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: "", type: "",
duration: 1000 duration: 1000
}, { }, {
...@@ -895,7 +895,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -895,7 +895,7 @@ describe("VibratorJsTest_misc_5", function () {
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0520 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0520
*/ */
it("VibratorJsTest042", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest042", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "haptic.clock.timer", effectId: "haptic.clock.timer",
count: 1, count: 1,
...@@ -923,7 +923,7 @@ describe("VibratorJsTest_misc_5", function () { ...@@ -923,7 +923,7 @@ describe("VibratorJsTest_misc_5", function () {
*/ */
it("VibratorJsTest043", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) { it("VibratorJsTest043", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
try { try {
vibrator.vibrate({ vibrator.startVibration({
type: "preset", type: "preset",
effectId: "", effectId: "",
count: 3, count: 3,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册