Skip to content

Commit

Permalink
Improve slack tester
Browse files Browse the repository at this point in the history
  • Loading branch information
vaijab committed Jul 10, 2024
1 parent f74bf66 commit 2cced85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/commplatform/slack_tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ type SlackMessageAssertion func(content slack.Message) (bool, int, string)
func (s *SlackChannel) ID() string {
return s.Channel.ID
}

func (s *SlackChannel) Name() string {
return s.Channel.Name
}

func (s *SlackChannel) Identifier() string {
return s.Channel.Name
}
Expand Down Expand Up @@ -347,7 +349,7 @@ func (s *SlackTester) WaitForMessagePostedWithFileUpload(userID, channelID strin
var fetchedMessages []slack.Message
var lastErr error
err := wait.PollUntilContextTimeout(context.Background(), pollInterval, s.cfg.MessageWaitTimeout, false, func(ctx context.Context) (done bool, err error) {
fetchedMessages, err := s.getMessages(channelID, 2) // Fetching 2 messages, where the first one is the file itself and the second is the filter input.
fetchedMessages, err = s.getMessages(channelID, 2) // Fetching 2 messages, where the first one is the file itself and the second is the filter input.
if err != nil {
lastErr = err
return false, nil
Expand Down

0 comments on commit 2cced85

Please sign in to comment.