<commit_before>from C4CApplication.unit_tests.super_class import MySeleniumTests
from C4CApplication.page_objects.ListMessagesPage import ListMessagesPage
from C4CApplication.page_objects.HomePage import HomePage

from C4CApplication.models import Member, Message


import time

class MessageTest(MySeleniumTests):

    def test_see_message_received(self):
        #log in
        self.populate_db()
        self.selenium.get('%s%s' % (self.live_server_url, ''))
        page = HomePage(self.selenium)
        page = page.quick_login_successful('<EMAIL>', 'azerty<PASSWORD>')
        time.sleep(1)
        
        self.selenium.get('%s%s' % (self.live_server_url, '/list_messages/1'))
        page = ListMessagesPage(self.selenium)
        
        page = page.click_on_read_more(0)
        time.sleep(5)
        
        
        subject = self.selenium.find_elements_by_xpath("//h1[@style='text-align : center;']")[0]
        self.assertEqual(subject.text, "Comment faire une donation ? ")
        return True
    
    def test_see_message_sent(self):
        #log in
        self.populate_db()
        self.selenium.get('%s%s' % (self.live_server_url, ''))
        page = HomePage(self.selenium)
        page = page.quick_login_successful('<EMAIL>', '<PASSWORD>')
        time.sleep(1)
        
        self.selenium.get('%s%s' % (self.live_server_url, '/list_messages/1'))
        page = ListMessagesPage(self.selenium)
        
        page = page.click_on_switch()
        time.sleep(1)
        
        page = page.click_on_read_more(0)
        time.sleep(1)
        
        self.assertEqual(0, 0)
        return True
    
    def test_send_message(self):
        #log in
        self.populate_db()
        self.selenium.get('%s%s' % (self.live_server_url, ''))
        page = HomePage(self.selenium)
        page = page.quick_login_successful('<EMAIL>', '<PASSWORD>')
        time.sleep(1)
        
        self.selenium.get('%s%s' % (self.live_server_url, '/list_messages/1'))
        page = ListMessagesPage(self.selenium)
        <commit_msg>MessageTest Done<commit_after>from C4CApplication.unit_tests.super_class import MySeleniumTests
from C4CApplication.page_objects.ListMessagesPage import ListMessagesPage
from C4CApplication.page_objects.HomePage import HomePage

from C4CApplication.models import Member, Message


import time

class MessageTest(MySeleniumTests):

    def test_see_message_received(self):
        #log in
        self.populate_db()
        self.selenium.get('%s%s' % (self.live_server_url, ''))
        page = HomePage(self.selenium)
        page = page.quick_login_successful('<EMAIL>', '<PASSWORD>')
        time.sleep(1)
        
        self.selenium.get('%s%s' % (self.live_server_url, '/list_messages/1'))
        page = ListMessagesPage(self.selenium)
        
        page = page.click_on_read_more(0)
        time.sleep(5)
        
        
        subject = self.selenium.find_elements_by_xpath("//h1[@style='text-align : center;']")[0]
        self.assertEqual(subject.text, "Comment faire une donation ?")
        return True
    
    def test_see_message_sent(self):
        #log in
        self.populate_db()
        self.selenium.get('%s%s' % (self.live_server_url, ''))
        page = HomePage(self.selenium)
        page = page.quick_login_successful('<EMAIL>', '<PASSWORD>')
        time.sleep(1)
        
        self.selenium.get('%s%s' % (self.live_server_url, '/list_messages/1'))
        page = ListMessagesPage(self.selenium)
        
        page = page.click_on_switch()
        time.sleep(1)
        
        page = page.click_on_read_more(0)
        time.sleep(1)
        
        subject = self.selenium.find_elements_by_xpath("//h1[@style='text-align : center;']")[0]
        self.assertEqual(subject.text, "Comment faire une donation ?")
        return True
    
    def test_send_message(self):
        #log in
        self.populate_db()
        self.selenium.get('%s%s' % (self.live_server_url, ''))
        page = HomePage(self.selenium)
        page = page.quick_login_successful('<EMAIL>', 'azertyuiop')
        time.sleep(1)
        
        self.selenium.get('%s%s' % (self.live_server_url, '/list_messages/1'))
        page = ListMessagesPage(self.selenium)
        
{'fraction_non_alphanumeric': 0.12585434833843978, 'fraction_numerical': 0.00895592740985152, 'mean_word_length': 2.5905245346869714, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '928876', 'n_tokens_mistral': 1413, 'n_tokens_neox': 1382, 'n_words': 203}