-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
These two tests can be searched on browser extension test suite by name:
do not auto-refresh key if older version of the same key available on attesterauto-refresh expired key if newer version of the same key available
The iOS test will be similar, except instead of manual key import, all keys will be imported from attester (iOS doesn't support manually importing public keys into the app).
Setup: add two more public keys in attesterPublicKeySamples:
keyOlderVersion:
-----BEGIN PGP PUBLIC KEY BLOCK-----
xjMEYd8pKhYJKwYBBAHaRw8BAQdAXQ9bBzlYPwy3mQD5MIQSkuOyEomESHHo
AAiUi0enB77NKFVwZGF0aW5nIGtleSA8dXBkYXRpbmcua2V5QGV4YW1wbGUu
dGVzdD7CeAQQFgoAIAUCYd8pKgYLCQcIAwIEFQgKAgQWAgEAAhkBAhsDAh4B
AAoJEMfJkMGi6njd9HUA/0ZdZaaOFy0hM+GpEnzK+A/G3bLe9Kulh4jT8+4j
JqcKAP0V+pga+B1v98aeF8cRlgQPEyWtYUqZLcDLBQ6r3BEfDM44BGHfKSoS
CisGAQQBl1UBBQEBB0BPkVSyVsZ+vsF4e4NbVsq/YNjqL0JQI+t6OHc5YxJS
SgMBCAfCYQQYFggACQUCYd8pKgIbDAAKCRDHyZDBoup43Y+gAQDSVD/EDqCE
dSL33ptMlhwRCKHGiKcVmKwucxYkk6apFQEA018565fZcvtb339L2s/IIxLs
4621FX8Sy6kpR7mAzQo=
=3UnZ
-----END PGP PUBLIC KEY BLOCK-----
keyNewerVersion:
-----BEGIN PGP PUBLIC KEY BLOCK-----
xjMEYd8pKhYJKwYBBAHaRw8BAQdAXQ9bBzlYPwy3mQD5MIQSkuOyEomESHHo
AAiUi0enB77NKFVwZGF0aW5nIGtleSA8dXBkYXRpbmcua2V5QGV4YW1wbGUu
dGVzdD7CeAQQFgoAIAUCYd8pKgYLCQcIAwIEFQgKAgQWAgEAAhkBAhsDAh4B
AAoJEMfJkMGi6njd9HUA/0ZdZaaOFy0hM+GpEnzK+A/G3bLe9Kulh4jT8+4j
JqcKAP0V+pga+B1v98aeF8cRlgQPEyWtYUqZLcDLBQ6r3BEfDM44BGHfKSoS
CisGAQQBl1UBBQEBB0BPkVSyVsZ+vsF4e4NbVsq/YNjqL0JQI+t6OHc5YxJS
SgMBCAfCYQQYFggACQUCYd8pKgIbDAAKCRDHyZDBoup43Y+gAQDSVD/EDqCE
dSL33ptMlhwRCKHGiKcVmKwucxYkk6apFQEA018565fZcvtb339L2s/IIxLs
4621FX8Sy6kpR7mAzQrOOARh3yuYEgorBgEEAZdVAQUBAQdAglzBCJCRj29J
THYvVGaNESiiVKmyrTEnXonGUS58TwMDAQgHwmEEGBYIAAkFAmHfK5gCGwwA
CgkQx8mQwaLqeN3PWwD9ErvC+ufnX0O2AmZDz67QfFH6tA1t1/wUEHgzBXEe
gc8BAMaYm3AlSGbX1rJYgUtCWukkLuURdECIzerG2UuP87ID
=dQen
-----END PGP PUBLIC KEY BLOCK-----
Both can be written as single test called app updates older public keys to newer but not vice versa as follows:
stage 1
- serve
keyOlderVersionon attester mock for emailupdating.key@example.test - compose new email, enter
updating.key@example.test, wait for it to load - go to Settings -> Contacts ->
updating.key@example.test-> public keys (tap the first one)
- Check the date of the "signature" - expect that exact string.
- check "last fetched" and remember it to compare in below steps
- check fingerprints - there should be exactly two of them - expect exactly these two
stage 2
- change attester mock settings to serve
keyNewerVersionforupdating.key@example.test - compose new email, enter
updating.key@example.test, wait for it to load - go to Settings -> Contacts ->
updating.key@example.test-> public keys (tap the first one)
- Check the date of the "signature" - this should now be different, more recent time than in stage 1. Expect this exact (different then before) string in the test
- check "last fetched" and confirm that it's a more recent time than stage 1
- check fingerprints - there should be exactly three of them - expect exactly these three at this stage 2
stage 3
- change attester mock settings to serve
keyOlderVersionforupdating.key@example.testagain - compose new email, enter
updating.key@example.test, wait for it to load - go to Settings -> Contacts ->
updating.key@example.test-> public keys (tap the first one)
- Check the date of the "signature" - this should remain the same as stage 2
- check "last fetched" and confirm that it's a more recent time, even more recent than stage 2
- check fingerprints - there should be exactly three of them - expect exactly these three at this step
stage 4:
- delete the public key by tapping the trash icon on that screen
- compose new email, enter
updating.key@example.test, wait for it to load - go to Settings -> Contacts ->
updating.key@example.test-> public keys (tap the first one)
- Check the date of the "signature" - expect exactly the same as in stage 1
- check "last fetched" - the date/time should be later than all previous stages
- check fingerprints - expect exactly the same as stage 1
Reactions are currently unavailable