提交 5cf07cd4 编写于 作者: L lidanyang16

<lidanyang16@huawei.com>

Signed-off-by: Nlidanyang16 <lidanyang16@huawei.com>
上级 4bd7310b
......@@ -15,17 +15,10 @@ import("//build/ohos_var.gni")
group("sensor") {
testonly = true
if (device_name == "m40") {
if (is_standard_system) {
deps = [ "sensor_standard:sensor_js_test" ]
}
} else if (device_name == "rk3568") {
if (is_standard_system) {
deps = [ "sensor_standard:sensor_js_test" ]
}
} else {
if (is_standard_system) {
deps = [ "sensor_standard:sensor_js_test" ]
}
deps = [
"miscdevice_standard:miscdevice_js_test",
"sensor_standard:sensor_js_test",
]
}
}
......@@ -13,4 +13,4 @@
* limitations under the License.
*/
require('./Vibrator.test.js')
require('./Vibrator_new.test.js')
......@@ -396,15 +396,15 @@ describe("VibratorJsTest_miscdevice2", function () {
* @tc.require: Issue Number
*/
it("VibratorJsTest015", 0, async function (done) {
vibrator.vibrate("").then(() => {
console.log("VibratorJsTest015 vibrate error");
expect(false).assertTrue();
vibrator.stop("preset").then(() => {
console.log("VibratorJsTest015 off success");
expect(true).assertTrue();
setTimeout(() => {
done();
}, 500);
}, (error) => {
expect(true).assertTrue();
console.log("VibratorJsTest015 vibrate success");
expect(false).assertTrue();
console.log("VibratorJsTest015 off error");
setTimeout(() => {
done();
}, 500);
......@@ -440,21 +440,22 @@ describe("VibratorJsTest_miscdevice2", function () {
* @tc.require: Issue Number
*/
it("VibratorJsTest017", 0, async function (done) {
vibrator.stop("preset").then(() => {
console.log("VibratorJsTest017 off success");
expect(true).assertTrue();
vibrator.vibrate("").then(() => {
console.log("VibratorJsTest017 vibrate error");
expect(false).assertTrue();
setTimeout(() => {
done();
}, 500);
}, (error) => {
expect(false).assertTrue();
console.log("VibratorJsTest017 off error");
expect(true).assertTrue();
console.log("VibratorJsTest017 vibrate success");
setTimeout(() => {
done();
}, 500);
});
})
/*
* @tc.name:VibratorJsTest018
* @tc.desc:verify app info is not null
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册