move baseURL into context
This commit is contained in:
parent
db641b83be
commit
d0eb805655
|
|
@ -30,12 +30,10 @@ test.slow();
|
||||||
|
|
||||||
let traceFile: string;
|
let traceFile: string;
|
||||||
|
|
||||||
test.use({
|
|
||||||
baseURL: 'https://example.com',
|
|
||||||
});
|
|
||||||
|
|
||||||
test.beforeAll(async function recordTrace({ browser, browserName, browserType, server }, workerInfo) {
|
test.beforeAll(async function recordTrace({ browser, browserName, browserType, server }, workerInfo) {
|
||||||
const context = await browser.newContext();
|
const context = await browser.newContext({
|
||||||
|
baseURL: 'https://example.com',
|
||||||
|
});
|
||||||
await context.tracing.start({ name: 'test', screenshots: true, snapshots: true, sources: true });
|
await context.tracing.start({ name: 'test', screenshots: true, snapshots: true, sources: true });
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
await page.goto(`data:text/html,<!DOCTYPE html><html>Hello world</html>`);
|
await page.goto(`data:text/html,<!DOCTYPE html><html>Hello world</html>`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue