Fix tests

This commit is contained in:
Lesley Norton 2021-10-20 14:41:58 -05:00
parent 1c0f2d8c5c
commit 91b0b4519e
No known key found for this signature in database
GPG key ID: E98FBAEE3F13956E
2 changed files with 3 additions and 8 deletions

View file

@ -1047,8 +1047,6 @@ Logic.registerPanel(MANAGE_CONTAINERS_PICKER, {
// This method is called when the panel is shown. // This method is called when the panel is shown.
async prepare() { async prepare() {
await browser.runtime.sendMessage({ method: "getMozillaVpnStatus" });
Logic.listenToPickerBackButton(); Logic.listenToPickerBackButton();
const closeContEl = document.querySelector("#close-container-picker-panel"); const closeContEl = document.querySelector("#close-container-picker-panel");
if (!this._listenerSet) { if (!this._listenerSet) {
@ -1273,7 +1271,6 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, {
// This method is called when the panel is shown. // This method is called when the panel is shown.
async prepare() { async prepare() {
const identities = Logic.identities(); const identities = Logic.identities();
const proxies = await MozillaVPN.getProxies(identities);
Logic.listenToPickerBackButton(); Logic.listenToPickerBackButton();
document.getElementById("picker-title").textContent = browser.i18n.getMessage("alwaysOpenIn"); document.getElementById("picker-title").textContent = browser.i18n.getMessage("alwaysOpenIn");
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
@ -1281,7 +1278,6 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, {
document.getElementById("new-container-div").innerHTML = ""; document.getElementById("new-container-div").innerHTML = "";
for (const identity of identities) { for (const identity of identities) {
const flag = await MozillaVPN.getFlag(proxies[identity.cookieStoreId]);
const tr = document.createElement("tr"); const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav"); tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tr.setAttribute("tabindex", "0"); tr.setAttribute("tabindex", "0");
@ -1295,8 +1291,6 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, {
</div> </div>
</div> </div>
<span class="menu-text">${identity.name}</span> <span class="menu-text">${identity.name}</span>
<img alt="${flag.imgAlt}" class="always-open-in-flag flag-img ${flag.elemClasses}" src="/img/flags/${flag.imgCode}.png"/>
`; `;
fragment.appendChild(tr); fragment.appendChild(tr);

View file

@ -88,7 +88,8 @@ const initializeWithTab = async (details = {
"onboarding-stage": 7, "onboarding-stage": 7,
"achievements": [], "achievements": [],
"syncEnabled": true, "syncEnabled": true,
"replaceTabEnabled": false "replaceTabEnabled": false,
"mozillaVpnInstalled": false,
}); });
window.browser.storage.local.set.resetHistory(); window.browser.storage.local.set.resetHistory();
window.browser.storage.sync.clear(); window.browser.storage.sync.clear();
@ -109,4 +110,4 @@ module.exports = {
sinon, sinon,
expect, expect,
nextTick, nextTick,
}; };