1"""Test ability to call a phone number from search results. 2 3- Requires a testbed with one phone in it that can make calls. 4 5 Steps include: 61. Tap on Phone icon from facet rail or App launcher to launch Dialer app 72. Go to 'Contacts' and verify that all Contacts from Mobile Device displayed in Carkit 83. Click on Search icon and enter any name or alphabet on it 94. Verify that contacts matching with entered alphabet, name or number is showing in the list 105. Select the contact and a make a call 11""" 12from utilities import constants 13from utilities.main_utils import common_main 14from bluetooth_test import bluetooth_base_test 15 16 17class MakeCallFromHistoryTest(bluetooth_base_test.BluetoothBaseTest): 18 """Implement calling to ten digits number test.""" 19 def setup_test(self): 20 21 # Pair the devices 22 self.bt_utils.pair_primary_to_secondary() 23 super().enable_recording() 24 25 def test_dial_large_digits_number(self): 26 """Tests the calling ten digits number functionality.""" 27 #Variable 28 dialer_test_phone_number = constants.DIALER_LARGE_DIGIT_NUMBER 29 #Tests the calling ten digits number functionality 30 31 self.call_utils.dial_a_number(dialer_test_phone_number) 32 self.call_utils.make_call() 33 self.call_utils.wait_with_log(5) 34 self.call_utils.verify_dialing_number(dialer_test_phone_number) 35 self.call_utils.end_call() 36 self.call_utils.wait_with_log(5) 37 self.call_utils.open_call_history() 38 self.call_utils.call_most_recent_call_history() 39 self.call_utils.wait_with_log(5) 40 self.call_utils.verify_dialing_number(dialer_test_phone_number) 41 self.call_utils.press_home() 42 43 def teardown_test(self): 44 # End call if test failed 45 self.call_utils.end_call_using_adb_command(self.target) 46 self.call_utils.wait_with_log(5) 47 super().teardown_test() 48 49if __name__ == '__main__': 50 common_main()