issue #4387 expect exact file names when using awaitDownloadTriggeredByClicking() in tests#4392
Conversation
|
@tomholub Ready for review |
test/source/tests/flaky.ts
Outdated
| const files = await myKeyFrame.awaitDownloadTriggeredByClicking('@action-download-prv'); | ||
| const key = await KeyUtil.parse(Object.values(files).pop()!.toString()); | ||
| const downloadedFiles = await myKeyFrame.awaitDownloadTriggeredByClicking('@action-download-prv'); | ||
| // It is not possible to have predictable file name here, because key is generated |
There was a problem hiding this comment.
however, we have the new key's fingerprint in the fingerprint variable?
There was a problem hiding this comment.
file name contains not fingerprint, but key id. is it possible to compute key id from the fingerprint?
There was a problem hiding this comment.
fingerprint is longer than key id. is key id part of fingerprint?
There was a problem hiding this comment.
In this codebase we refer to primary key id (fingerprint) as .id eg key.id which is what I used for the filename. It should be the same as the fingerprint above.
There was a problem hiding this comment.
fingerprint is longer than key id. is key id part of fingerprint?
there may be spacing between groups of 4 characters. Why don't you print the results of the test? They should show both actual and expected values.
|
@tomholub @rrrooommmaaa Fixed it, please recheck. |
test/source/tests/flaky.ts
Outdated
| const files = await myKeyFrame.awaitDownloadTriggeredByClicking('@action-download-prv'); | ||
| const key = await KeyUtil.parse(Object.values(files).pop()!.toString()); | ||
| const downloadedFiles = await myKeyFrame.awaitDownloadTriggeredByClicking('@action-download-prv'); | ||
| // Key ID is last 16 characters of the fingerprint |
There was a problem hiding this comment.
This is actually named longid and it is calculated this way for OpenPGP keys only. For S/MIME keys we use another approach that helps identify the key from the message data. Note that it may be too long and I filed this issue #3937 previously
This PR adds exact file names when using
awaitDownloadTriggeredByClicking()in testsclose #4387
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):