diff options
Diffstat (limited to 'test/spec')
-rw-r--r-- | test/spec/LibreJSSpec.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/spec/LibreJSSpec.js b/test/spec/LibreJSSpec.js index 5632e9f..501efa7 100644 --- a/test/spec/LibreJSSpec.js +++ b/test/spec/LibreJSSpec.js @@ -303,7 +303,7 @@ describe('LibreJS\' components', () => { setTimeout(async () => { const [frameBody] = await browser.tabs.executeScript(tab.id, { code: 'document.getElementById("_LibreJS_frame").contentWindow.document.body.innerHTML' - }) + }); expect(frameBody).not.toContain('About Us'); expect(frameBody).toContain('Contact Us'); expect(frameBody).toContain('Website Feedback'); @@ -313,6 +313,19 @@ describe('LibreJS\' components', () => { }); }); + describe('The prefs', () => { + it('should have the defaults', async () => { + const defaults = await browser.storage.local.get(['pref_subject', 'pref_body']); + expect(defaults).toEqual({ + pref_subject: 'Issues with Javascript on your website', + pref_body: `Please consider using a free license for the Javascript on your website. + +[Message generated by LibreJS. See https://www.gnu.org/software/librejs/ for more information] +` + }); + }); + }); + afterAll(async () => { await browser.tabs.remove(tab.id); browser.tabs.update((await browser.tabs.getCurrent()).id, { active: true }); |