mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
refactor hideIndividualFields to be more generic and hide favorite button
This commit is contained in:
@@ -49,16 +49,16 @@ describe("AdminConsoleCipherFormConfigService", () => {
|
||||
});
|
||||
|
||||
describe("buildConfig", () => {
|
||||
it("sets folder attributes", async () => {
|
||||
it("sets individual attributes", async () => {
|
||||
adminConsoleConfigService = TestBed.inject(AdminConsoleCipherFormConfigService);
|
||||
|
||||
const { folders, hideFolderSelection } = await adminConsoleConfigService.buildConfig(
|
||||
const { folders, hideIndividualVaultFields } = await adminConsoleConfigService.buildConfig(
|
||||
"add",
|
||||
cipherId,
|
||||
);
|
||||
|
||||
expect(folders).toEqual([]);
|
||||
expect(hideFolderSelection).toBe(true);
|
||||
expect(hideIndividualVaultFields).toBe(true);
|
||||
});
|
||||
|
||||
it("sets mode based on passed mode", async () => {
|
||||
|
||||
@@ -79,7 +79,7 @@ export class AdminConsoleCipherFormConfigService implements CipherFormConfigServ
|
||||
collections,
|
||||
organizations: [organization], // only a single org is in context at a time
|
||||
folders: [], // folders not applicable in the admin console
|
||||
hideFolderSelection: true,
|
||||
hideIndividualVaultFields: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user