提交 c17f7935 编写于 作者: L logic42

change miscdevice testcase

Signed-off-by: Nlogic42 <wanglong108@huawei.com>
上级 ded8a667
......@@ -15,7 +15,14 @@ import("//build/ohos_var.gni")
group("sensor") {
testonly = true
if (device_name == "rk3568") {
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" ]
......
......@@ -13,19 +13,19 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("sensor_js_test") {
ohos_js_hap_suite("miscdevice_js_test") {
hap_profile = "./src/main/config.json"
deps = [
":sensor_js_assets",
":sensor_js_resources",
":miscdevice_js_assets",
":miscdevice_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsSensorJSApiTest"
hap_name = "ActsmiscdeviceJSApiTest"
}
ohos_js_assets("sensor_js_assets") {
ohos_js_assets("miscdevice_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("sensor_js_resources") {
ohos_resources("miscdevice_js_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
{
"description": "Configuration for sensor js api Tests",
"description": "Configuration for miscdevice js api Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "160000",
......@@ -9,10 +9,10 @@
"kits": [
{
"test-file-name": [
"ActsSensorJSApiTest.hap"
"ActsmiscdeviceJSApiTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
}
\ No newline at end of file
......@@ -232,7 +232,7 @@ describe("VibratorJsTest", function () {
* @tc.require: Issue Number
*/
it("VibratorJsTest009", 0, async function (done) {
console.info('----------------------SensorJsTest001---------------------------');
console.info('----------------------VibratorJsTest001---------------------------');
function stopPromise() {
return new Promise((resolve, reject) => {
vibrator.stop("time", (error) => {
......
......@@ -2,7 +2,7 @@
"string": [
{
"name": "app_name",
"value": "SensorJSApiTest"
"value": "miscdeviceJSApiTest"
},
{
"name": "mainability_description",
......
......@@ -55,8 +55,12 @@ describe('SystemParameterTest', function () {
console.info('SUB_SENSORS_Sensor_JSTest_0010 start');
await sensor.on(0, function (error, data) {
if (error) {
console.info('testRegisterSensortest001 on error');
expect(false).assertTrue();
if (error.code == -1) {
console.info("testRegisterSensortest001 on error: sensor 0 not exit")
} else {
console.info('testRegisterSensortest001 on error :' + error.code);
expect(false).assertTrue();
}
done();
} else {
console.info('testRegisterSensortest001 on success');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册