-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PM-12049] Remove usage of ActiveUserState from folder service (#11880)
* Migrated folder service from using active user state to single user state Added extra test cases for encrypted folder and decrypted folders Updated derived state to use decrypt with key * Update callers in the web * Update callers in the browser * Update callers in libs * Update callers in cli * Fixed test * Fixed folder state test * Fixed test * removed duplicate activeUserId * Added takewhile operator to only make calls when userId is present * Simplified to accept a single user id instead of an observable * Required userid to be passed from notification service * [PM-15635] Folders not working on desktop (#12333) * Added folders memory state definition * added decrypted folders state * Refactored service to remove derived state * removed combinedstate and added clear decrypted folders to methods * Fixed test * Fixed issue with editing folder on the desktop app * Fixed test * Changed state name * fixed ts strict issue * fixed ts strict issue * fixed ts strict issue * removed unnecessasry null encrypteed folder check * Handle null folderdata * [PM-16197] "Items with No Folder" shows as a folder to edit name and delete (#12470) * Force redcryption anytime encryption state changes * Fixed text file * revert changes * create new object with nofolder instead of modifying exisiting object * Fixed failing test * switched to use memory-large-object * Fixed ts sctrict issue --------- Co-authored-by: Matt Bishop <[email protected]> Co-authored-by: bnagawiecki <[email protected]>
- Loading branch information
1 parent
b966019
commit 10c8a21
Showing
49 changed files
with
592 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,10 +60,18 @@ describe("NotificationBackground", () => { | |
const configService = mock<ConfigService>(); | ||
const accountService = mock<AccountService>(); | ||
|
||
const activeAccountSubject = new BehaviorSubject<{ id: UserId } & AccountInfo>({ | ||
id: "testId" as UserId, | ||
email: "[email protected]", | ||
emailVerified: true, | ||
name: "Test User", | ||
}); | ||
|
||
beforeEach(() => { | ||
activeAccountStatusMock$ = new BehaviorSubject(AuthenticationStatus.Locked); | ||
authService = mock<AuthService>(); | ||
authService.activeAccountStatus$ = activeAccountStatusMock$; | ||
accountService.activeAccount$ = activeAccountSubject; | ||
notificationBackground = new NotificationBackground( | ||
autofillService, | ||
cipherService, | ||
|
@@ -683,13 +691,6 @@ describe("NotificationBackground", () => { | |
}); | ||
|
||
describe("saveOrUpdateCredentials", () => { | ||
const activeAccountSubject = new BehaviorSubject<{ id: UserId } & AccountInfo>({ | ||
id: "testId" as UserId, | ||
email: "[email protected]", | ||
emailVerified: true, | ||
name: "Test User", | ||
}); | ||
|
||
let getDecryptedCipherByIdSpy: jest.SpyInstance; | ||
let getAllDecryptedForUrlSpy: jest.SpyInstance; | ||
let updatePasswordSpy: jest.SpyInstance; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.