Digital Credentials: Fix user activation tests for early validation errors#57231
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates digital credentials tests to reflect a specification change where validation errors (TypeError) no longer consume user activation, as validation now happens before user activation checking.
Changes:
- Modified existing user activation consumption test to assert that activation is preserved on validation errors
- Added user activation preservation assertions to all TypeError test cases in get() and create() methods
- Added missing user activation bless calls to ensure proper test setup
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| digital-credentials/user-activation.https.html | Updated test assertion from assert_false to assert_true to verify user activation is NOT consumed on early validation errors |
| digital-credentials/get.tentative.https.html | Added three user activation preservation checks for TypeError cases and one missing test_driver.bless() call |
| digital-credentials/create.tentative.https.html | Added two user activation preservation checks for TypeError cases and one missing test_driver.bless() call |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Thinking about this a bit more, this indicates the verifier can keep reusing the same user activation in case of validation errors. |
mohamedamir
left a comment
There was a problem hiding this comment.
LGTM because it's aligned with the spec change, but I added some comments regarding the main idea.
Feel free to discuss here or in the spec change PR.
25b1f4c to
4f5e692
Compare
57ed232 to
a89a72d
Compare
mohamedamir
left a comment
There was a problem hiding this comment.
Still LGTM
Thank you!
They can't do much, because transient activation bombs out after a few seconds.
yeah, it's not very useful or something that can really be exploited in a meaningful way. |
This is a minor fix in the user activation tests in issuance to be compatible with the latest testing infrastructure. After this fix, the issuance user activation tests will be aligned with presentation tests.
3d02b48 to
10d42da
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
digital-credentials/user-activation-get.https.html:36
- The test description mentions "empty requests" but the test actually passes an empty protocol array. Consider updating the description to say "with empty protocol array" for clarity and accuracy.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Validation errors (TypeError) no longer consume user activation since validation now happens before user activation checking.
Spec change: w3c-fedid/digital-credentials#418