1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

[PM-6818] legacy generator service adapter (#8582)

* introduce legacy generators
* introduce generator navigation service
* Introduce default options. These accept a userId so that they can be policy-defined
* replace `GeneratorOptions` with backwards compatible `GeneratorNavigation`
This commit is contained in:
✨ Audrey ✨
2024-04-03 13:48:33 -04:00
committed by GitHub
parent ff3ff89e20
commit b579bc8f96
64 changed files with 2759 additions and 622 deletions

View File

@@ -10,9 +10,18 @@ import {
FASTMAIL_FORWARDER,
DUCK_DUCK_GO_FORWARDER,
ADDY_IO_FORWARDER,
GENERATOR_SETTINGS,
} from "./key-definitions";
describe("Key definitions", () => {
describe("GENERATOR_SETTINGS", () => {
it("should pass through deserialization", () => {
const value = {};
const result = GENERATOR_SETTINGS.deserializer(value);
expect(result).toBe(value);
});
});
describe("PASSWORD_SETTINGS", () => {
it("should pass through deserialization", () => {
const value = {};
@@ -31,7 +40,7 @@ describe("Key definitions", () => {
describe("EFF_USERNAME_SETTINGS", () => {
it("should pass through deserialization", () => {
const value = {};
const value = { website: null as string };
const result = EFF_USERNAME_SETTINGS.deserializer(value);
expect(result).toBe(value);
});
@@ -39,7 +48,7 @@ describe("Key definitions", () => {
describe("CATCHALL_SETTINGS", () => {
it("should pass through deserialization", () => {
const value = {};
const value = { website: null as string };
const result = CATCHALL_SETTINGS.deserializer(value);
expect(result).toBe(value);
});
@@ -47,7 +56,7 @@ describe("Key definitions", () => {
describe("SUBADDRESS_SETTINGS", () => {
it("should pass through deserialization", () => {
const value = {};
const value = { website: null as string };
const result = SUBADDRESS_SETTINGS.deserializer(value);
expect(result).toBe(value);
});