fixed mocha tests

This commit is contained in:
Kendall Werts
2020-02-24 16:14:17 -06:00
parent db46e71516
commit 694b0f7b47
9 changed files with 81 additions and 66 deletions
+7 -4
View File
@@ -4,11 +4,12 @@ describe("#940", function () {
describe("when other onBeforeRequestHandlers are faster and redirect with the same requestId", function () {
it("should not open two confirm pages", async function () {
const webExtension = await initializeWithTab({
cookieStoreId: "firefox-container-1",
cookieStoreId: "firefox-container-4",
url: "http://example.com"
});
await webExtension.popup.helper.clickElementById("container-page-assigned");
await webExtension.popup.helper.clickElementById("always-open-in");
await webExtension.popup.helper.clickElementByQuerySelectorAll("#picker-identities-list > .menu-item");
const responses = {};
await webExtension.background.browser.tabs._create({
@@ -36,10 +37,12 @@ describe("#940", function () {
beforeEach(async function () {
this.webExt = await initializeWithTab({
cookieStoreId: "firefox-container-1",
cookieStoreId: "firefox-container-4",
url: "https://www.youtube.com"
});
await this.webExt.popup.helper.clickElementById("container-page-assigned");
await this.webExt.popup.helper.clickElementById("always-open-in");
await this.webExt.popup.helper.clickElementByQuerySelectorAll("#picker-identities-list > .menu-item");
global.clock = sinon.useFakeTimers();
this.redirectedRequest = async (options = {}) => {