aboutsummaryrefslogtreecommitdiff
path: root/test/spec
diff options
context:
space:
mode:
Diffstat (limited to 'test/spec')
-rw-r--r--test/spec/LibreJSSpec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/spec/LibreJSSpec.js b/test/spec/LibreJSSpec.js
index aa5c167..1bb47ab 100644
--- a/test/spec/LibreJSSpec.js
+++ b/test/spec/LibreJSSpec.js
@@ -296,6 +296,22 @@ describe('LibreJS\' components', () => {
done();
}, 100);
});
+ it('should display the correct contact info in the contact finder iframe', async (done) => {
+ await browser.runtime.connect({ name: "port-from-cs" }).postMessage({ invoke_contact_finder: 1 });
+ // Direct await / async does not work as executeScript does not wait
+ // for the listener
+ setTimeout(async () => {
+ const [frameBody] = await browser.tabs.executeScript(tab.id, {
+ code: 'document.getElementById("_LibreJS_frame").contentWindow.document.body.innerHTML'
+ })
+ console.log(frameBody);
+ expect(frameBody).not.toContain('About Us');
+ expect(frameBody).toContain('Contact Us');
+ expect(frameBody).toContain('Website Feedback');
+ expect(frameBody).toContain('lib@re.js');
+ done();
+ }, 200);
+ });
});
afterAll(async () => {