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

<lidanyang16@huawei.com>

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