chore(tests): move setCacheEnabled interception test to features (#253)

This commit is contained in:
Yury Semikhatsky 2019-12-14 12:54:52 -07:00 committed by Pavel Feldman
parent 2c648fcb33
commit 394c74fa5f
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() {