@@ -1062,6 +1062,56 @@ def test_community_mentions_push_notification(self):
1062
1062
# "Channel did not open by clicking on a notification with the mention for the invited member")
1063
1063
self .errors .verify_no_errors ()
1064
1064
1065
+ @marks .testrail_id (702809 )
1066
+ def test_community_markdown_support (self ):
1067
+ markdown = {
1068
+ 'bold text in asterics' : '**' ,
1069
+ 'bold text in underscores' : '__' ,
1070
+ 'italic text in asteric' : '*' ,
1071
+ 'italic text in underscore' : '_' ,
1072
+ 'inline code' : '`' ,
1073
+ 'code blocks' : '```' ,
1074
+ 'quote reply (one row)' : '>' ,
1075
+ }
1076
+
1077
+ for home in self .homes :
1078
+ home .click_system_back_button_until_element_is_shown ()
1079
+ home .jump_to_communities_home ()
1080
+ community = home .get_chat (self .community_name , community = True ).click ()
1081
+ community .get_channel (self .channel_name ).click ()
1082
+
1083
+ for message , symbol in markdown .items ():
1084
+ self .home_1 .just_fyi ('Checking that "%s" is applied (%s) in community channel' % (message , symbol ))
1085
+ message_to_send = symbol + message + symbol if 'quote' not in message else symbol + message
1086
+ self .channel_2 .send_message (message_to_send )
1087
+ if not self .channel_2 .chat_element_by_text (message ).is_element_displayed ():
1088
+ self .errors .append (
1089
+ '%s is not displayed with markdown in community channel for the sender (device 2) \n ' % message )
1090
+
1091
+ if not self .channel_1 .chat_element_by_text (message ).is_element_displayed ():
1092
+ self .errors .append (
1093
+ '%s is not displayed with markdown in community channel for the recipient (device 1) \n ' % message )
1094
+
1095
+ for home in self .homes :
1096
+ home .jump_to_messages_home ()
1097
+
1098
+ chat_1 = self .home_1 .get_chat (self .username_2 ).click ()
1099
+ chat_2 = self .home_2 .get_chat (self .username_1 ).click ()
1100
+
1101
+ for message , symbol in markdown .items ():
1102
+ self .home_1 .just_fyi ('Checking that "%s" is applied (%s) in 1-1 chat' % (message , symbol ))
1103
+ message_to_send = symbol + message + symbol if 'quote' not in message else symbol + message
1104
+ chat_1 .send_message (message_to_send )
1105
+ if not chat_1 .chat_element_by_text (message ).is_element_displayed (30 ):
1106
+ self .errors .append (
1107
+ '%s is not displayed with markdown in 1-1 chat for the sender (device 1) \n ' % message )
1108
+
1109
+ if not chat_2 .chat_element_by_text (message ).is_element_displayed (30 ):
1110
+ self .errors .append (
1111
+ '%s is not displayed with markdown in 1-1 chat for the recipient (device 2) \n ' % message )
1112
+
1113
+ self .errors .verify_no_errors ()
1114
+
1065
1115
@marks .testrail_id (702845 )
1066
1116
def test_community_leave (self ):
1067
1117
self .home_2 .click_system_back_button_until_element_is_shown ()
0 commit comments