Skip to content

Fix checkout ordering response handling#22

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/autonomous-bug-resolution-44a3
Draft

Fix checkout ordering response handling#22
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/autonomous-bug-resolution-44a3

Conversation

@cursor

@cursor cursor Bot commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • Ensure checkout order creation disposes the HTTP response and throws on non-success ordering API responses.
  • Add WebApp unit coverage for request ID header behavior and non-success response handling.
  • Add a Playwright checkout regression that logs in, adds an item, places an order, and verifies redirect to /user/orders.

Runtime Evidence

  • Pre-fix instrumentation showed a simulated ordering response with statusCode:500,isSuccess:false returned without throwing; the new unit test failed with Expected HttpRequestException but no exception was thrown.
  • Post-fix instrumentation showed the same 500 response followed by exceptionType: HttpRequestException.
  • Post-fix checkout E2E logs showed the real flow reached Ordering.API, mediator returned true, HTTP returned 200, and basket deletion completed.

Verification

  • dotnet restore eShop.Web.slnf -p:NuGetAudit=false --ignore-failed-sources && dotnet build eShop.Web.slnf -p:NuGetAudit=false -p:LibraryRestore=False --no-restore
  • dotnet test --project tests/WebApp.UnitTests/WebApp.UnitTests.csproj --no-restore
  • ESHOP_USE_HTTP_ENDPOINTS=1 USERNAME1=bob PASSWORD='Pass123$' npx playwright test --project='e2e tests logged in' e2e/CheckoutTest.spec.ts --reporter=line

Note: restore/build/test emitted known NU1801 warnings from intermittent api.nuget.org connectivity, but completed successfully.

Open in Web View Automation 

Co-authored-by: mattfromcursor <mattfromcursor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant