diff --git a/frameworks/js/taihe/test/xts/module.json5 b/frameworks/js/taihe/test/xts/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..a26bfe66759ccba20b4b223662def14e430a3d06 --- /dev/null +++ b/frameworks/js/taihe/test/xts/module.json5 @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [], + "deliveryWithInstall": true, + "installationFree": false, + "requestPermissions": [ + { + "name": "ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER" + }, + { + "name": "ohos.permission.ACCESS_DDK_DRIVERS" + } + ], + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} diff --git a/frameworks/js/taihe/test/xts/DeviceManager.test.ets b/frameworks/js/taihe/test/xts/src/test/DeviceManager.test.ets similarity index 96% rename from frameworks/js/taihe/test/xts/DeviceManager.test.ets rename to frameworks/js/taihe/test/xts/src/test/DeviceManager.test.ets index dcda315c664ae64584cd8503ecafa3fae427053d..901995ffd2156403ca10385ca07986668b5c3e2a 100644 --- a/frameworks/js/taihe/test/xts/DeviceManager.test.ets +++ b/frameworks/js/taihe/test/xts/src/test/DeviceManager.test.ets @@ -128,6 +128,7 @@ export default function DeviceManagerJsTest() { const PARAMETER_ERROR_CODE = 401 const SERVICE_EXCEPTION_CODE = 22900001 const SERVICE_EXCEPTION_CODE_NEW = 26300001 + const SERVICE_NOT_ALLOW_ACCESS = 26300002 const SERVICE_NOT_BOUND = 26300003 /* @@ -244,6 +245,7 @@ export default function DeviceManagerJsTest() { } catch (error: BusinessError) { hilog.info(TAG, 'testTag', 'Test case testBindDriverWithDeviceId001 catch err : ' + JSON.stringify(error)); expect(error.code).assertEqual(SERVICE_EXCEPTION_CODE_NEW); + expect(error.code != SERVICE_NOT_ALLOW_ACCESS).assertTrue(); done(); } }) @@ -268,6 +270,7 @@ export default function DeviceManagerJsTest() { }); expect(true).assertTrue(); hilog.info(0, 'testTag ui', 'bindDevice success:' + data.deviceId); + hilog.info(0, 'testTag ui', 'bindDevice success:' + JSON.stringify(data.remote)); done(); } catch (error: BusinessError) { hilog.info(TAG, 'testTag', 'Test case testBindDriverWithDeviceId002 catch err : ' + JSON.stringify(error)); @@ -424,4 +427,4 @@ export default function DeviceManagerJsTest() { } }) }) -} \ No newline at end of file +} diff --git a/frameworks/js/taihe/test/xts/DeviceManagerNoPermission.test.ets b/frameworks/js/taihe/test/xts/src/test/DeviceManagerNoPermission.test.ets similarity index 100% rename from frameworks/js/taihe/test/xts/DeviceManagerNoPermission.test.ets rename to frameworks/js/taihe/test/xts/src/test/DeviceManagerNoPermission.test.ets diff --git a/frameworks/js/taihe/test/xts/DeviceManagerNormalApp.test.ets b/frameworks/js/taihe/test/xts/src/test/DeviceManagerNormalApp.test.ets similarity index 100% rename from frameworks/js/taihe/test/xts/DeviceManagerNormalApp.test.ets rename to frameworks/js/taihe/test/xts/src/test/DeviceManagerNormalApp.test.ets diff --git a/frameworks/js/taihe/test/xts/List.test.ets b/frameworks/js/taihe/test/xts/src/test/List.test.ets similarity index 100% rename from frameworks/js/taihe/test/xts/List.test.ets rename to frameworks/js/taihe/test/xts/src/test/List.test.ets diff --git a/frameworks/js/taihe/test/xts/Util.test.ets b/frameworks/js/taihe/test/xts/src/test/Util.test.ets similarity index 100% rename from frameworks/js/taihe/test/xts/Util.test.ets rename to frameworks/js/taihe/test/xts/src/test/Util.test.ets