Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIH-10963 - Polling for today hearings on video web JVS not updating Staff Member page #894

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ bld/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio Code
.vscode/

# Visual Studio 2017 auto generated files
Generated\ Files/

Expand Down
4 changes: 4 additions & 0 deletions BookingsApi/BookingsApi.Client/BookingsApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,7 @@ public partial interface IBookingsApiClient
/// <param name="hearingIds">Hearing Reference ID array</param>
/// <returns>list of hearing Ids with the allocated cso</returns>
/// <exception cref="BookingsApiException">A server side error occurred.</exception>
[System.Obsolete]
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<AllocatedCsoResponse>> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable<System.Guid> hearingIds);

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
Expand All @@ -1136,6 +1137,7 @@ public partial interface IBookingsApiClient
/// <param name="hearingIds">Hearing Reference ID array</param>
/// <returns>list of hearing Ids with the allocated cso</returns>
/// <exception cref="BookingsApiException">A server side error occurred.</exception>
[System.Obsolete]
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<AllocatedCsoResponse>> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable<System.Guid> hearingIds, System.Threading.CancellationToken cancellationToken);

/// <summary>
Expand Down Expand Up @@ -9491,6 +9493,7 @@ public virtual async System.Threading.Tasks.Task<JusticeUserResponse> AllocateHe
/// <param name="hearingIds">Hearing Reference ID array</param>
/// <returns>list of hearing Ids with the allocated cso</returns>
/// <exception cref="BookingsApiException">A server side error occurred.</exception>
[System.Obsolete]
public virtual System.Threading.Tasks.Task<System.Collections.Generic.ICollection<AllocatedCsoResponse>> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable<System.Guid> hearingIds)
{
return GetAllocationsForHearingsAsync(hearingIds, System.Threading.CancellationToken.None);
Expand All @@ -9503,6 +9506,7 @@ public virtual async System.Threading.Tasks.Task<JusticeUserResponse> AllocateHe
/// <param name="hearingIds">Hearing Reference ID array</param>
/// <returns>list of hearing Ids with the allocated cso</returns>
/// <exception cref="BookingsApiException">A server side error occurred.</exception>
[System.Obsolete]
public virtual async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<AllocatedCsoResponse>> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable<System.Guid> hearingIds, System.Threading.CancellationToken cancellationToken)
{
if (hearingIds == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public async Task<List<VideoHearing>> Handle(GetHearingsForTodayQuery query)
.Include(x => x.Participants).ThenInclude(x => x.CaseRole)
.Include(x => x.Participants).ThenInclude(x => x.HearingRole).ThenInclude(x => x.UserRole)
.Include(x => x.HearingCases).ThenInclude(x => x.Case)
.Include(x => x.Endpoints)
shaed-parkar marked this conversation as resolved.
Show resolved Hide resolved
shaed-parkar marked this conversation as resolved.
Show resolved Hide resolved
.Include(x => x.CaseType)
.Include(x => x.HearingVenue)
.Where(x => x.ScheduledDateTime.Date == DateTime.Today.Date)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,19 @@ public async Task Should_return_list_of_hearing_for_today_by_venue_but_dont_incl
venues.Should().Contain(x=> x.Id == _seededHearing.Id);
venues.Should().NotContain(x=> x.Id == hearing2.Id);
}

[Test]
public async Task Should_return_list_of_hearing_for_today_including_endpoints()
{
_seededHearing = await Hooks.SeedVideoHearing(options =>
{
options.ScheduledDate = DateTime.UtcNow.Date;
options.EndpointsToAdd = 2;
});
var query = new GetHearingsForTodayQuery();
var venues = await _handler.Handle(query);
venues.Should().Contain(h => h.Id == _seededHearing.Id);
venues.Should().Contain(v=>v.Endpoints.Any());
}
}
}
Loading