Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
7e3b1eaa
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
7e3b1eaa
编写于
4月 27, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 27, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8554 【XTS】【communication】优化bt脚本,新增wifi错误码用例
Merge pull request !8554 from 权力/myfeature
上级
205214f5
2d4aa238
变更
68
展开全部
隐藏空白更改
内联
并排
Showing
68 changed file
with
4461 addition
and
94 deletion
+4461
-94
communication/BUILD.gn
communication/BUILD.gn
+3
-0
communication/bluetooth_manager/src/main/js/test/BleService.test.js
...ion/bluetooth_manager/src/main/js/test/BleService.test.js
+517
-70
communication/bluetooth_standard/src/main/js/test/BRSwitch.test.js
...tion/bluetooth_standard/src/main/js/test/BRSwitch.test.js
+33
-7
communication/wifi_ErrorCode201/BUILD.gn
communication/wifi_ErrorCode201/BUILD.gn
+35
-0
communication/wifi_ErrorCode201/Test.json
communication/wifi_ErrorCode201/Test.json
+29
-0
communication/wifi_ErrorCode201/signature/openharmony_sx.p7b
communication/wifi_ErrorCode201/signature/openharmony_sx.p7b
+0
-0
communication/wifi_ErrorCode201/src/main/config.json
communication/wifi_ErrorCode201/src/main/config.json
+133
-0
communication/wifi_ErrorCode201/src/main/js/MainAbility/app.js
...nication/wifi_ErrorCode201/src/main/js/MainAbility/app.js
+23
-0
communication/wifi_ErrorCode201/src/main/js/MainAbility/i18n/en-US.json
...wifi_ErrorCode201/src/main/js/MainAbility/i18n/en-US.json
+6
-0
communication/wifi_ErrorCode201/src/main/js/MainAbility/i18n/zh-CN.json
...wifi_ErrorCode201/src/main/js/MainAbility/i18n/zh-CN.json
+6
-0
communication/wifi_ErrorCode201/src/main/js/MainAbility/pages/index/index.css
...rrorCode201/src/main/js/MainAbility/pages/index/index.css
+25
-0
communication/wifi_ErrorCode201/src/main/js/MainAbility/pages/index/index.hml
...rrorCode201/src/main/js/MainAbility/pages/index/index.hml
+21
-0
communication/wifi_ErrorCode201/src/main/js/MainAbility/pages/index/index.js
...ErrorCode201/src/main/js/MainAbility/pages/index/index.js
+34
-0
communication/wifi_ErrorCode201/src/main/js/TestAbility/app.js
...nication/wifi_ErrorCode201/src/main/js/TestAbility/app.js
+31
-0
communication/wifi_ErrorCode201/src/main/js/TestAbility/i18n/en-US.json
...wifi_ErrorCode201/src/main/js/TestAbility/i18n/en-US.json
+8
-0
communication/wifi_ErrorCode201/src/main/js/TestAbility/i18n/zh-CN.json
...wifi_ErrorCode201/src/main/js/TestAbility/i18n/zh-CN.json
+8
-0
communication/wifi_ErrorCode201/src/main/js/TestAbility/pages/index/index.css
...rrorCode201/src/main/js/TestAbility/pages/index/index.css
+30
-0
communication/wifi_ErrorCode201/src/main/js/TestAbility/pages/index/index.hml
...rrorCode201/src/main/js/TestAbility/pages/index/index.hml
+5
-0
communication/wifi_ErrorCode201/src/main/js/TestAbility/pages/index/index.js
...ErrorCode201/src/main/js/TestAbility/pages/index/index.js
+26
-0
communication/wifi_ErrorCode201/src/main/js/TestRunner/OpenHarmonyTestRunner.js
...orCode201/src/main/js/TestRunner/OpenHarmonyTestRunner.js
+59
-0
communication/wifi_ErrorCode201/src/main/js/test/ActWifiErrorCode201.test.js
...ErrorCode201/src/main/js/test/ActWifiErrorCode201.test.js
+988
-0
communication/wifi_ErrorCode201/src/main/js/test/List.test.js
...unication/wifi_ErrorCode201/src/main/js/test/List.test.js
+19
-0
communication/wifi_ErrorCode201/src/main/resources/base/element/string.json
..._ErrorCode201/src/main/resources/base/element/string.json
+28
-0
communication/wifi_ErrorCode201/src/main/resources/base/media/icon.png
.../wifi_ErrorCode201/src/main/resources/base/media/icon.png
+0
-0
communication/wifi_ErrorCode202/BUILD.gn
communication/wifi_ErrorCode202/BUILD.gn
+35
-0
communication/wifi_ErrorCode202/Test.json
communication/wifi_ErrorCode202/Test.json
+29
-0
communication/wifi_ErrorCode202/signature/openharmony_sx.p7b
communication/wifi_ErrorCode202/signature/openharmony_sx.p7b
+0
-0
communication/wifi_ErrorCode202/src/main/config.json
communication/wifi_ErrorCode202/src/main/config.json
+223
-0
communication/wifi_ErrorCode202/src/main/js/MainAbility/app.js
...nication/wifi_ErrorCode202/src/main/js/MainAbility/app.js
+23
-0
communication/wifi_ErrorCode202/src/main/js/MainAbility/i18n/en-US.json
...wifi_ErrorCode202/src/main/js/MainAbility/i18n/en-US.json
+6
-0
communication/wifi_ErrorCode202/src/main/js/MainAbility/i18n/zh-CN.json
...wifi_ErrorCode202/src/main/js/MainAbility/i18n/zh-CN.json
+6
-0
communication/wifi_ErrorCode202/src/main/js/MainAbility/pages/index/index.css
...rrorCode202/src/main/js/MainAbility/pages/index/index.css
+25
-0
communication/wifi_ErrorCode202/src/main/js/MainAbility/pages/index/index.hml
...rrorCode202/src/main/js/MainAbility/pages/index/index.hml
+21
-0
communication/wifi_ErrorCode202/src/main/js/MainAbility/pages/index/index.js
...ErrorCode202/src/main/js/MainAbility/pages/index/index.js
+34
-0
communication/wifi_ErrorCode202/src/main/js/TestAbility/app.js
...nication/wifi_ErrorCode202/src/main/js/TestAbility/app.js
+31
-0
communication/wifi_ErrorCode202/src/main/js/TestAbility/i18n/en-US.json
...wifi_ErrorCode202/src/main/js/TestAbility/i18n/en-US.json
+8
-0
communication/wifi_ErrorCode202/src/main/js/TestAbility/i18n/zh-CN.json
...wifi_ErrorCode202/src/main/js/TestAbility/i18n/zh-CN.json
+8
-0
communication/wifi_ErrorCode202/src/main/js/TestAbility/pages/index/index.css
...rrorCode202/src/main/js/TestAbility/pages/index/index.css
+30
-0
communication/wifi_ErrorCode202/src/main/js/TestAbility/pages/index/index.hml
...rrorCode202/src/main/js/TestAbility/pages/index/index.hml
+5
-0
communication/wifi_ErrorCode202/src/main/js/TestAbility/pages/index/index.js
...ErrorCode202/src/main/js/TestAbility/pages/index/index.js
+26
-0
communication/wifi_ErrorCode202/src/main/js/TestRunner/OpenHarmonyTestRunner.js
...orCode202/src/main/js/TestRunner/OpenHarmonyTestRunner.js
+59
-0
communication/wifi_ErrorCode202/src/main/js/test/ActWifiErrorCode202.test.js
...ErrorCode202/src/main/js/test/ActWifiErrorCode202.test.js
+579
-0
communication/wifi_ErrorCode202/src/main/js/test/List.test.js
...unication/wifi_ErrorCode202/src/main/js/test/List.test.js
+19
-0
communication/wifi_ErrorCode202/src/main/resources/base/element/string.json
..._ErrorCode202/src/main/resources/base/element/string.json
+28
-0
communication/wifi_ErrorCode202/src/main/resources/base/media/icon.png
.../wifi_ErrorCode202/src/main/resources/base/media/icon.png
+0
-0
communication/wifi_ErrorCode401/BUILD.gn
communication/wifi_ErrorCode401/BUILD.gn
+35
-0
communication/wifi_ErrorCode401/Test.json
communication/wifi_ErrorCode401/Test.json
+29
-0
communication/wifi_ErrorCode401/signature/openharmony_sx.p7b
communication/wifi_ErrorCode401/signature/openharmony_sx.p7b
+0
-0
communication/wifi_ErrorCode401/src/main/config.json
communication/wifi_ErrorCode401/src/main/config.json
+223
-0
communication/wifi_ErrorCode401/src/main/js/MainAbility/app.js
...nication/wifi_ErrorCode401/src/main/js/MainAbility/app.js
+23
-0
communication/wifi_ErrorCode401/src/main/js/MainAbility/i18n/en-US.json
...wifi_ErrorCode401/src/main/js/MainAbility/i18n/en-US.json
+6
-0
communication/wifi_ErrorCode401/src/main/js/MainAbility/i18n/zh-CN.json
...wifi_ErrorCode401/src/main/js/MainAbility/i18n/zh-CN.json
+6
-0
communication/wifi_ErrorCode401/src/main/js/MainAbility/pages/index/index.css
...rrorCode401/src/main/js/MainAbility/pages/index/index.css
+25
-0
communication/wifi_ErrorCode401/src/main/js/MainAbility/pages/index/index.hml
...rrorCode401/src/main/js/MainAbility/pages/index/index.hml
+21
-0
communication/wifi_ErrorCode401/src/main/js/MainAbility/pages/index/index.js
...ErrorCode401/src/main/js/MainAbility/pages/index/index.js
+34
-0
communication/wifi_ErrorCode401/src/main/js/TestAbility/app.js
...nication/wifi_ErrorCode401/src/main/js/TestAbility/app.js
+31
-0
communication/wifi_ErrorCode401/src/main/js/TestAbility/i18n/en-US.json
...wifi_ErrorCode401/src/main/js/TestAbility/i18n/en-US.json
+8
-0
communication/wifi_ErrorCode401/src/main/js/TestAbility/i18n/zh-CN.json
...wifi_ErrorCode401/src/main/js/TestAbility/i18n/zh-CN.json
+8
-0
communication/wifi_ErrorCode401/src/main/js/TestAbility/pages/index/index.css
...rrorCode401/src/main/js/TestAbility/pages/index/index.css
+30
-0
communication/wifi_ErrorCode401/src/main/js/TestAbility/pages/index/index.hml
...rrorCode401/src/main/js/TestAbility/pages/index/index.hml
+5
-0
communication/wifi_ErrorCode401/src/main/js/TestAbility/pages/index/index.js
...ErrorCode401/src/main/js/TestAbility/pages/index/index.js
+26
-0
communication/wifi_ErrorCode401/src/main/js/TestRunner/OpenHarmonyTestRunner.js
...orCode401/src/main/js/TestRunner/OpenHarmonyTestRunner.js
+59
-0
communication/wifi_ErrorCode401/src/main/js/test/ActWifiErrorCode401.test.js
...ErrorCode401/src/main/js/test/ActWifiErrorCode401.test.js
+564
-0
communication/wifi_ErrorCode401/src/main/js/test/List.test.js
...unication/wifi_ErrorCode401/src/main/js/test/List.test.js
+19
-0
communication/wifi_ErrorCode401/src/main/resources/base/element/string.json
..._ErrorCode401/src/main/resources/base/element/string.json
+28
-0
communication/wifi_ErrorCode401/src/main/resources/base/media/icon.png
.../wifi_ErrorCode401/src/main/resources/base/media/icon.png
+0
-0
location/geolocation_standard/src/main/js/test/GeocoderMTest.test.js
...olocation_standard/src/main/js/test/GeocoderMTest.test.js
+14
-11
location/geolocation_standard/src/main/js/test/LocationMTest.test.js
...olocation_standard/src/main/js/test/LocationMTest.test.js
+5
-6
未找到文件。
communication/BUILD.gn
浏览文件 @
7e3b1eaa
...
...
@@ -25,6 +25,9 @@ group("communication") {
"dsoftbus/rpc:ActsRpcJsTest",
"nfc_Controller:ActsNFCJSTest",
"nfc_ErrorCode:ActsNFCErrorJSTest",
"wifi_ErrorCode201:ActsErrorcode201Test",
"wifi_ErrorCode202:ActsErrorcode202Test",
"wifi_ErrorCode401:ActsErrorcode401Test",
"wifi_p2p:ActsP2PJSTest",
"wifi_standard:ActsWifiJSTest",
]
...
...
communication/bluetooth_manager/src/main/js/test/BleService.test.js
浏览文件 @
7e3b1eaa
此差异已折叠。
点击以展开。
communication/bluetooth_standard/src/main/js/test/BRSwitch.test.js
浏览文件 @
7e3b1eaa
...
...
@@ -15,13 +15,6 @@
import
bluetooth
from
'
@ohos.bluetooth
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
let
BluetoothState
=
{
STATE_OFF
:
0
,
STATE_TURNING_ON
:
1
,
STATE_ON
:
2
,
STATE_TURNING_OFF
:
3
,
STATE_BLE_TURNING_ON
:
4
,
STATE_BLE_ON
:
5
,
STATE_BLE_TURNING_OFF
:
6
};
export
default
function
bluetoothhostTest
()
{
describe
(
'
bluetoothhostTest
'
,
function
()
{
...
...
@@ -126,6 +119,39 @@ describe('bluetoothhostTest', function() {
}
done
()
})
/**
* @tc.number COMMUNICATION_BLUETOOTH_SwitchOff_0444
* @tc.name testEnableBluetooth and getState
* @tc.desc Test EnableBluetooth api by promise.
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 0
*/
it
(
'
COMMUNICATION_BLUETOOTH_SwitchOff_0444
'
,
0
,
async
function
(
done
)
{
let
STATE_ON
=
bluetooth
.
BluetoothState
.
STATE_ON
;
console
.
info
(
"
[bluetooth_js]STATE_ON :
"
+
JSON
.
stringify
(
STATE_ON
));
expect
(
true
).
assertTrue
(
STATE_ON
==
2
);
let
STATE_OFF
=
bluetooth
.
BluetoothState
.
STATE_OFF
;
console
.
info
(
"
[bluetooth_js]STATE_OFF :
"
+
JSON
.
stringify
(
STATE_OFF
));
expect
(
true
).
assertTrue
(
STATE_OFF
==
0
);
let
STATE_TURNING_ON
=
bluetooth
.
BluetoothState
.
STATE_TURNING_ON
;
console
.
info
(
"
[bluetooth_js]STATE_TURNING_ON :
"
+
JSON
.
stringify
(
STATE_TURNING_ON
));
expect
(
true
).
assertTrue
(
STATE_TURNING_ON
==
1
);
let
STATE_TURNING_OFF
=
bluetooth
.
BluetoothState
.
STATE_TURNING_OFF
;
console
.
info
(
"
[bluetooth_js]STATE_TURNING_OFF :
"
+
JSON
.
stringify
(
STATE_TURNING_OFF
));
expect
(
true
).
assertTrue
(
STATE_TURNING_OFF
==
3
);
let
STATE_BLE_TURNING_ON
=
bluetooth
.
BluetoothState
.
STATE_BLE_TURNING_ON
;
console
.
info
(
"
[bluetooth_js]STATE_BLE_TURNING_ON :
"
+
JSON
.
stringify
(
STATE_BLE_TURNING_ON
));
expect
(
true
).
assertTrue
(
STATE_BLE_TURNING_ON
==
4
);
let
STATE_BLE_ON
=
bluetooth
.
BluetoothState
.
STATE_BLE_ON
;
console
.
info
(
"
[bluetooth_js]STATE_BLE_ON :
"
+
JSON
.
stringify
(
STATE_BLE_ON
));
expect
(
true
).
assertTrue
(
STATE_BLE_ON
==
5
);
let
STATE_BLE_TURNING_OFF
=
bluetooth
.
BluetoothState
.
STATE_BLE_TURNING_OFF
;
console
.
info
(
"
[bluetooth_js]STATE_BLE_TURNING_OFF :
"
+
JSON
.
stringify
(
STATE_BLE_TURNING_OFF
));
expect
(
true
).
assertTrue
(
STATE_BLE_TURNING_OFF
==
6
);
done
()
})
})
}
...
...
communication/wifi_ErrorCode201/BUILD.gn
0 → 100644
浏览文件 @
7e3b1eaa
# Copyright (C) 2022 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsErrorcode201Test") {
hap_profile = "./src/main/config.json"
deps = [
":wifi_js_assets",
":wifi_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsWifiErrorCode201JSApiTest"
part_name = "wifi"
subsystem_name = "communication"
}
ohos_js_assets("wifi_js_assets") {
js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
}
ohos_resources("wifi_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
communication/wifi_ErrorCode201/Test.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"description"
:
"Configuration for wifi js api Tests"
,
"driver"
:
{
"type"
:
"OHJSUnitTest"
,
"test-timeout"
:
"600000"
,
"shell-timeout"
:
"600000"
,
"testcase-timeout"
:
"600000"
,
"bundle-name"
:
"ohos.acts.communication.wifi.wifidevice"
,
"package-name"
:
"ohos.acts.communication.wifi.wifidevice"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsWifiErrorCode201JSApiTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"hilog -Q pidoff"
,
"power-shell wakeup"
,
"power-shell setmode 602"
]
}
]
}
communication/wifi_ErrorCode201/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
7e3b1eaa
文件已添加
communication/wifi_ErrorCode201/src/main/config.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"app"
:
{
"bundleName"
:
"ohos.acts.communication.wifi.wifidevice"
,
"vendor"
:
"acts"
,
"version"
:
{
"code"
:
1000000
,
"name"
:
"1.0.0"
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"ohos.acts.communication.wifi.wifidevice"
,
"name"
:
".entry"
,
"mainAbility"
:
".MainAbility"
,
"deviceType"
:
[
"tablet"
,
"default"
,
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"wifi_standard"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"orientation"
:
"unspecified"
,
"formsEnabled"
:
false
,
"name"
:
".MainAbility"
,
"srcLanguage"
:
"js"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:MainAbility_desc"
,
"label"
:
"$string:MainAbility_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
},
{
"orientation"
:
"unspecified"
,
"formsEnabled"
:
false
,
"name"
:
".TestAbility"
,
"srcLanguage"
:
"js"
,
"srcPath"
:
"TestAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:TestAbility_desc"
,
"label"
:
"$string:TestAbility_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
},
{
"pages"
:
[
"pages/index/index"
],
"name"
:
".TestAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
],
"defPermissions"
:
[
{
"availableScope"
:
[],
"grantMode"
:
"user_grant"
,
"name"
:
"ohos.permission.ACCESS_LOCATION"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
true
,
"label"
:
"ACCESS_LOCATION label"
,
"description"
:
"ACCESS_LOCATION description"
},
{
"availableScope"
:
[],
"grantMode"
:
"system_grant"
,
"name"
:
"ohos.permission.MANAGE_SECURE_SETTINGS"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
false
,
"label"
:
"MANAGE_SECURE_SETTINGS label"
,
"description"
:
"MANAGE_SECURE_SETTINGS description"
},
{
"availableScope"
:
[],
"grantMode"
:
"user_grant"
,
"name"
:
"ohos.permission.LOCATION"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
true
,
"label"
:
"LOCATION label"
,
"description"
:
"LOCATION description"
}
],
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.GET_NFC_INFO"
,
"reason"
:
"use ohos.permission.GET_NFC_INFO"
}
],
"testRunner"
:
{
"name"
:
"OpenHarmonyTestRunner"
,
"srcPath"
:
"TestRunner"
},
"srcPath"
:
""
}
}
\ No newline at end of file
communication/wifi_ErrorCode201/src/main/js/MainAbility/app.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
export
default
{
onCreate
()
{
console
.
info
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
communication/wifi_ErrorCode201/src/main/js/MainAbility/i18n/en-US.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
communication/wifi_ErrorCode201/src/main/js/MainAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
communication/wifi_ErrorCode201/src/main/js/MainAbility/pages/index/index.css
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
communication/wifi_ErrorCode201/src/main/js/MainAbility/pages/index/index.hml
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
communication/wifi_ErrorCode201/src/main/js/MainAbility/pages/index/index.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
export
default
{
data
:
{
title
:
''
,
myTimeout
:
25000
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
},
onReady
()
{
console
.
info
(
'
onReady finish
'
)
},
}
communication/wifi_ErrorCode201/src/main/js/TestAbility/app.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../test/List.test
'
export
default
{
onCreate
()
{
console
.
info
(
'
TestApplication onCreate
'
)
var
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
console
.
info
(
'
start run testcase!!!
'
)
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
onDestroy
()
{
console
.
info
(
"
TestApplication onDestroy
"
);
}
};
communication/wifi_ErrorCode201/src/main/js/TestAbility/i18n/en-US.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/wifi_ErrorCode201/src/main/js/TestAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/wifi_ErrorCode201/src/main/js/TestAbility/pages/index/index.css
0 → 100644
浏览文件 @
7e3b1eaa
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
@media
screen
and
(
device-type
:
phone
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
60px
;
}
}
@media
screen
and
(
device-type
:
tablet
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
100px
;
}
}
\ No newline at end of file
communication/wifi_ErrorCode201/src/main/js/TestAbility/pages/index/index.hml
0 → 100644
浏览文件 @
7e3b1eaa
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
communication/wifi_ErrorCode201/src/main/js/TestAbility/pages/index/index.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
}
}
communication/wifi_ErrorCode201/src/main/js/TestRunner/OpenHarmonyTestRunner.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
function
translateParamsToString
(
parameters
)
{
const
keySet
=
new
Set
([
'
-s class
'
,
'
-s notClass
'
,
'
-s suite
'
,
'
-s itName
'
,
'
-s level
'
,
'
-s testType
'
,
'
-s size
'
,
'
-s timeout
'
,
'
-s package
'
,
'
-s dryRun
'
])
let
targetParams
=
''
;
for
(
const
key
in
parameters
)
{
if
(
keySet
.
has
(
key
))
{
targetParams
+=
'
'
+
key
+
'
'
+
parameters
[
key
]
}
}
return
targetParams
.
trim
()
}
export
default
{
onPrepare
()
{
console
.
info
(
'
OpenHarmonyTestRunner OnPrepare
'
)
},
onRun
()
{
console
.
log
(
'
OpenHarmonyTestRunner onRun run
'
)
var
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
var
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
testAbilityName
=
abilityDelegatorArguments
.
parameters
[
'
-p
'
]
+
'
.TestAbility
'
var
cmd
=
'
aa start -d 0 -a
'
+
testAbilityName
+
'
-b
'
+
abilityDelegatorArguments
.
bundleName
cmd
+=
'
'
+
translateParamsToString
(
abilityDelegatorArguments
.
parameters
)
var
debug
=
abilityDelegatorArguments
.
parameters
[
"
-D
"
]
console
.
info
(
'
debug value :
'
+
debug
)
if
(
debug
==
'
true
'
)
{
cmd
+=
'
-D
'
}
console
.
info
(
'
cmd :
'
+
cmd
)
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
info
(
'
executeShellCommand : err :
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
executeShellCommand : data :
'
+
data
.
stdResult
);
console
.
info
(
'
executeShellCommand : data :
'
+
data
.
exitCode
);
})
}
};
communication/wifi_ErrorCode201/src/main/js/test/ActWifiErrorCode201.test.js
0 → 100644
浏览文件 @
7e3b1eaa
此差异已折叠。
点击以展开。
communication/wifi_ErrorCode201/src/main/js/test/List.test.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
import
actsWifiErrorCode201Test
from
'
./ActWifiErrorCode201.test.js
'
export
default
function
testsuite
()
{
actsWifiErrorCode201Test
()
}
communication/wifi_ErrorCode201/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"OsAccountTest"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"MainAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"MainAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"TestAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"TestAbility_label"
,
"value"
:
"label"
}
]
}
\ No newline at end of file
communication/wifi_ErrorCode201/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
7e3b1eaa
6.6 KB
communication/wifi_ErrorCode202/BUILD.gn
0 → 100644
浏览文件 @
7e3b1eaa
# Copyright (C) 2022 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsErrorcode202Test") {
hap_profile = "./src/main/config.json"
deps = [
":wifi_js_assets",
":wifi_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsWifiErrorCode202JSApiTest"
part_name = "wifi"
subsystem_name = "communication"
}
ohos_js_assets("wifi_js_assets") {
js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
}
ohos_resources("wifi_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
communication/wifi_ErrorCode202/Test.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"description"
:
"Configuration for wifi js api Tests"
,
"driver"
:
{
"type"
:
"OHJSUnitTest"
,
"test-timeout"
:
"600000"
,
"shell-timeout"
:
"600000"
,
"testcase-timeout"
:
"600000"
,
"bundle-name"
:
"ohos.acts.communication.wifi.wifidevice"
,
"package-name"
:
"ohos.acts.communication.wifi.wifidevice"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsWifiErrorCode202JSApiTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"hilog -Q pidoff"
,
"power-shell wakeup"
,
"power-shell setmode 602"
]
}
]
}
communication/wifi_ErrorCode202/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
7e3b1eaa
文件已添加
communication/wifi_ErrorCode202/src/main/config.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"app"
:
{
"bundleName"
:
"ohos.acts.communication.wifi.wifidevice"
,
"vendor"
:
"acts"
,
"version"
:
{
"code"
:
1000000
,
"name"
:
"1.0.0"
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"ohos.acts.communication.wifi.wifidevice"
,
"name"
:
".entry"
,
"mainAbility"
:
".MainAbility"
,
"deviceType"
:
[
"tablet"
,
"default"
,
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"wifi_standard"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"orientation"
:
"unspecified"
,
"formsEnabled"
:
false
,
"name"
:
".MainAbility"
,
"srcLanguage"
:
"js"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:MainAbility_desc"
,
"label"
:
"$string:MainAbility_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
},
{
"orientation"
:
"unspecified"
,
"formsEnabled"
:
false
,
"name"
:
".TestAbility"
,
"srcLanguage"
:
"js"
,
"srcPath"
:
"TestAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:TestAbility_desc"
,
"label"
:
"$string:TestAbility_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
},
{
"pages"
:
[
"pages/index/index"
],
"name"
:
".TestAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
],
"defPermissions"
:
[
{
"availableScope"
:
[],
"grantMode"
:
"user_grant"
,
"name"
:
"ohos.permission.ACCESS_LOCATION"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
true
,
"label"
:
"ACCESS_LOCATION label"
,
"description"
:
"ACCESS_LOCATION description"
},
{
"availableScope"
:
[],
"grantMode"
:
"system_grant"
,
"name"
:
"ohos.permission.MANAGE_SECURE_SETTINGS"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
false
,
"label"
:
"MANAGE_SECURE_SETTINGS label"
,
"description"
:
"MANAGE_SECURE_SETTINGS description"
},
{
"availableScope"
:
[],
"grantMode"
:
"user_grant"
,
"name"
:
"ohos.permission.LOCATION"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
true
,
"label"
:
"LOCATION label"
,
"description"
:
"LOCATION description"
}
],
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.GET_WIFI_INFO"
,
"reason"
:
"use ohos.permission.GET_WIFI_INFO"
},
{
"name"
:
"ohos.permission.SET_WIFI_INFO"
,
"reason"
:
"use ohos.permission.SET_WIFI_INFO"
},
{
"name"
:
"ohos.permission.MANAGE_WIFI_CONNECTION"
,
"reason"
:
"use ohos.permission.MANAGE_WIFI_CONNECTION"
},
{
"name"
:
"ohos.permission.SET_WIFI_CONFIG"
,
"reason"
:
"use ohos.permission.SET_WIFI_CONFIG"
},
{
"name"
:
"ohos.permission.GET_WIFI_CONFIG"
,
"reason"
:
"use ohos.permission.GET_WIFI_CONFIG"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
,
"reason"
:
"use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name"
:
"ohos.permission.GET_WIFI_LOCAL_MAC"
,
"reason"
:
"use ohos.permission.GET_WIFI_LOCAL_MAC"
},
{
"name"
:
"ohos.permission.GET_WIFI_PEERS_MAC"
,
"reason"
:
"use ohos.permission.GET_WIFI_PEERS_MAC"
},
{
"name"
:
"ohos.permission.MANAGE_WIFI_HOTSPOT"
,
"reason"
:
"use ohos.permission.MANAGE_WIFI_HOTSPOT"
},
{
"name"
:
"ohos.permission.GET_WIFI_INFO_INTERNAL"
,
"reason"
:
"use ohos.permission.GET_WIFI_INFO_INTERNAL"
},
{
"name"
:
"ohos.permission.LOCATION"
,
"reason"
:
"need use ohos.permission.LOCATION"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.ACCESS_LOCATION"
,
"reason"
:
"need use ohos.permission.ACCESS_LOCATION"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.LOCATION_IN_BACKGROUND"
,
"reason"
:
"need use ohos.permission.LOCATION_IN_BACKGROUND"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.MANAGE_SECURE_SETTINGS"
,
"reason"
:
"need use ohos.permission.MANAGE_SECURE_SETTINGS"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
,
"reason"
:
"use ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
},
{
"name"
:
"ohos.permission.REVOKE_SENSITIVE_PERMISSIONS"
,
"reason"
:
"use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO"
}
],
"testRunner"
:
{
"name"
:
"OpenHarmonyTestRunner"
,
"srcPath"
:
"TestRunner"
},
"srcPath"
:
""
}
}
\ No newline at end of file
communication/wifi_ErrorCode202/src/main/js/MainAbility/app.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
export
default
{
onCreate
()
{
console
.
info
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
communication/wifi_ErrorCode202/src/main/js/MainAbility/i18n/en-US.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
communication/wifi_ErrorCode202/src/main/js/MainAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
communication/wifi_ErrorCode202/src/main/js/MainAbility/pages/index/index.css
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
communication/wifi_ErrorCode202/src/main/js/MainAbility/pages/index/index.hml
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
communication/wifi_ErrorCode202/src/main/js/MainAbility/pages/index/index.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
export
default
{
data
:
{
title
:
''
,
myTimeout
:
25000
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
},
onReady
()
{
console
.
info
(
'
onReady finish
'
)
},
}
communication/wifi_ErrorCode202/src/main/js/TestAbility/app.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../test/List.test
'
export
default
{
onCreate
()
{
console
.
info
(
'
TestApplication onCreate
'
)
var
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
console
.
info
(
'
start run testcase!!!
'
)
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
onDestroy
()
{
console
.
info
(
"
TestApplication onDestroy
"
);
}
};
communication/wifi_ErrorCode202/src/main/js/TestAbility/i18n/en-US.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/wifi_ErrorCode202/src/main/js/TestAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/wifi_ErrorCode202/src/main/js/TestAbility/pages/index/index.css
0 → 100644
浏览文件 @
7e3b1eaa
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
@media
screen
and
(
device-type
:
phone
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
60px
;
}
}
@media
screen
and
(
device-type
:
tablet
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
100px
;
}
}
\ No newline at end of file
communication/wifi_ErrorCode202/src/main/js/TestAbility/pages/index/index.hml
0 → 100644
浏览文件 @
7e3b1eaa
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
communication/wifi_ErrorCode202/src/main/js/TestAbility/pages/index/index.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
}
}
communication/wifi_ErrorCode202/src/main/js/TestRunner/OpenHarmonyTestRunner.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
function
translateParamsToString
(
parameters
)
{
const
keySet
=
new
Set
([
'
-s class
'
,
'
-s notClass
'
,
'
-s suite
'
,
'
-s itName
'
,
'
-s level
'
,
'
-s testType
'
,
'
-s size
'
,
'
-s timeout
'
,
'
-s package
'
,
'
-s dryRun
'
])
let
targetParams
=
''
;
for
(
const
key
in
parameters
)
{
if
(
keySet
.
has
(
key
))
{
targetParams
+=
'
'
+
key
+
'
'
+
parameters
[
key
]
}
}
return
targetParams
.
trim
()
}
export
default
{
onPrepare
()
{
console
.
info
(
'
OpenHarmonyTestRunner OnPrepare
'
)
},
onRun
()
{
console
.
log
(
'
OpenHarmonyTestRunner onRun run
'
)
var
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
var
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
testAbilityName
=
abilityDelegatorArguments
.
parameters
[
'
-p
'
]
+
'
.TestAbility
'
var
cmd
=
'
aa start -d 0 -a
'
+
testAbilityName
+
'
-b
'
+
abilityDelegatorArguments
.
bundleName
cmd
+=
'
'
+
translateParamsToString
(
abilityDelegatorArguments
.
parameters
)
var
debug
=
abilityDelegatorArguments
.
parameters
[
"
-D
"
]
console
.
info
(
'
debug value :
'
+
debug
)
if
(
debug
==
'
true
'
)
{
cmd
+=
'
-D
'
}
console
.
info
(
'
cmd :
'
+
cmd
)
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
info
(
'
executeShellCommand : err :
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
executeShellCommand : data :
'
+
data
.
stdResult
);
console
.
info
(
'
executeShellCommand : data :
'
+
data
.
exitCode
);
})
}
};
communication/wifi_ErrorCode202/src/main/js/test/ActWifiErrorCode202.test.js
0 → 100644
浏览文件 @
7e3b1eaa
此差异已折叠。
点击以展开。
communication/wifi_ErrorCode202/src/main/js/test/List.test.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
import
actsWifiErrorCode202Test
from
'
./ActWifiErrorCode202.test.js
'
export
default
function
testsuite
()
{
actsWifiErrorCode202Test
()
}
communication/wifi_ErrorCode202/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"OsAccountTest"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"MainAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"MainAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"TestAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"TestAbility_label"
,
"value"
:
"label"
}
]
}
\ No newline at end of file
communication/wifi_ErrorCode202/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
7e3b1eaa
6.6 KB
communication/wifi_ErrorCode401/BUILD.gn
0 → 100644
浏览文件 @
7e3b1eaa
# Copyright (C) 2022 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsErrorcode401Test") {
hap_profile = "./src/main/config.json"
deps = [
":wifi_js_assets",
":wifi_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsWifiErrorCode401JSApiTest"
part_name = "wifi"
subsystem_name = "communication"
}
ohos_js_assets("wifi_js_assets") {
js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
}
ohos_resources("wifi_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
communication/wifi_ErrorCode401/Test.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"description"
:
"Configuration for wifi js api Tests"
,
"driver"
:
{
"type"
:
"OHJSUnitTest"
,
"test-timeout"
:
"600000"
,
"shell-timeout"
:
"600000"
,
"testcase-timeout"
:
"600000"
,
"bundle-name"
:
"ohos.acts.communication.wifi.wifidevice"
,
"package-name"
:
"ohos.acts.communication.wifi.wifidevice"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsWifiErrorCode401JSApiTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"hilog -Q pidoff"
,
"power-shell wakeup"
,
"power-shell setmode 602"
]
}
]
}
communication/wifi_ErrorCode401/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
7e3b1eaa
文件已添加
communication/wifi_ErrorCode401/src/main/config.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"app"
:
{
"bundleName"
:
"ohos.acts.communication.wifi.wifidevice"
,
"vendor"
:
"acts"
,
"version"
:
{
"code"
:
1000000
,
"name"
:
"1.0.0"
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"ohos.acts.communication.wifi.wifidevice"
,
"name"
:
".entry"
,
"mainAbility"
:
".MainAbility"
,
"deviceType"
:
[
"tablet"
,
"default"
,
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"wifi_standard"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"orientation"
:
"unspecified"
,
"formsEnabled"
:
false
,
"name"
:
".MainAbility"
,
"srcLanguage"
:
"js"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:MainAbility_desc"
,
"label"
:
"$string:MainAbility_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
},
{
"orientation"
:
"unspecified"
,
"formsEnabled"
:
false
,
"name"
:
".TestAbility"
,
"srcLanguage"
:
"js"
,
"srcPath"
:
"TestAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:TestAbility_desc"
,
"label"
:
"$string:TestAbility_label"
,
"type"
:
"page"
,
"visible"
:
true
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
},
{
"pages"
:
[
"pages/index/index"
],
"name"
:
".TestAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
],
"defPermissions"
:
[
{
"availableScope"
:
[],
"grantMode"
:
"user_grant"
,
"name"
:
"ohos.permission.ACCESS_LOCATION"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
true
,
"label"
:
"ACCESS_LOCATION label"
,
"description"
:
"ACCESS_LOCATION description"
},
{
"availableScope"
:
[],
"grantMode"
:
"system_grant"
,
"name"
:
"ohos.permission.MANAGE_SECURE_SETTINGS"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
false
,
"label"
:
"MANAGE_SECURE_SETTINGS label"
,
"description"
:
"MANAGE_SECURE_SETTINGS description"
},
{
"availableScope"
:
[],
"grantMode"
:
"user_grant"
,
"name"
:
"ohos.permission.LOCATION"
,
"availableLevel"
:
"system_basic"
,
"provisionEnable"
:
true
,
"distributedSceneEnable"
:
true
,
"label"
:
"LOCATION label"
,
"description"
:
"LOCATION description"
}
],
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.GET_WIFI_INFO"
,
"reason"
:
"use ohos.permission.GET_WIFI_INFO"
},
{
"name"
:
"ohos.permission.SET_WIFI_INFO"
,
"reason"
:
"use ohos.permission.SET_WIFI_INFO"
},
{
"name"
:
"ohos.permission.MANAGE_WIFI_CONNECTION"
,
"reason"
:
"use ohos.permission.MANAGE_WIFI_CONNECTION"
},
{
"name"
:
"ohos.permission.SET_WIFI_CONFIG"
,
"reason"
:
"use ohos.permission.SET_WIFI_CONFIG"
},
{
"name"
:
"ohos.permission.GET_WIFI_CONFIG"
,
"reason"
:
"use ohos.permission.GET_WIFI_CONFIG"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
,
"reason"
:
"use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name"
:
"ohos.permission.GET_WIFI_LOCAL_MAC"
,
"reason"
:
"use ohos.permission.GET_WIFI_LOCAL_MAC"
},
{
"name"
:
"ohos.permission.GET_WIFI_PEERS_MAC"
,
"reason"
:
"use ohos.permission.GET_WIFI_PEERS_MAC"
},
{
"name"
:
"ohos.permission.MANAGE_WIFI_HOTSPOT"
,
"reason"
:
"use ohos.permission.MANAGE_WIFI_HOTSPOT"
},
{
"name"
:
"ohos.permission.GET_WIFI_INFO_INTERNAL"
,
"reason"
:
"use ohos.permission.GET_WIFI_INFO_INTERNAL"
},
{
"name"
:
"ohos.permission.LOCATION"
,
"reason"
:
"need use ohos.permission.LOCATION"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.ACCESS_LOCATION"
,
"reason"
:
"need use ohos.permission.ACCESS_LOCATION"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.LOCATION_IN_BACKGROUND"
,
"reason"
:
"need use ohos.permission.LOCATION_IN_BACKGROUND"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.MANAGE_SECURE_SETTINGS"
,
"reason"
:
"need use ohos.permission.MANAGE_SECURE_SETTINGS"
,
"usedScene"
:
{
"ability"
:
[
"ohos.acts.location.geolocation.function.MainAbility"
],
"when"
:
"inuse"
}
},
{
"name"
:
"ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
,
"reason"
:
"use ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
},
{
"name"
:
"ohos.permission.REVOKE_SENSITIVE_PERMISSIONS"
,
"reason"
:
"use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO"
}
],
"testRunner"
:
{
"name"
:
"OpenHarmonyTestRunner"
,
"srcPath"
:
"TestRunner"
},
"srcPath"
:
""
}
}
\ No newline at end of file
communication/wifi_ErrorCode401/src/main/js/MainAbility/app.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
export
default
{
onCreate
()
{
console
.
info
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
communication/wifi_ErrorCode401/src/main/js/MainAbility/i18n/en-US.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
communication/wifi_ErrorCode401/src/main/js/MainAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
communication/wifi_ErrorCode401/src/main/js/MainAbility/pages/index/index.css
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
communication/wifi_ErrorCode401/src/main/js/MainAbility/pages/index/index.hml
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
communication/wifi_ErrorCode401/src/main/js/MainAbility/pages/index/index.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
export
default
{
data
:
{
title
:
''
,
myTimeout
:
25000
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
},
onReady
()
{
console
.
info
(
'
onReady finish
'
)
},
}
communication/wifi_ErrorCode401/src/main/js/TestAbility/app.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../test/List.test
'
export
default
{
onCreate
()
{
console
.
info
(
'
TestApplication onCreate
'
)
var
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
console
.
info
(
'
start run testcase!!!
'
)
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
onDestroy
()
{
console
.
info
(
"
TestApplication onDestroy
"
);
}
};
communication/wifi_ErrorCode401/src/main/js/TestAbility/i18n/en-US.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/wifi_ErrorCode401/src/main/js/TestAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
},
"Files"
:
{
}
}
\ No newline at end of file
communication/wifi_ErrorCode401/src/main/js/TestAbility/pages/index/index.css
0 → 100644
浏览文件 @
7e3b1eaa
.container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
left
:
0px
;
top
:
0px
;
width
:
100%
;
height
:
100%
;
}
.title
{
font-size
:
60px
;
text-align
:
center
;
width
:
100%
;
height
:
40%
;
margin
:
10px
;
}
@media
screen
and
(
device-type
:
phone
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
60px
;
}
}
@media
screen
and
(
device-type
:
tablet
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
100px
;
}
}
\ No newline at end of file
communication/wifi_ErrorCode401/src/main/js/TestAbility/pages/index/index.hml
0 → 100644
浏览文件 @
7e3b1eaa
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
communication/wifi_ErrorCode401/src/main/js/TestAbility/pages/index/index.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
}
}
communication/wifi_ErrorCode401/src/main/js/TestRunner/OpenHarmonyTestRunner.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (c) 2022 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.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
function
translateParamsToString
(
parameters
)
{
const
keySet
=
new
Set
([
'
-s class
'
,
'
-s notClass
'
,
'
-s suite
'
,
'
-s itName
'
,
'
-s level
'
,
'
-s testType
'
,
'
-s size
'
,
'
-s timeout
'
,
'
-s package
'
,
'
-s dryRun
'
])
let
targetParams
=
''
;
for
(
const
key
in
parameters
)
{
if
(
keySet
.
has
(
key
))
{
targetParams
+=
'
'
+
key
+
'
'
+
parameters
[
key
]
}
}
return
targetParams
.
trim
()
}
export
default
{
onPrepare
()
{
console
.
info
(
'
OpenHarmonyTestRunner OnPrepare
'
)
},
onRun
()
{
console
.
log
(
'
OpenHarmonyTestRunner onRun run
'
)
var
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
var
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
testAbilityName
=
abilityDelegatorArguments
.
parameters
[
'
-p
'
]
+
'
.TestAbility
'
var
cmd
=
'
aa start -d 0 -a
'
+
testAbilityName
+
'
-b
'
+
abilityDelegatorArguments
.
bundleName
cmd
+=
'
'
+
translateParamsToString
(
abilityDelegatorArguments
.
parameters
)
var
debug
=
abilityDelegatorArguments
.
parameters
[
"
-D
"
]
console
.
info
(
'
debug value :
'
+
debug
)
if
(
debug
==
'
true
'
)
{
cmd
+=
'
-D
'
}
console
.
info
(
'
cmd :
'
+
cmd
)
abilityDelegator
.
executeShellCommand
(
cmd
,
(
err
,
data
)
=>
{
console
.
info
(
'
executeShellCommand : err :
'
+
JSON
.
stringify
(
err
));
console
.
info
(
'
executeShellCommand : data :
'
+
data
.
stdResult
);
console
.
info
(
'
executeShellCommand : data :
'
+
data
.
exitCode
);
})
}
};
communication/wifi_ErrorCode401/src/main/js/test/ActWifiErrorCode401.test.js
0 → 100644
浏览文件 @
7e3b1eaa
此差异已折叠。
点击以展开。
communication/wifi_ErrorCode401/src/main/js/test/List.test.js
0 → 100644
浏览文件 @
7e3b1eaa
/*
* Copyright (C) 2022 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.
*/
import
actsWifiErrorCode401Test
from
'
./ActWifiErrorCode401.test.js
'
export
default
function
testsuite
()
{
actsWifiErrorCode401Test
()
}
communication/wifi_ErrorCode401/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
7e3b1eaa
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"OsAccountTest"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"MainAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"MainAbility_label"
,
"value"
:
"label"
},
{
"name"
:
"TestAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"TestAbility_label"
,
"value"
:
"label"
}
]
}
\ No newline at end of file
communication/wifi_ErrorCode401/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
7e3b1eaa
6.6 KB
location/geolocation_standard/src/main/js/test/GeocoderMTest.test.js
浏览文件 @
7e3b1eaa
...
...
@@ -164,17 +164,20 @@ export default function geolocationTest_geo5() {
let
reverseGeocodeRequest
=
{
"
latitude
"
:
31.265496
,
"
longitude
"
:
121.62771
,
"
maxItems
"
:
5
};
await
geolocationm
.
getAddressesFromLocation
(
reverseGeocodeRequest
).
then
((
data
)
=>
{
console
.
info
(
'
[lbs_js] getAddressesFromLocation21 promise:
'
+
JSON
.
stringify
(
data
));
console
.
info
(
'
addressUrl:
'
+
JSON
.
stringify
(
data
)[
0
].
addressUrl
+
JSON
.
stringify
(
data
)[
0
].
administrativeArea
+
JSON
.
stringify
(
data
)[
0
].
countryCode
+
JSON
.
stringify
(
data
)[
0
].
countryName
+
JSON
.
stringify
(
data
)[
0
].
descriptions
+
JSON
.
stringify
(
data
)[
0
].
descriptionsSize
+
data
[
0
].
latitude
+
JSON
.
stringify
(
data
)[
0
].
locale
+
JSON
.
stringify
(
data
)[
0
].
locality
+
JSON
.
stringify
(
data
)[
0
].
longitude
+
JSON
.
stringify
(
data
)[
0
].
phoneNumber
+
JSON
.
stringify
(
data
)[
0
].
placeName
+
JSON
.
stringify
(
data
)[
0
].
postalCode
+
JSON
.
stringify
(
data
)[
0
].
premises
+
JSON
.
stringify
(
data
)[
0
].
roadName
+
JSON
.
stringify
(
data
)[
0
].
subAdministrativeArea
+
JSON
.
stringify
(
data
)[
0
].
subLocality
+
JSON
.
stringify
(
data
)[
0
].
subRoadName
+
JSON
.
stringify
(
data
)[
0
].
isFromMock
);
if
(
data
!=
""
)
{
console
.
info
(
'
addressUrl:
'
+
JSON
.
stringify
(
data
)[
0
].
addressUrl
+
JSON
.
stringify
(
data
)[
0
].
administrativeArea
+
JSON
.
stringify
(
data
)[
0
].
countryCode
+
JSON
.
stringify
(
data
)[
0
].
countryName
+
JSON
.
stringify
(
data
)[
0
].
descriptions
+
JSON
.
stringify
(
data
)[
0
].
descriptionsSize
+
data
[
0
].
latitude
+
JSON
.
stringify
(
data
)[
0
].
locale
+
JSON
.
stringify
(
data
)[
0
].
locality
+
JSON
.
stringify
(
data
)[
0
].
longitude
+
JSON
.
stringify
(
data
)[
0
].
phoneNumber
+
JSON
.
stringify
(
data
)[
0
].
placeName
+
JSON
.
stringify
(
data
)[
0
].
postalCode
+
JSON
.
stringify
(
data
)[
0
].
premises
+
JSON
.
stringify
(
data
)[
0
].
roadName
+
JSON
.
stringify
(
data
)[
0
].
subAdministrativeArea
+
JSON
.
stringify
(
data
)[
0
].
subLocality
+
JSON
.
stringify
(
data
)[
0
].
subRoadName
+
JSON
.
stringify
(
data
)[
0
].
isFromMock
);
}
}).
catch
(
error
=>
{
console
.
info
(
"
[lbs_js] getAddressesFromLocation21 promise then error.
"
+
JSON
.
stringify
(
error
));
console
.
info
(
'
[lbs_js] not support now
'
);
...
...
location/geolocation_standard/src/main/js/test/LocationMTest.test.js
浏览文件 @
7e3b1eaa
...
...
@@ -612,7 +612,6 @@ export default function geolocationTest_geo7() {
console
.
info
(
'
[lbs_js] sendcommand promise err:
'
+
JSON
.
stringify
(
error
));
console
.
info
(
'
[lbs_js] not support now
'
);
expect
(
error
.
code
).
assertEqual
(
801
);
//expect(true).assertEqual(JSON.stringify(error) != null);
done
();
})
}
catch
(
error
)
{
...
...
@@ -1180,11 +1179,11 @@ export default function geolocationTest_geo7() {
try
{
let
last
=
geolocationm
.
getLastLocation
();
console
.
info
(
'
[lbs_js] getLastLocation latitude:
'
+
last
.
latitude
+
'
longitude:
'
+
result
.
longitude
+
'
altitude:
'
+
resul
t
.
altitude
+
'
accuracy:
'
+
result
.
accuracy
+
'
speed:
'
+
resul
t
.
speed
+
'
timeStamp:
'
+
result
.
timeStamp
+
'
direction:
'
+
resul
t
.
direction
+
'
timeSinceBoot:
'
+
result
.
timeSinceBoot
+
'
additions:
'
+
result
.
additions
+
'
additionSize
'
+
resul
t
.
additionSize
+
'
isFromMock
'
+
resul
t
.
isFromMock
);
'
longitude:
'
+
last
.
longitude
+
'
altitude:
'
+
las
t
.
altitude
+
'
accuracy:
'
+
last
.
accuracy
+
'
speed:
'
+
las
t
.
speed
+
'
timeStamp:
'
+
last
.
timeStamp
+
'
direction:
'
+
las
t
.
direction
+
'
timeSinceBoot:
'
+
last
.
timeSinceBoot
+
'
additions:
'
+
last
.
additions
+
'
additionSize
'
+
las
t
.
additionSize
+
'
isFromMock
'
+
las
t
.
isFromMock
);
expect
(
true
).
assertEqual
(
JSON
.
stringify
(
last
)
!=
null
);
}
catch
(
error
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录