diff --git a/CHANGELOG.md b/CHANGELOG.md index c17a9489..0ec8eb0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -0.7.6 / ####-##-## +0.7.6 / 2018-06-13 ================== + * Fixed request interceptor unhandled error 0.7.5 / 2018-06-12 ================== diff --git a/lib/modules/browser_requests.js b/lib/modules/browser_requests.js index 93d24af2..9f6a2ab3 100644 --- a/lib/modules/browser_requests.js +++ b/lib/modules/browser_requests.js @@ -47,7 +47,6 @@ module.exports = class BrowserRequests extends BrowserModule { _beforeClose() { this.clearMocks(); this.clearRequests(); - return this._startRequestInterceptor(); } _startRequestInterceptor() { @@ -58,7 +57,7 @@ module.exports = class BrowserRequests extends BrowserModule { const mockedResponse = this._requestMocker.getMockedResponse(request); if(mockedResponse) { return request.respond(mockedResponse); - } else{ + } else { return request.continue(); } }); diff --git a/tests/browser_components/request_mocker.test.js b/tests/browser_components/request_mocker.test.js index 3e16fc52..ea50ecae 100644 --- a/tests/browser_components/request_mocker.test.js +++ b/tests/browser_components/request_mocker.test.js @@ -196,4 +196,9 @@ describe("Requests Mocker", function() { await browser.wait(100); await browser.assert.text("#result", "MOCK"); }); + + it("Interceptor Is Ready After Close", async () => { + await browser.close(); + assert.strictEqual(browser.requests._interceptorReady, true); + }); });