-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add toast for recovery keys being out of sync #28946
Changes from all commits
3e77b3d
ae623f8
f9e48b4
0057f57
bb507b0
1aace3f
70c084e
7193998
fec324e
44c6bce
075f6dc
895ad88
ba032a7
7909ac9
618557c
c805cd8
7a372f7
b20579d
24c537c
72adfa5
36c7e0e
52076f1
a0d904e
1a0e6dc
0b254e5
6f236bd
82bf2cc
84d11f8
2fe5555
4b365ba
8a9291a
1c00502
d9d7528
dc940f5
521cebf
7af44cc
8bd5d6a
086f28e
0c18708
484b2af
ef76454
7a55d83
9a7f568
33967d4
0a52b7c
cb43672
e5dea48
b7b7a98
f78c27a
bef3165
0a6db75
9243ae1
82ec6ae
1934145
57e9c31
3649b07
5bf0d2d
2c3896c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -329,32 +329,33 @@ describe("DeviceListener", () => { | |
}); | ||
|
||
it("shows verify session toast when account has cross signing", async () => { | ||
mockCrypto!.userHasCrossSigningKeys.mockResolvedValue(true); | ||
mockCrypto!.isCrossSigningReady.mockResolvedValue(true); | ||
await createAndStart(); | ||
|
||
expect(mockCrypto!.getUserDeviceInfo).toHaveBeenCalled(); | ||
expect(SetupEncryptionToast.showToast).toHaveBeenCalledWith( | ||
SetupEncryptionToast.Kind.VERIFY_THIS_SESSION, | ||
); | ||
}); | ||
|
||
it("checks key backup status when when account has cross signing", async () => { | ||
mockCrypto!.getCrossSigningKeyId.mockResolvedValue(null); | ||
mockCrypto!.userHasCrossSigningKeys.mockResolvedValue(true); | ||
await createAndStart(); | ||
|
||
expect(mockCrypto!.getActiveSessionBackupVersion).toHaveBeenCalled(); | ||
}); | ||
Comment on lines
-341
to
-347
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear why this test was testing this... I don't really understand why it would be important that it did this. Maybe in some circumstances it should, but if so shouldn't we be testing to see if it prompts you to set up key backup or whatever w're expecting? |
||
}); | ||
|
||
describe("when user does have a cross signing id on this device", () => { | ||
beforeEach(() => { | ||
mockCrypto!.isCrossSigningReady.mockResolvedValue(true); | ||
mockCrypto!.getCrossSigningKeyId.mockResolvedValue("abc"); | ||
mockCrypto!.getDeviceVerificationStatus.mockResolvedValue( | ||
new DeviceVerificationStatus({ | ||
trustCrossSignedDevices: true, | ||
crossSigningVerified: true, | ||
}), | ||
); | ||
}); | ||
|
||
it("shows set up recovery toast when user has a key backup available", async () => { | ||
// non falsy response | ||
mockCrypto.getKeyBackupInfo.mockResolvedValue({} as unknown as KeyBackupInfo); | ||
mockClient.secretStorage.getDefaultKeyId.mockResolvedValue(null); | ||
|
||
await createAndStart(); | ||
|
||
expect(SetupEncryptionToast.showToast).toHaveBeenCalledWith( | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will users end up in an unsolvable loop if we do this? Any guesses as to what state they are in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't say for sure that they won't, some users do report loops at the moment which would imply the process of setting up encryption doesn't completely start from scratch. At least we will have the state of the variables we use here logged in a rageshake now.