From 379c2010beb2c411bc38363fdf478bb32aeb01f5 Mon Sep 17 00:00:00 2001 From: q00313334 Date: Wed, 23 Feb 2022 22:28:00 +0800 Subject: [PATCH] wifi issues Signed-off-by: q00313334 --- communication/BUILD.gn | 2 +- .../src/main/js/default/pages/index/index.css | 15 +++++ .../src/main/js/default/pages/index/index.hml | 15 +++++ .../src/main/js/default/pages/index/index.js | 3 +- .../main/js/default/test/BluetoothBle.test.js | 61 +++++++++++-------- .../src/main/js/default/pages/index/index.css | 15 +++++ .../src/main/js/default/pages/index/index.hml | 15 +++++ .../src/main/js/default/pages/index/index.js | 4 +- .../main/js/default/test/BluetoothOn.test.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 +++++ .../src/main/js/default/pages/index/index.hml | 15 +++++ .../src/main/js/default/pages/index/index.js | 3 +- .../main/js/default/test/Bluetooth.test.js | 2 +- communication/wifi_hotspot/BUILD.gn | 2 +- .../wifi_hotspot/src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 16 +++++ .../src/main/js/default/pages/index/index.hml | 16 +++++ .../src/main/js/default/pages/index/index.js | 9 +-- .../src/main/js/default/test/List.test.js | 2 +- .../main/js/default/test/WifiSoftAP.test.js | 2 +- communication/wifi_p2p/BUILD.gn | 2 +- .../wifi_p2p/src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 16 +++++ .../src/main/js/default/pages/index/index.hml | 16 +++++ .../src/main/js/default/pages/index/index.js | 10 +-- .../src/main/js/default/test/List.test.js | 2 +- .../src/main/js/default/test/WifiP2P.test.js | 2 +- communication/wifi_standard/BUILD.gn | 2 +- .../wifi_standard/src/main/js/default/app.js | 2 +- .../src/main/js/default/pages/index/index.css | 15 +++++ .../src/main/js/default/pages/index/index.hml | 16 +++++ .../src/main/js/default/pages/index/index.js | 9 ++- .../src/main/js/default/test/List.test.js | 2 +- .../src/main/js/default/test/WifiSta.test.js | 2 +- 34 files changed, 254 insertions(+), 60 deletions(-) diff --git a/communication/BUILD.gn b/communication/BUILD.gn index 37ad5254d..4407c122e 100644 --- a/communication/BUILD.gn +++ b/communication/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# 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 diff --git a/communication/bluetooth_ble/src/main/js/default/pages/index/index.css b/communication/bluetooth_ble/src/main/js/default/pages/index/index.css index 6fda79275..72baaffca 100644 --- a/communication/bluetooth_ble/src/main/js/default/pages/index/index.css +++ b/communication/bluetooth_ble/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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; diff --git a/communication/bluetooth_ble/src/main/js/default/pages/index/index.hml b/communication/bluetooth_ble/src/main/js/default/pages/index/index.hml index f64b040a5..546cd8296 100644 --- a/communication/bluetooth_ble/src/main/js/default/pages/index/index.hml +++ b/communication/bluetooth_ble/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ +/* + * 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. + */ +
{{ $t('strings.hello') }} {{ title }} diff --git a/communication/bluetooth_ble/src/main/js/default/pages/index/index.js b/communication/bluetooth_ble/src/main/js/default/pages/index/index.js index 0b1831596..6bdd4bdf5 100644 --- a/communication/bluetooth_ble/src/main/js/default/pages/index/index.js +++ b/communication/bluetooth_ble/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,7 +13,6 @@ * limitations under the License. */ -import app from '@system.app' import {Core, ExpectExtend} from 'deccjsunit/index' diff --git a/communication/bluetooth_ble/src/main/js/default/test/BluetoothBle.test.js b/communication/bluetooth_ble/src/main/js/default/test/BluetoothBle.test.js index 6a0e5757e..94e8f4767 100644 --- a/communication/bluetooth_ble/src/main/js/default/test/BluetoothBle.test.js +++ b/communication/bluetooth_ble/src/main/js/default/test/BluetoothBle.test.js @@ -157,7 +157,7 @@ describe('bluetoothhostTest', function() { * @tc.level Level 2 */ it('bluetooth_ble_start_advertising', 0, async function (done) { - console.info('BLE advertising start'); + console.info('[bluetooth_js] BLE advertising start'); var manufactureValueBuffer = new Uint8Array(4); manufactureValueBuffer[0] = 1; manufactureValueBuffer[1] = 2; @@ -269,16 +269,22 @@ describe('bluetoothhostTest', function() { */ it('bluetooth_ble_read_rssi', 0, async function (done) { console.info('[bluetooth_js] BLE get rssi1 start'); - var gattClient = bluetooth.BLE.createGattClientDevice("00:00:00:00:00:00"); - gattClient.getRssiValue((err, data)=> { - console.info('[bluetooth_js] rssi err:' + JSON.stringify(err)); - console.info('[bluetooth_js] rssi value:' + JSON.stringify(data)); - expect(data).assertNull(); - console.info('[bluetooth_js] BLE read rssi1 end'); - done(); - }); + let promise = new Promise((resolve) => { + var gattClient = bluetooth.BLE.createGattClientDevice("00:00:00:00:00:00"); + gattClient.getRssiValue((err, data)=> { + console.info('[bluetooth_js] rssi err:' + JSON.stringify(err)); + console.info('[bluetooth_js] rssi value:' + JSON.stringify(data)); + expect(data).assertNull(); + console.info('[bluetooth_js] BLE read rssi1 end'); + done(); + }); + resolve() + }) + await promise.then(done) + done(); }) + /** * @tc.number SUB_COMMUNACATION_bluetooth_DEVICE_JS_GET_RSSI_VALUE_PROMISE_0001 * @tc.name testGetRssiValue @@ -290,24 +296,29 @@ describe('bluetoothhostTest', function() { */ it('bluetooth_ble_read_rssi_promise', 0, async function (done) { console.info('[bluetooth_js] BLE get rssi start'); - var gattClient = bluetooth.BLE.createGattClientDevice("00:00:00:00:00:00"); - await gattClient.getRssiValue().then((data) => { - if (data != null) { - console.info('[bluetooth_js] rssi' + JSON.stringify(data)); - done(); + let promise = new Promise((resolve) => { + var gattClient = bluetooth.BLE.createGattClientDevice("00:00:00:00:00:00"); + gattClient.getRssiValue().then((data) => { + if (data != null) { + console.info('[bluetooth_js] rssi' + JSON.stringify(data)); + done(); + expect(true).assertEqual(true); + } else { + console.info('[bluetooth_js] BLE read rssi ' + JSON.stringify(data)); + var rssiLength = Object.keys(data).length; + console.info("[bluetooth_js] ble rssi_length -> " + rssiLength); + expect(rssiLength).assertEqual(0); + done(); + } + }).catch(err => { + console.error(`bluetooth getRssiValue has error: ${err}`); expect(true).assertEqual(true); - } else { - console.info('[bluetooth_js] BLE read rssi ' + JSON.stringify(data)); - var rssiLength = Object.keys(data).length; - console.info("[bluetooth_js] ble rssi_length -> " + rssiLength); - expect(rssiLength).assertEqual(0); done(); - } - }).catch(err => { - console.error(`bluetooth getRssiValue has error: ${err}`); - expect(true).assertEqual(true); - done(); - }); + }); + resolve() + }) + await promise.then(done) + done(); }) diff --git a/communication/bluetooth_on/src/main/js/default/pages/index/index.css b/communication/bluetooth_on/src/main/js/default/pages/index/index.css index 6fda79275..72baaffca 100644 --- a/communication/bluetooth_on/src/main/js/default/pages/index/index.css +++ b/communication/bluetooth_on/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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; diff --git a/communication/bluetooth_on/src/main/js/default/pages/index/index.hml b/communication/bluetooth_on/src/main/js/default/pages/index/index.hml index f64b040a5..546cd8296 100644 --- a/communication/bluetooth_on/src/main/js/default/pages/index/index.hml +++ b/communication/bluetooth_on/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ +/* + * 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. + */ +
{{ $t('strings.hello') }} {{ title }} diff --git a/communication/bluetooth_on/src/main/js/default/pages/index/index.js b/communication/bluetooth_on/src/main/js/default/pages/index/index.js index 0b1831596..dfdb3cc85 100644 --- a/communication/bluetooth_on/src/main/js/default/pages/index/index.js +++ b/communication/bluetooth_on/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,8 +13,6 @@ * limitations under the License. */ -import app from '@system.app' - import {Core, ExpectExtend} from 'deccjsunit/index' export default { diff --git a/communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js b/communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js index 59065bb4b..519953d48 100644 --- a/communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js +++ b/communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/bluetooth_standard/src/main/js/default/pages/index/index.css b/communication/bluetooth_standard/src/main/js/default/pages/index/index.css index 6fda79275..72baaffca 100644 --- a/communication/bluetooth_standard/src/main/js/default/pages/index/index.css +++ b/communication/bluetooth_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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; diff --git a/communication/bluetooth_standard/src/main/js/default/pages/index/index.hml b/communication/bluetooth_standard/src/main/js/default/pages/index/index.hml index f64b040a5..546cd8296 100644 --- a/communication/bluetooth_standard/src/main/js/default/pages/index/index.hml +++ b/communication/bluetooth_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,18 @@ +/* + * 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. + */ +
{{ $t('strings.hello') }} {{ title }} diff --git a/communication/bluetooth_standard/src/main/js/default/pages/index/index.js b/communication/bluetooth_standard/src/main/js/default/pages/index/index.js index 0b1831596..6bdd4bdf5 100644 --- a/communication/bluetooth_standard/src/main/js/default/pages/index/index.js +++ b/communication/bluetooth_standard/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,7 +13,6 @@ * limitations under the License. */ -import app from '@system.app' import {Core, ExpectExtend} from 'deccjsunit/index' diff --git a/communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js b/communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js index a28b82b18..4be76344f 100644 --- a/communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js +++ b/communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_hotspot/BUILD.gn b/communication/wifi_hotspot/BUILD.gn index de100eb0c..1780dd415 100755 --- a/communication/wifi_hotspot/BUILD.gn +++ b/communication/wifi_hotspot/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# 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 diff --git a/communication/wifi_hotspot/src/main/js/default/app.js b/communication/wifi_hotspot/src/main/js/default/app.js index 363f2555b..8fe0b77dc 100644 --- a/communication/wifi_hotspot/src/main/js/default/app.js +++ b/communication/wifi_hotspot/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_hotspot/src/main/js/default/pages/index/index.css b/communication/wifi_hotspot/src/main/js/default/pages/index/index.css index 6fda79275..3a8326a07 100644 --- a/communication/wifi_hotspot/src/main/js/default/pages/index/index.css +++ b/communication/wifi_hotspot/src/main/js/default/pages/index/index.css @@ -1,3 +1,19 @@ +/* + * 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; diff --git a/communication/wifi_hotspot/src/main/js/default/pages/index/index.hml b/communication/wifi_hotspot/src/main/js/default/pages/index/index.hml index f64b040a5..0053057b5 100644 --- a/communication/wifi_hotspot/src/main/js/default/pages/index/index.hml +++ b/communication/wifi_hotspot/src/main/js/default/pages/index/index.hml @@ -1,3 +1,19 @@ +/* + * 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. + */ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/communication/wifi_hotspot/src/main/js/default/pages/index/index.js b/communication/wifi_hotspot/src/main/js/default/pages/index/index.js index 2a73c3753..696aad4cf 100755 --- a/communication/wifi_hotspot/src/main/js/default/pages/index/index.js +++ b/communication/wifi_hotspot/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,13 +13,14 @@ * limitations under the License. */ -import app from '@system.app' + import {Core, ExpectExtend} from 'deccjsunit/index' export default { data: { - title: "" + title: '', + myTimeout: 15000 }, onInit() { this.title = this.$t('strings.world'); @@ -37,7 +38,7 @@ export default { core.init() const configService = core.getDefaultService('config') - this.timeout = 15000 + this.timeout = this.myTimeout configService.setConfig(this) require('../../test/List.test') diff --git a/communication/wifi_hotspot/src/main/js/default/test/List.test.js b/communication/wifi_hotspot/src/main/js/default/test/List.test.js index f6ed2e334..c82020ceb 100755 --- a/communication/wifi_hotspot/src/main/js/default/test/List.test.js +++ b/communication/wifi_hotspot/src/main/js/default/test/List.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js b/communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js index eaf7c2b4f..c937f7b5f 100755 --- a/communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js +++ b/communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_p2p/BUILD.gn b/communication/wifi_p2p/BUILD.gn index 5da699586..76ec0a740 100755 --- a/communication/wifi_p2p/BUILD.gn +++ b/communication/wifi_p2p/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# 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 diff --git a/communication/wifi_p2p/src/main/js/default/app.js b/communication/wifi_p2p/src/main/js/default/app.js index 363f2555b..8fe0b77dc 100644 --- a/communication/wifi_p2p/src/main/js/default/app.js +++ b/communication/wifi_p2p/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_p2p/src/main/js/default/pages/index/index.css b/communication/wifi_p2p/src/main/js/default/pages/index/index.css index 6fda79275..3a8326a07 100644 --- a/communication/wifi_p2p/src/main/js/default/pages/index/index.css +++ b/communication/wifi_p2p/src/main/js/default/pages/index/index.css @@ -1,3 +1,19 @@ +/* + * 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; diff --git a/communication/wifi_p2p/src/main/js/default/pages/index/index.hml b/communication/wifi_p2p/src/main/js/default/pages/index/index.hml index f64b040a5..0053057b5 100644 --- a/communication/wifi_p2p/src/main/js/default/pages/index/index.hml +++ b/communication/wifi_p2p/src/main/js/default/pages/index/index.hml @@ -1,3 +1,19 @@ +/* + * 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. + */ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/communication/wifi_p2p/src/main/js/default/pages/index/index.js b/communication/wifi_p2p/src/main/js/default/pages/index/index.js index 2a73c3753..a756c422e 100755 --- a/communication/wifi_p2p/src/main/js/default/pages/index/index.js +++ b/communication/wifi_p2p/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,13 +13,14 @@ * limitations under the License. */ -import app from '@system.app' + import {Core, ExpectExtend} from 'deccjsunit/index' export default { data: { - title: "" + title: '', + myTimeout: 15000 }, onInit() { this.title = this.$t('strings.world'); @@ -37,7 +38,8 @@ export default { core.init() const configService = core.getDefaultService('config') - this.timeout = 15000 + + this.timeout = this.myTimeout configService.setConfig(this) require('../../test/List.test') diff --git a/communication/wifi_p2p/src/main/js/default/test/List.test.js b/communication/wifi_p2p/src/main/js/default/test/List.test.js index f93cd18a2..4be23311c 100755 --- a/communication/wifi_p2p/src/main/js/default/test/List.test.js +++ b/communication/wifi_p2p/src/main/js/default/test/List.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_p2p/src/main/js/default/test/WifiP2P.test.js b/communication/wifi_p2p/src/main/js/default/test/WifiP2P.test.js index ccee28589..b0e5c7e95 100644 --- a/communication/wifi_p2p/src/main/js/default/test/WifiP2P.test.js +++ b/communication/wifi_p2p/src/main/js/default/test/WifiP2P.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_standard/BUILD.gn b/communication/wifi_standard/BUILD.gn index 71407c7da..6cde1a2f3 100755 --- a/communication/wifi_standard/BUILD.gn +++ b/communication/wifi_standard/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Huawei Device Co., Ltd. +# 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 diff --git a/communication/wifi_standard/src/main/js/default/app.js b/communication/wifi_standard/src/main/js/default/app.js index 363f2555b..8fe0b77dc 100644 --- a/communication/wifi_standard/src/main/js/default/app.js +++ b/communication/wifi_standard/src/main/js/default/app.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_standard/src/main/js/default/pages/index/index.css b/communication/wifi_standard/src/main/js/default/pages/index/index.css index 6fda79275..72baaffca 100644 --- a/communication/wifi_standard/src/main/js/default/pages/index/index.css +++ b/communication/wifi_standard/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * 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; diff --git a/communication/wifi_standard/src/main/js/default/pages/index/index.hml b/communication/wifi_standard/src/main/js/default/pages/index/index.hml index f64b040a5..0053057b5 100644 --- a/communication/wifi_standard/src/main/js/default/pages/index/index.hml +++ b/communication/wifi_standard/src/main/js/default/pages/index/index.hml @@ -1,3 +1,19 @@ +/* + * 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. + */ + +
{{ $t('strings.hello') }} {{ title }} diff --git a/communication/wifi_standard/src/main/js/default/pages/index/index.js b/communication/wifi_standard/src/main/js/default/pages/index/index.js index 2a73c3753..6e05db1fe 100755 --- a/communication/wifi_standard/src/main/js/default/pages/index/index.js +++ b/communication/wifi_standard/src/main/js/default/pages/index/index.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 @@ -13,13 +13,12 @@ * limitations under the License. */ -import app from '@system.app' - import {Core, ExpectExtend} from 'deccjsunit/index' export default { data: { - title: "" + title: '', + myTimeout: 15000 }, onInit() { this.title = this.$t('strings.world'); @@ -37,7 +36,7 @@ export default { core.init() const configService = core.getDefaultService('config') - this.timeout = 15000 + this.timeout = this.myTimeout configService.setConfig(this) require('../../test/List.test') diff --git a/communication/wifi_standard/src/main/js/default/test/List.test.js b/communication/wifi_standard/src/main/js/default/test/List.test.js index 0a3bd0edd..00a5ef997 100755 --- a/communication/wifi_standard/src/main/js/default/test/List.test.js +++ b/communication/wifi_standard/src/main/js/default/test/List.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 diff --git a/communication/wifi_standard/src/main/js/default/test/WifiSta.test.js b/communication/wifi_standard/src/main/js/default/test/WifiSta.test.js index 66c969631..0e2262ec2 100755 --- a/communication/wifi_standard/src/main/js/default/test/WifiSta.test.js +++ b/communication/wifi_standard/src/main/js/default/test/WifiSta.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * 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 -- GitLab