File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ def test_slack_preview_default_template(slack_channel: SlackChannel):
5555 )
5656
5757 slack_sender .send_finding_to_slack (finding , preview_params , platform_enabled = True )
58- latest_message = slack_channel .get_latest_message ()
58+ latest_message = slack_channel .get_complete_latest_message ()
5959
6060 # Check for key elements in the preview message
6161 assert "Test Preview Template" in latest_message
@@ -114,7 +114,7 @@ def test_slack_preview_custom_template(slack_channel: SlackChannel):
114114 )
115115
116116 slack_sender .send_finding_to_slack (finding , preview_params , platform_enabled = True )
117- latest_message = slack_channel .get_latest_message ()
117+ latest_message = slack_channel .get_complete_latest_message ()
118118
119119 # Check for custom template elements
120120 assert "CUSTOM PREVIEW: Test Custom Preview Template" in latest_message
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ def get_latest_message(self):
2222 messages = results ["messages" ]
2323 return messages [0 ]["text" ]
2424
25+ def get_complete_latest_message (self ):
26+ results = self .client .conversations_history (channel = self .channel_id )
27+ messages = results ["messages" ]
28+ return messages
29+
2530 @staticmethod
2631 def _create_or_join_channel (client : WebClient , channel_name : str ) -> str :
2732 """Creates or joins the specified slack channel and returns its channel_id"""
You can’t perform that action at this time.
0 commit comments