From 394c74fa5f882ee7387d79ea00c888d1eb6aa361 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sat, 14 Dec 2019 12:54:52 -0700 Subject: [PATCH] chore(tests): move setCacheEnabled interception test to features (#253) --- test/features/interception.spec.js | 15 +++++++++++++++ test/page.spec.js | 12 ------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/test/features/interception.spec.js b/test/features/interception.spec.js index c80b9f45be..5f59e94562 100644 --- a/test/features/interception.spec.js +++ b/test/features/interception.spec.js @@ -645,6 +645,21 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) { expect(requests.get('style.css').isNavigationRequest()).toBe(false); }); }); + + describe('Page.setCacheEnabled', function() { + it('should stay disabled when toggling request interception on/off', async({page, server}) => { + await page.setCacheEnabled(false); + await page.interception.enable(); + await page.interception.disable(); + + await page.goto(server.PREFIX + '/cached/one-style.html'); + const [nonCachedRequest] = await Promise.all([ + server.waitForRequest('/cached/one-style.html'), + page.reload(), + ]); + expect(nonCachedRequest.headers['if-modified-since']).toBe(undefined); + }); + }); }; /** diff --git a/test/page.spec.js b/test/page.spec.js index 4702e86bec..3894d980e0 100644 --- a/test/page.spec.js +++ b/test/page.spec.js @@ -867,18 +867,6 @@ module.exports.addTests = function({testRunner, expect, headless, playwright, FF ]); expect(nonCachedRequest.headers['if-modified-since']).toBe(undefined); }); - it.skip(WEBKIT)('should stay disabled when toggling request interception on/off', async({page, server}) => { - await page.setCacheEnabled(false); - await page.interception.enable(); - await page.interception.disable(); - - await page.goto(server.PREFIX + '/cached/one-style.html'); - const [nonCachedRequest] = await Promise.all([ - server.waitForRequest('/cached/one-style.html'), - page.reload(), - ]); - expect(nonCachedRequest.headers['if-modified-since']).toBe(undefined); - }); }); describe('Page.title', function() {