mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 19:23:52 +00:00
[PM-22099] expose default collection in clients collection service (#15122)
* Add types * rename types * fix types * fix model and tests
This commit is contained in:
@@ -2,7 +2,7 @@ import { makeSymmetricCryptoKey, mockEnc } from "@bitwarden/common/spec";
|
||||
import { CollectionId, OrganizationId } from "@bitwarden/common/types/guid";
|
||||
import { OrgKey } from "@bitwarden/common/types/key";
|
||||
|
||||
import { Collection } from "./collection";
|
||||
import { Collection, CollectionTypes } from "./collection";
|
||||
import { CollectionData } from "./collection.data";
|
||||
|
||||
describe("Collection", () => {
|
||||
@@ -17,6 +17,7 @@ describe("Collection", () => {
|
||||
readOnly: true,
|
||||
manage: true,
|
||||
hidePasswords: true,
|
||||
type: CollectionTypes.DefaultUserCollection,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -32,6 +33,7 @@ describe("Collection", () => {
|
||||
organizationId: null,
|
||||
readOnly: null,
|
||||
manage: null,
|
||||
type: null,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,6 +48,7 @@ describe("Collection", () => {
|
||||
readOnly: true,
|
||||
manage: true,
|
||||
hidePasswords: true,
|
||||
type: CollectionTypes.DefaultUserCollection,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -58,6 +61,7 @@ describe("Collection", () => {
|
||||
collection.readOnly = false;
|
||||
collection.hidePasswords = false;
|
||||
collection.manage = true;
|
||||
collection.type = CollectionTypes.DefaultUserCollection;
|
||||
|
||||
const key = makeSymmetricCryptoKey<OrgKey>();
|
||||
|
||||
@@ -72,6 +76,7 @@ describe("Collection", () => {
|
||||
readOnly: false,
|
||||
manage: true,
|
||||
assigned: true,
|
||||
type: CollectionTypes.DefaultUserCollection,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user