mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-28 07:49:41 +01:00
Fix test and storybook failures
This commit is contained in:
parent
8b21ad25aa
commit
e99d221dba
@ -1275,6 +1275,7 @@ export default class MainBackground {
|
|||||||
this.cipherAuthorizationService = new DefaultCipherAuthorizationService(
|
this.cipherAuthorizationService = new DefaultCipherAuthorizationService(
|
||||||
this.collectionService,
|
this.collectionService,
|
||||||
this.organizationService,
|
this.organizationService,
|
||||||
|
this.accountService,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import { CollectionsComponent as BaseCollectionsComponent } from "@bitwarden/ang
|
|||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { ToastService } from "@bitwarden/components";
|
import { ToastService } from "@bitwarden/components";
|
||||||
@ -27,7 +26,6 @@ export class CollectionsComponent extends BaseCollectionsComponent implements On
|
|||||||
organizationService: OrganizationService,
|
organizationService: OrganizationService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private location: Location,
|
private location: Location,
|
||||||
logService: LogService,
|
|
||||||
accountService: AccountService,
|
accountService: AccountService,
|
||||||
toastService: ToastService,
|
toastService: ToastService,
|
||||||
) {
|
) {
|
||||||
@ -37,7 +35,6 @@ export class CollectionsComponent extends BaseCollectionsComponent implements On
|
|||||||
i18nService,
|
i18nService,
|
||||||
cipherService,
|
cipherService,
|
||||||
organizationService,
|
organizationService,
|
||||||
logService,
|
|
||||||
accountService,
|
accountService,
|
||||||
toastService,
|
toastService,
|
||||||
);
|
);
|
||||||
|
@ -815,6 +815,7 @@ export class ServiceContainer {
|
|||||||
this.cipherAuthorizationService = new DefaultCipherAuthorizationService(
|
this.cipherAuthorizationService = new DefaultCipherAuthorizationService(
|
||||||
this.collectionService,
|
this.collectionService,
|
||||||
this.organizationService,
|
this.organizationService,
|
||||||
|
this.accountService,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,10 +106,12 @@ describe("DefaultCollectionService", () => {
|
|||||||
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
||||||
expect.objectContaining(new EncString(collection1.name)),
|
expect.objectContaining(new EncString(collection1.name)),
|
||||||
orgKey1,
|
orgKey1,
|
||||||
|
expect.any(String),
|
||||||
);
|
);
|
||||||
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
||||||
expect.objectContaining(new EncString(collection2.name)),
|
expect.objectContaining(new EncString(collection2.name)),
|
||||||
orgKey2,
|
orgKey2,
|
||||||
|
expect.any(String),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga
|
|||||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { getUserId } from "@bitwarden/common/auth/services/account.service";
|
import { getUserId } from "@bitwarden/common/auth/services/account.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
@ -36,7 +35,6 @@ export class CollectionsComponent implements OnInit {
|
|||||||
protected i18nService: I18nService,
|
protected i18nService: I18nService,
|
||||||
protected cipherService: CipherService,
|
protected cipherService: CipherService,
|
||||||
protected organizationService: OrganizationService,
|
protected organizationService: OrganizationService,
|
||||||
private logService: LogService,
|
|
||||||
private accountService: AccountService,
|
private accountService: AccountService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
) {}
|
) {}
|
||||||
|
@ -22,7 +22,7 @@ describe("custom rxjs operators", () => {
|
|||||||
|
|
||||||
const output = await firstValueFrom(getById(2)(of(input)));
|
const output = await firstValueFrom(getById(2)(of(input)));
|
||||||
|
|
||||||
expect(output).toEqual([{ id: 1, data: "one" }]);
|
expect(output).toEqual({ id: 2, data: "two" });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user