playwright
Advanced tools
Comparing version 1.51.0-alpha-2025-01-24 to 1.51.0-alpha-2025-01-25
@@ -209,3 +209,3 @@ "use strict"; | ||
if ('updateSnapshots' in config && config.updateSnapshots !== undefined) { | ||
if (typeof config.updateSnapshots !== 'string' || !['all', 'none', 'missing'].includes(config.updateSnapshots)) throw (0, _util.errorWithFile)(file, `config.updateSnapshots must be one of "all", "none" or "missing"`); | ||
if (typeof config.updateSnapshots !== 'string' || !['all', 'changed', 'missing', 'none'].includes(config.updateSnapshots)) throw (0, _util.errorWithFile)(file, `config.updateSnapshots must be one of "all", "changed", "missing" or "none"`); | ||
} | ||
@@ -212,0 +212,0 @@ if ('workers' in config && config.workers !== undefined) { |
@@ -43,2 +43,3 @@ "use strict"; | ||
var _config = require("../common/config"); | ||
var _toHaveURL = require("./toHaveURL"); | ||
/** | ||
@@ -407,15 +408,3 @@ * Copyright Microsoft Corporation. All rights reserved. | ||
function toHaveURL(page, expected, options) { | ||
const baseURL = page.context()._options.baseURL; | ||
expected = typeof expected === 'string' ? (0, _utils.constructURLBasedOnBaseURL)(baseURL, expected) : expected; | ||
const locator = page.locator(':root'); | ||
return _toMatchText.toMatchText.call(this, 'toHaveURL', locator, 'Locator', async (isNot, timeout) => { | ||
const expectedText = (0, _utils.serializeExpectedTextValues)([expected], { | ||
ignoreCase: options === null || options === void 0 ? void 0 : options.ignoreCase | ||
}); | ||
return await locator._expect('to.have.url', { | ||
expectedText, | ||
isNot, | ||
timeout | ||
}); | ||
}, expected, options); | ||
return _toHaveURL.toHaveURL.call(this, page, expected, options); | ||
} | ||
@@ -422,0 +411,0 @@ async function toBeOK(response) { |
@@ -33,3 +33,2 @@ "use strict"; | ||
async function toMatchAriaSnapshot(receiver, expectedParam, options = {}) { | ||
var _options$timeout; | ||
const matcherName = 'toMatchAriaSnapshot'; | ||
@@ -50,6 +49,10 @@ const testInfo = (0, _globals.currentTestInfo)(); | ||
let expected; | ||
let timeout; | ||
let expectedPath; | ||
if ((0, _utils.isString)(expectedParam)) { | ||
var _options$timeout; | ||
expected = expectedParam; | ||
timeout = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : this.timeout; | ||
} else { | ||
var _expectedParam$timeou; | ||
if (expectedParam !== null && expectedParam !== void 0 && expectedParam.name) { | ||
@@ -69,2 +72,3 @@ expectedPath = testInfo.snapshotPath((0, _util.sanitizeFilePathBeforeExtension)(expectedParam.name)); | ||
expected = await _fs.default.promises.readFile(expectedPath, 'utf8').catch(() => ''); | ||
timeout = (_expectedParam$timeou = expectedParam === null || expectedParam === void 0 ? void 0 : expectedParam.timeout) !== null && _expectedParam$timeou !== void 0 ? _expectedParam$timeou : this.timeout; | ||
} | ||
@@ -85,3 +89,2 @@ const generateMissingBaseline = updateSnapshots === 'missing' && !expected; | ||
} | ||
const timeout = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : this.timeout; | ||
expected = unshift(expected); | ||
@@ -88,0 +91,0 @@ const { |
@@ -272,3 +272,3 @@ "use strict"; | ||
let updateSnapshots; | ||
if (['all', 'changed', 'missing', 'none'].includes(options.updateSnapshots)) updateSnapshots = options.updateSnapshots;else updateSnapshots = 'updateSnapshots' in options ? 'changed' : 'missing'; | ||
if (['all', 'changed', 'missing', 'none'].includes(options.updateSnapshots)) updateSnapshots = options.updateSnapshots;else updateSnapshots = 'updateSnapshots' in options ? 'changed' : undefined; | ||
const overrides = { | ||
@@ -275,0 +275,0 @@ forbidOnly: options.forbidOnly ? true : undefined, |
{ | ||
"name": "playwright", | ||
"version": "1.51.0-alpha-2025-01-24", | ||
"version": "1.51.0-alpha-2025-01-25", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -59,3 +59,3 @@ "repository": { | ||
"dependencies": { | ||
"playwright-core": "1.51.0-alpha-2025-01-24" | ||
"playwright-core": "1.51.0-alpha-2025-01-25" | ||
}, | ||
@@ -62,0 +62,0 @@ "optionalDependencies": { |
# 🎭 Playwright | ||
[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-133.0.6943.16-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-134.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-18.2-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop --> [![Join Discord](https://img.shields.io/badge/join-discord-infomational)](https://aka.ms/playwright/discord) | ||
[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-133.0.6943.27-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-134.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-18.2-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop --> [![Join Discord](https://img.shields.io/badge/join-discord-infomational)](https://aka.ms/playwright/discord) | ||
@@ -11,3 +11,3 @@ ## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright) | ||
| :--- | :---: | :---: | :---: | | ||
| Chromium <!-- GEN:chromium-version -->133.0.6943.16<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| Chromium <!-- GEN:chromium-version -->133.0.6943.27<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| WebKit <!-- GEN:webkit-version -->18.2<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
@@ -14,0 +14,0 @@ | Firefox <!-- GEN:firefox-version -->134.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
Sorry, the diff of this file is too big to display
3178832
109
36352
+ Addedplaywright-core@1.51.0-alpha-2025-01-25(transitive)
- Removedplaywright-core@1.51.0-alpha-2025-01-24(transitive)