[tv][bluetooth]fix manual testing fail for 9.0 VD release 46/310246/2
authorchen <chen89.chen@samsung.com>
Wed, 24 Apr 2024 10:24:53 +0000 (18:24 +0800)
committerchen chen <chen89.chen@samsung.com>
Wed, 24 Apr 2024 10:14:26 +0000 (10:14 +0000)
Change-Id: I398b21d580bed52dcefc44905daca36e9b48b44f
Signed-off-by: chen <chen89.chen@samsung.com>
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_onconnect_attribute.html
common/tct-bluetooth-tizen-tests/tests.full.xml
common/tct-bluetooth-tizen-tests/tests.xml

index fecac5e424dfce9c9d26cbfc6232d332b6c81772..b7a7134729f191610d36c238e225f7018662fb4e 100755 (executable)
@@ -57,7 +57,7 @@ Authors:
 //==== EXPECT onconnect is called.\r
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
-//==== PRE tct-bt-helper MUST be launched on the remote device.\r
+//==== PRE tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test, as already bonded devices cannot pass this test.\r
 //==== TEST_CRITERIA MOA MAST\r
 setup({timeout:180000, explicit_done:true});\r
 var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
index dbe3c2feb0ef327cd00db48249382df514ab19b0..3e5a9607f06f1a2844f0b58acfe92b2003c366fd 100755 (executable)
@@ -22,11 +22,13 @@ Authors:
 \r
 -->\r
 <html>\r
+\r
 <head>\r
 <title>BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared</title>\r
 <script src="support/unitcommon.js"></script>\r
 <script src="support/bluetooth_common.js"></script>\r
 </head>\r
+\r
 <body>\r
 \r
 <div id="log"></div>\r
@@ -41,13 +43,13 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
 //==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
 //==== TEST_CRITERIA CBT CBOA\r
-setup({timeout: 180000});\r
-var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+setup({ timeout: 180000 });\r
+var adapter = null, t = async_test(document.title, { timeout: 180000 }),\r
     stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessOneCB, discoverDevicesSuccessTwoCB, flag = false;\r
 \r
 t.step(function () {\r
     if (BT_SUPPORT) { // network.bluetooth support\r
-      discoverDevicesErrorCB = t.step_func(function (e) {\r
+        discoverDevicesErrorCB = t.step_func(function (e) {\r
             assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
         });\r
 \r
@@ -80,8 +82,18 @@ t.step(function () {
             }),\r
             onfinished: t.step_func(function (devices) {\r
                 if (devices.length > 0) {\r
+                    found = false;\r
+                    for (var i = 0; i < devices.length; i++) {\r
+                        if (devices[i].address === REMOTE_DEVICE_ADDRESS) {\r
+                            found = true;\r
+                            break;\r
+                        }\r
+                    }\r
+                    if (found === false) {\r
+                        assert_unreached("Device not found:" + REMOTE_DEVICE_ADDRESS);\r
+                    }\r
+                    alert("Please disable bluetooth on the other device, then close this alert");\r
                     adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);\r
-                    alert("Please disable bluetooth on other device");\r
                 } else {\r
                     setTimeout(stopDiscoverySuccess, 1000);\r
                 }\r
@@ -102,4 +114,5 @@ t.step(function () {
 \r
 </script>\r
 </body>\r
-</html>\r
+\r
+</html>
\ No newline at end of file
index bf45bc6a51eb94048802ec80112d9c32d3de8860..ec423cc11428c184eeec11232176f4bdbd98a96d 100755 (executable)
@@ -50,7 +50,7 @@ Authors:
 //==== EXPECT onconnect is called.\r
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:onconnect A\r
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. tct-bt-helper MUST be launched on the remote device and turn on.\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices, tct-bt-helper MUST be launched on the remote device and turn on, devices need to be unpaired/unbonded before the test as already bonded devices cannot pass this test.\r
 //==== TEST_CRITERIA ASG AE AT ADV\r
 setup({timeout:180000, explicit_done:true});\r
 var t = async_test(document.title, {timeout: 180000}), adapter, onError, testMessage, registerSuccessCallback,\r
index 41263829a273ea5ee0ff4a36ce931c8354f7fcac..f99e5b39b0312318706ba85a2d61947bb89a41a1 100755 (executable)
@@ -9136,7 +9136,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
       </testcase>
       <testcase purpose="Check whether a service record is registered and onconnect is called" type="compliance" status="approved" component="Tizen Device APIs/Communication/Bluetooth" execution_type="manual" priority="P2" id="BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful">
         <description>
-          <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+          <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test, as already bonded devices cannot pass this test.</pre_condition>
           <steps>
             <step order="1">
               <step_desc>Push [Search] button on the remote device after description is appeared.</step_desc>
@@ -11306,7 +11306,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
       </testcase>
       <testcase component="Tizen Device APIs/Communication/Bluetooth" type="compliance" status="approved" execution_type="manual" id="BluetoothServiceHandler_onconnect_attribute" priority="P1" purpose="Check whether a service record is registered in the device service record database properly (part 2)">
         <description>
-          <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+          <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test as already bonded devices cannot pass this test.</pre_condition>
           <steps>
             <step order="1">
               <step_desc>Push [Search] button on the remote device after pop-up is launched.</step_desc>
index c5912051a9f8f91f7aea42f8a60d70575779c236..6175c0d4f1bdb189fa6a0af9c0594045f21fbb7d 100755 (executable)
@@ -4196,7 +4196,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
       </testcase>
       <testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="manual" id="BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful" priority="P2" purpose="Check whether a service record is registered and onconnect is called">
         <description>
-          <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+          <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test, as already bonded devices cannot pass this test.</pre_condition>
           <steps>
             <step order="1">
               <step_desc>Push [Search] button on the remote device after description is appeared.</step_desc>
@@ -5100,7 +5100,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
       </testcase>
       <testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="manual" id="BluetoothServiceHandler_onconnect_attribute" priority="P1" purpose="Check whether a service record is registered in the device service record database properly (part 2)">
         <description>
-          <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+          <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test as already bonded devices cannot pass this test.</pre_condition>
           <steps>
             <step order="1">
               <step_desc>Push [Search] button on the remote device after pop-up is launched.</step_desc>