elsa-core/test/unit/Elsa.UserTasks.UnitTests
Sipke Schoorstra 249bde780b
fix(user-tasks): align query sort and cursor contract across providers (#8144)
* fix(user-tasks): align query sort and cursor contract across providers

Implement the REST updated sort on EF and VNext, drop the InMemory-only
completed sort, and use one always-ascending Id tiebreaker plus the
production JSON base64url cursor codec in every repository.

Closes #8110

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(user-tasks): keep title cursor ties comparison-consistent

Use the same string.Compare relation for title ordering and cursor
tie detection so culture-equal Unicode forms are not skipped. Assert
updated sort order directly so a created fallback cannot pass.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(user-tasks): use one ordinal comparer for title sort and cursors

OrderBy, title-tie detection, and cursor filtering now share
StringComparer.Ordinal on the LINQ-to-objects providers so Unicode
variants cannot skip a page.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(user-tasks): share default title comparison across providers

InMemory and VNext title sort/cursors now use the same OrderBy plus
string.Compare relation as EF (SQL collation / current culture) so a
title cursor stays portable. Ties still use Compare == 0, not ordinal ==.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* docs(user-tasks): title cursors are provider-scoped, not portable

Restore InMemory/VNext ordinal title OrderBy/tie/cursor (EF stays
column-collation). Document that title pages must be recreated after a
provider or collation change; other sorts plus Id stay portable.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-14 06:43:03 +02:00
..
Authorization feat(user-tasks)!: migrate endpoints to structured permissions (#7999) 2026-08-27 12:06:52 +02:00
Elsa.UserTasks.UnitTests.csproj feat(user-tasks)!: migrate endpoints to structured permissions (#7999) 2026-08-27 12:06:52 +02:00
UserTaskInvitationTests.cs feat(user-tasks)!: migrate endpoints to structured permissions (#7999) 2026-08-27 12:06:52 +02:00
UserTaskTestFixture.cs feat(user-tasks)!: migrate endpoints to structured permissions (#7999) 2026-08-27 12:06:52 +02:00
UserTaskTests.cs fix(user-tasks): align query sort and cursor contract across providers (#8144) 2026-09-14 06:43:03 +02:00