1"""Test of delete dialed using Mobly and Mobile Harness.
2
3- Requires a testbed with one phones in it that can make calls.
4- Requites sl4a be installed on Android devices. See README.md for details.
5- Optional to use --define="dialer_test_phone_number={$PHONE_NUMBER_VALUE}"
6- Default dialer_test_phone_number=511
7
8 Steps include:
9        1) Pre-call state check on IVI and phone devices. (OK)
10        2) Dial any digits number using Dial Pad
11        3) Delete dialed number
12        4) Assert placeholder on Dial Pad is 'Dial a number'
13"""
14
15from utilities import constants
16from utilities.main_utils import common_main
17from bluetooth_test import bluetooth_base_test
18
19
20
21class DeleteDialedNumberTest(bluetooth_base_test.BluetoothBaseTest):
22  """Implement calling to three digits number test."""
23
24
25  def setup_test(self):
26    """Setup steps before any test is executed."""
27    # Pair the devices
28    self.bt_utils.pair_primary_to_secondary()
29    super().enable_recording()
30
31  def test_delete_dialed_number(self):
32    """Test the calling three digits number functionality."""
33
34    #Variable
35    dialer_test_phone_number = constants.DIALER_THREE_DIGIT_NUMBER
36    #Tests the calling three digits number functionality
37
38    self.call_utils.wait_with_log(2)
39    self.call_utils.dial_a_number(dialer_test_phone_number);
40    self.call_utils.delete_dialed_number_on_dial_pad()
41    self.call_utils.verify_dialed_number_on_dial_pad(
42        constants.DIAL_A_NUMBER
43    )
44
45
46if __name__ == '__main__':
47  common_main()