From d2a00751ef259712e36df5fe799ab93daf3c66f3 Mon Sep 17 00:00:00 2001 From: Zach Bloomquist Date: Tue, 24 Sep 2019 11:49:07 -0400 Subject: [PATCH] fix tests for electron downgrade --- packages/server/__snapshots__/8_reporters_spec.coffee.js | 1 + packages/server/test/integration/cypress_spec.coffee | 6 +++--- packages/server/test/unit/browsers/electron_spec.coffee | 4 +--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/server/__snapshots__/8_reporters_spec.coffee.js b/packages/server/__snapshots__/8_reporters_spec.coffee.js index 8738b651edca..65b84dfe8b43 100644 --- a/packages/server/__snapshots__/8_reporters_spec.coffee.js +++ b/packages/server/__snapshots__/8_reporters_spec.coffee.js @@ -697,6 +697,7 @@ Error: this reporter threw an error at stack trace line at stack trace line at stack trace line + at stack trace line Learn more at https://on.cypress.io/reporters diff --git a/packages/server/test/integration/cypress_spec.coffee b/packages/server/test/integration/cypress_spec.coffee index 5c4dcd05c66d..a9572d6a58df 100644 --- a/packages/server/test/integration/cypress_spec.coffee +++ b/packages/server/test/integration/cypress_spec.coffee @@ -774,12 +774,12 @@ describe "lib/cypress", -> debugger: { on: sinon.stub() attach: sinon.stub() - sendCommand: sinon.stub().resolves() + sendCommand: sinon.stub().callsArg(2) } setUserAgent: sinon.stub() session: { - clearCache: sinon.stub().resolves() - setProxy: sinon.stub().resolves() + clearCache: sinon.stub().yieldsAsync() + setProxy: sinon.stub().yieldsAsync() setUserAgent: sinon.stub() } } diff --git a/packages/server/test/unit/browsers/electron_spec.coffee b/packages/server/test/unit/browsers/electron_spec.coffee index 551d7228e8f9..9b1b0492239e 100644 --- a/packages/server/test/unit/browsers/electron_spec.coffee +++ b/packages/server/test/unit/browsers/electron_spec.coffee @@ -348,7 +348,7 @@ describe "lib/browsers/electron", -> it "sets proxy rules for webContents", -> webContents = { session: { - setProxy: sinon.stub().resolves() + setProxy: sinon.stub().callsArg(1) } } @@ -366,8 +366,6 @@ describe "lib/browsers/electron", -> @sendCommand.throws() .withArgs('Browser.getVersion').resolves() - electron._attachDebugger(@win.webContents) - @onRequest = electron._getAutomation(@win).onRequest describe "get:cookies", ->