diff options
Diffstat (limited to 'browser/components/newtab/test/unit/asrouter/schemas')
-rw-r--r-- | browser/components/newtab/test/unit/asrouter/schemas/panel/cfr-fxa-bookmark.schema.test.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/browser/components/newtab/test/unit/asrouter/schemas/panel/cfr-fxa-bookmark.schema.test.js b/browser/components/newtab/test/unit/asrouter/schemas/panel/cfr-fxa-bookmark.schema.test.js new file mode 100644 index 0000000000..915a8c05c4 --- /dev/null +++ b/browser/components/newtab/test/unit/asrouter/schemas/panel/cfr-fxa-bookmark.schema.test.js @@ -0,0 +1,28 @@ +import schema from "content-src/asrouter/schemas/panel/cfr-fxa-bookmark.schema.json"; + +const DEFAULT_CONTENT = { + title: "Sync your bookmarks everywhere", + text: "Great find! Now don't be left without this bookmark.", + cta: "Sync bookmarks now", + info_icon: { + tooltiptext: "Learn more", + }, +}; + +const L10N_CONTENT = { + title: { string_id: "cfr-bookmark-title" }, + text: { string_id: "cfr-bookmark-body" }, + cta: { string_id: "cfr-bookmark-link-text" }, + info_icon: { + tooltiptext: { string_id: "cfr-bookmark-tooltip-text" }, + }, +}; + +describe("CFR FxA Message Schema", () => { + it("should validate DEFAULT_CONTENT", () => { + assert.jsonSchema(DEFAULT_CONTENT, schema); + }); + it("should validate L10N_CONTENT", () => { + assert.jsonSchema(L10N_CONTENT, schema); + }); +}); |