chore(tests): move setCacheEnabled interception test to features

This commit is contained in:
Yury Semikhatsky 2019-12-14 09:37:21 -08:00
parent 927669b890
commit db03b2e57f
2 changed files with 15 additions and 12 deletions

View file

@ -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);
});
});
};
/**

View file

@ -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() {