diff --git a/IndicoV2.IntegrationTests/Submissions/SubmissionClientTests.cs b/IndicoV2.IntegrationTests/Submissions/SubmissionClientTests.cs index 9edb84a..5cc1f73 100644 --- a/IndicoV2.IntegrationTests/Submissions/SubmissionClientTests.cs +++ b/IndicoV2.IntegrationTests/Submissions/SubmissionClientTests.cs @@ -315,6 +315,62 @@ public async Task ListSubmissions_SubmissionFilterUpdatedAt_ShouldFetchSubmissio } + [Test] + public async Task ListSubmissions_SubmissionOrAndFilter_ShouldFetchSubmissions() + { + // Arrange + var listData = await _dataHelper.Submissions().ListAnyAsync(_workflowId); + + var filters = new OrFilter + { + Or = new List + { + new AndFilter + { + And = new List + { + new SubmissionFilter + { + Status = SubmissionStatus.COMPLETE, + }, + new SubmissionFilter + { + Retrieved = false, + } + } + }, + new AndFilter + { + And = new List + { + new SubmissionFilter + { + Status = SubmissionStatus.FAILED, + }, + new SubmissionFilter + { + Retrieved = false, + } + } + } + } + }; + // Act + var submissions = await _submissionsClient.ListAsync(null, new List { listData.workflowId }, filters, 0, 10); + + submissions.Should().NotBeNull(); + submissions.PageInfo.Should().NotBeNull(); + submissions.Data.Should().NotBeNull(); + foreach (var submission in submissions.Data) + { + submission.Id.Should().BeGreaterThan(0); + submission.Status.Should().BeOfType(); + submission.Status.Should().Match(status => status == SubmissionStatus.COMPLETE || status == SubmissionStatus.FAILED); + submission.Retrieved.Should().BeFalse(); + } + } + + [Test] public async Task GenerateSubmissionResultAsync_ShouldReturnJob()