581
581
self.thread_list.select_single('Label', text=message1)
583
583
def test_contact_predictive_text(self):
584
"""test predictive text when selecting contact"""
584
585
self.main_view.click_new_message_button()
585
586
self.assertThat(self.thread_list.visible, Eventually(Equals(False)))
628
629
self.thread_list.select_single('Label', text='Mobile')
629
630
# verify our text
630
631
self.thread_list.select_single('Label', text=message)
633
def test_more_than_one_message_to_contact_with_more_than_one_number(self):
634
"""Send more than one message to a contact with more than one number"""
635
self.main_view.click_new_message_button()
636
self.assertThat(self.thread_list.visible, Eventually(Equals(False)))
638
self.main_view.type_contact_phone_num('1')
639
self.main_view.type_message('message1')
641
self.main_view.click_send_button()
643
self.assertThat(self.main_view.get_header().title,
644
Eventually(Equals('Aa')))
646
# switch back to main page with thread list
647
self.main_view.close_osk()
648
self.main_view.go_back()
650
# verify the main page with the contacts that have sent messages is
652
self.assertThat(self.thread_list.visible, Eventually(Equals(True)))
654
# verify a message in the thread list
655
self.assertThat(self.thread_list.count, Equals(1))
657
self.thread_list.select_single('Label', text='Aa')
658
self.thread_list.select_single('Label', text='message1')
660
# make second message
661
self.main_view.click_new_message_button()
662
self.assertThat(self.thread_list.visible, Eventually(Equals(False)))
664
self.main_view.type_contact_phone_num('9')
665
self.main_view.type_message('message9')
667
self.main_view.click_send_button()
669
self.assertThat(self.main_view.get_header().title,
670
Eventually(Equals('Aa')))
672
# switch back to main page with thread list
673
self.main_view.close_osk()
674
self.main_view.go_back()
676
# verify the main page with the contacts that have sent messages is
678
self.assertThat(self.thread_list.visible, Eventually(Equals(True)))
680
# verify a message in the thread list
681
self.assertThat(self.thread_list.count, Equals(2))
683
self.thread_list.select_many('Label', text='Aa')
684
self.thread_list.select_single('Label', text='message1')
685
self.thread_list.select_single('Label', text='message9')