From 91b0b4519eba42528c848ab524021d5f09e55124 Mon Sep 17 00:00:00 2001 From: Lesley Norton Date: Wed, 20 Oct 2021 14:41:58 -0500 Subject: [PATCH] Fix tests --- src/js/popup.js | 6 ------ test/common.js | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/js/popup.js b/src/js/popup.js index fc0cf5a..ef3667b 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -1047,8 +1047,6 @@ Logic.registerPanel(MANAGE_CONTAINERS_PICKER, { // This method is called when the panel is shown. async prepare() { - await browser.runtime.sendMessage({ method: "getMozillaVpnStatus" }); - Logic.listenToPickerBackButton(); const closeContEl = document.querySelector("#close-container-picker-panel"); if (!this._listenerSet) { @@ -1273,7 +1271,6 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, { // This method is called when the panel is shown. async prepare() { const identities = Logic.identities(); - const proxies = await MozillaVPN.getProxies(identities); Logic.listenToPickerBackButton(); document.getElementById("picker-title").textContent = browser.i18n.getMessage("alwaysOpenIn"); const fragment = document.createDocumentFragment(); @@ -1281,7 +1278,6 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, { document.getElementById("new-container-div").innerHTML = ""; for (const identity of identities) { - const flag = await MozillaVPN.getFlag(proxies[identity.cookieStoreId]); const tr = document.createElement("tr"); tr.classList.add("menu-item", "hover-highlight", "keyboard-nav"); tr.setAttribute("tabindex", "0"); @@ -1295,8 +1291,6 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, { ${identity.name} - ${flag.imgAlt} - `; fragment.appendChild(tr); diff --git a/test/common.js b/test/common.js index 17d684c..085ba9b 100644 --- a/test/common.js +++ b/test/common.js @@ -88,7 +88,8 @@ const initializeWithTab = async (details = { "onboarding-stage": 7, "achievements": [], "syncEnabled": true, - "replaceTabEnabled": false + "replaceTabEnabled": false, + "mozillaVpnInstalled": false, }); window.browser.storage.local.set.resetHistory(); window.browser.storage.sync.clear(); @@ -109,4 +110,4 @@ module.exports = { sinon, expect, nextTick, -}; \ No newline at end of file +};