@playwright/test
Advanced tools
Comparing version 1.12.0-next-alpha-jun-5-2021 to 1.12.0-next-alpha-jun-6-2021
@@ -40,3 +40,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.test = void 0; | ||
exports.__baseTest = exports.test = void 0; | ||
const fs = __importStar(require("fs")); | ||
@@ -46,3 +46,4 @@ const folio = __importStar(require("folio")); | ||
exports.test = folio.test.extend({ | ||
browserName: ['chromium', { scope: 'worker' }], | ||
defaultBrowserType: ['chromium', { scope: 'worker' }], | ||
browserName: [({ defaultBrowserType }, use) => use(defaultBrowserType), { scope: 'worker' }], | ||
playwright: [require('../inprocess'), { scope: 'worker' }], | ||
@@ -89,4 +90,4 @@ headless: [undefined, { scope: 'worker' }], | ||
contextOptions: {}, | ||
context: async ({ browserName, browser, screenshot, video, acceptDownloads, bypassCSP, colorScheme, deviceScaleFactor, extraHTTPHeaders, hasTouch, geolocation, httpCredentials, ignoreHTTPSErrors, isMobile, javaScriptEnabled, locale, offline, permissions, proxy, storageState, viewport, timezoneId, userAgent, contextOptions }, use, testInfo) => { | ||
testInfo.snapshotSuffix = browserName + '-' + process.platform; | ||
context: async ({ browser, screenshot, video, acceptDownloads, bypassCSP, colorScheme, deviceScaleFactor, extraHTTPHeaders, hasTouch, geolocation, httpCredentials, ignoreHTTPSErrors, isMobile, javaScriptEnabled, locale, offline, permissions, proxy, storageState, viewport, timezoneId, userAgent, contextOptions }, use, testInfo) => { | ||
testInfo.snapshotSuffix = process.platform; | ||
if (process.env.PWDEBUG) | ||
@@ -166,2 +167,3 @@ testInfo.setTimeout(0); | ||
exports.default = exports.test; | ||
exports.__baseTest = folio.test; | ||
//# sourceMappingURL=fixtures.js.map |
@@ -104,14 +104,12 @@ "use strict"; | ||
async function runTests(Runner, args, opts) { | ||
if (opts.browser) { | ||
const browserOpt = opts.browser.toLowerCase(); | ||
if (!['all', 'chromium', 'firefox', 'webkit'].includes(browserOpt)) | ||
throw new Error(`Unsupported browser "${opts.browser}", must be one of "all", "chromium", "firefox" or "webkit"`); | ||
const browserNames = browserOpt === 'all' ? ['chromium', 'firefox', 'webkit'] : [browserOpt]; | ||
defaultConfig.projects = browserNames.map(browserName => { | ||
return { | ||
name: browserName, | ||
use: { browserName }, | ||
}; | ||
}); | ||
} | ||
const browserOpt = opts.browser ? opts.browser.toLowerCase() : 'chromium'; | ||
if (!['all', 'chromium', 'firefox', 'webkit'].includes(browserOpt)) | ||
throw new Error(`Unsupported browser "${opts.browser}", must be one of "all", "chromium", "firefox" or "webkit"`); | ||
const browserNames = browserOpt === 'all' ? ['chromium', 'firefox', 'webkit'] : [browserOpt]; | ||
defaultConfig.projects = browserNames.map(browserName => { | ||
return { | ||
name: browserName, | ||
use: { browserName }, | ||
}; | ||
}); | ||
const overrides = overridesFromOptions(opts); | ||
@@ -118,0 +116,0 @@ if (opts.headed) |
@@ -135,2 +135,3 @@ "use strict"; | ||
recorderApp.once('close', () => { | ||
this._debugger.resume(false); | ||
this._recorderApp = null; | ||
@@ -218,2 +219,3 @@ }); | ||
_pausedStateChanged() { | ||
var _a; | ||
// If we are called upon page.pause, we don't have metadatas, populate them. | ||
@@ -224,3 +226,3 @@ for (const { metadata, sdkObject } of this._debugger.pausedDetails()) { | ||
} | ||
this._recorderApp.setPaused(this._debugger.isPaused()); | ||
(_a = this._recorderApp) === null || _a === void 0 ? void 0 : _a.setPaused(this._debugger.isPaused()); | ||
this._updateUserSources(); | ||
@@ -227,0 +229,0 @@ this.updateCallLog([...this._currentCallsMetadata.keys()]); |
@@ -46,2 +46,3 @@ "use strict"; | ||
'playwright-webkit', | ||
path_1.default.join('@playwright', 'test'), | ||
].map(packageName => path_1.default.sep + path_1.default.join(packageName, 'lib')); | ||
@@ -48,0 +49,0 @@ function captureStackTrace() { |
{ | ||
"name": "@playwright/test", | ||
"version": "1.12.0-next-alpha-jun-5-2021", | ||
"version": "1.12.0-next-alpha-jun-6-2021", | ||
"description": "Playwright Test Runner", | ||
@@ -43,4 +43,4 @@ "repository": "github:Microsoft/playwright", | ||
"yazl": "^2.5.1", | ||
"folio": "=0.4.0-alpha27" | ||
"folio": "=0.4.0-alpha28" | ||
} | ||
} |
@@ -75,2 +75,3 @@ /** | ||
browserName: BrowserName; | ||
defaultBrowserType: BrowserName; | ||
@@ -77,0 +78,0 @@ /** |
Sorry, the diff of this file is not supported yet
7440402
127752
Updatedfolio@=0.4.0-alpha28