Esempio n. 1
0
 def test_text_box_cfg_precision(self):
     test_control = TextBox("TEXTBOXID", precision=Precision.SIX)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Precision(cfg_dict['precision']), Precision.SIX,
                      "CFG precision should be SIX")
Esempio n. 2
0
 def test_text_box_cfg_close_keyboard_on_send(self):
     test_control = TextBox("TEXTBOXID", close_keyboard_on_send=True)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['closeKbdOnSend'], True,
                      "CFG closeKbdOnSend should be True")
Esempio n. 3
0
 def test_text_box_cfg_keyboard_type(self):
     test_control = TextBox("TEXTBOXID", keyboard_type=Keyboard.HEX)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(Keyboard(cfg_dict['kbdType']), Keyboard.HEX,
                      "CFG kbdType should be HEX")
Esempio n. 4
0
 def test_text_box_cfg_units(self):
     test_control = TextBox("TEXTBOXID", units='Amps')
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(cfg_dict['units'], 'Amps',
                      "CFG units should be 'Amps'")
Esempio n. 5
0
 def test_text_box_cfg_text_format(self):
     test_control = TextBox("TEXTBOXID", text_format=TextFormat.NUMBER)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(TextFormat(cfg_dict['format']), TextFormat.NUMBER,
                      "CFG format should be CENTER")
Esempio n. 6
0
 def test_text_box_cfg_text_align(self):
     test_control = TextBox("TEXTBOXID", text_align=TextAlignment.CENTER)
     cfg_dict = _get_cfg_dict(test_control.get_cfg(1))
     self.assertEqual(TextAlignment(cfg_dict['textAlign']),
                      TextAlignment.CENTER,
                      "CFG textAlign should be CENTER")
Esempio n. 7
0
 def test_text_box_control_id(self):
     test_control = TextBox("TEXTBOXID")
     test_str_list = test_control._control_hdr_str.split('\t')
     self.assertEqual(test_str_list[3], 'TEXTBOXID',
                      "control type should be TEXTBOXID")