mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-28 06:07:53 +03:00
chore(tests): move ignoreHTTPSErrors interception test to featutes folder (#252)
This commit is contained in:
parent
df95b9ddb4
commit
a8f9c627f1
@ -19,7 +19,7 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const utils = require('../utils');
|
const utils = require('../utils');
|
||||||
|
|
||||||
module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROME, WEBKIT}) {
|
||||||
const {describe, xdescribe, fdescribe} = testRunner;
|
const {describe, xdescribe, fdescribe} = testRunner;
|
||||||
const {it, fit, xit} = testRunner;
|
const {it, fit, xit} = testRunner;
|
||||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||||
@ -660,6 +660,21 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
|||||||
expect(nonCachedRequest.headers['if-modified-since']).toBe(undefined);
|
expect(nonCachedRequest.headers['if-modified-since']).toBe(undefined);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('ignoreHTTPSErrors', function() {
|
||||||
|
it('should work with request interception', async({httpsServer}) => {
|
||||||
|
const browser = await playwright.launch({...defaultBrowserOptions, ignoreHTTPSErrors: true});
|
||||||
|
const context = await browser.newContext();
|
||||||
|
const page = await context.newPage();
|
||||||
|
|
||||||
|
await page.interception.enable();
|
||||||
|
page.on('request', request => page.interception.continue(request));
|
||||||
|
const response = await page.goto(httpsServer.EMPTY_PAGE);
|
||||||
|
expect(response.status()).toBe(200);
|
||||||
|
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,12 +43,6 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, p
|
|||||||
expect(error).toBe(null);
|
expect(error).toBe(null);
|
||||||
expect(response.ok()).toBe(true);
|
expect(response.ok()).toBe(true);
|
||||||
});
|
});
|
||||||
it.skip(WEBKIT)('should work with request interception', async({page, server, httpsServer}) => {
|
|
||||||
await page.interception.enable();
|
|
||||||
page.on('request', request => page.interception.continue(request));
|
|
||||||
const response = await page.goto(httpsServer.EMPTY_PAGE);
|
|
||||||
expect(response.status()).toBe(200);
|
|
||||||
});
|
|
||||||
it.skip(WEBKIT)('should work with mixed content', async({page, server, httpsServer}) => {
|
it.skip(WEBKIT)('should work with mixed content', async({page, server, httpsServer}) => {
|
||||||
httpsServer.setRoute('/mixedcontent.html', (req, res) => {
|
httpsServer.setRoute('/mixedcontent.html', (req, res) => {
|
||||||
res.end(`<iframe src=${server.EMPTY_PAGE}></iframe>`);
|
res.end(`<iframe src=${server.EMPTY_PAGE}></iframe>`);
|
||||||
|
Loading…
Reference in New Issue
Block a user