aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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 9e96af5..aa5c167 100644
--- a/test/spec/LibreJSSpec.js
+++ b/test/spec/LibreJSSpec.js
@@ -282,6 +282,22 @@ describe('LibreJS\' components', () => {
expect(scriptInfo).toBeNull();
});
});
+
+ describe('Contact finder', () => {
+ it('should display 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 frame = await browser.tabs.executeScript(tab.id, {
+ code: 'document.getElementById("_LibreJS_frame").outerHTML'
+ })
+ expect(frame).toBeTruthy();
+ done();
+ }, 100);
+ });
+ });
+
afterAll(async () => {
await browser.tabs.remove(tab.id);
browser.tabs.update((await browser.tabs.getCurrent()).id, { active: true });