Skip to content

Update document capture to use request utility#8072

Merged
aduth merged 6 commits intomainfrom
aduth-document-capture-request-util
Mar 28, 2023
Merged

Update document capture to use request utility#8072
aduth merged 6 commits intomainfrom
aduth-document-capture-request-util

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Mar 24, 2023

🛠 Summary of changes

Updates fetch usage in document capture to use the @18f/identity-request utility.

Why?

  • For consistent handling of CSRF token
  • Expands features of @18f/identity-request to support use-case of raw response handling

📜 Testing Plan

  • Ensure no regressions in document capture submission

aduth added 3 commits March 24, 2023 15:20
changelog: Bug Fixes, Form Submission, Refresh form authenticity token when user's session is renewed with "Keep me signed in"
From earlier iteration
@aduth aduth requested a review from allthesignals March 24, 2023 19:24
@aduth aduth marked this pull request as draft March 24, 2023 19:26
@aduth
Copy link
Contributor Author

aduth commented Mar 24, 2023

There's some failing tests I'll need to work through. Reverting to draft for now.

@aduth
Copy link
Contributor Author

aduth commented Mar 24, 2023

Tests should hopefully be fixed now. Just needed to sync them to (1) new expectation that CSRF is not an implementation detail of the document capture's upload and (2) use real Response values in fetch stubbing, since the request utility expects to be able to read from the response headers.

@aduth aduth marked this pull request as ready for review March 24, 2023 19:56
@aduth aduth merged commit fef6075 into main Mar 28, 2023
@aduth aduth deleted the aduth-document-capture-request-util branch March 28, 2023 13:15
@aduth aduth mentioned this pull request Mar 29, 2023
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.

2 participants