mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(tests): move setCacheEnabled interception test to features (#253)
This commit is contained in:
parent
2c648fcb33
commit
394c74fa5f
@ -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);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user