@applitools/eyes-playwright 1.47.4 → 1.47.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.47.6](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.47.5...js/eyes-playwright@1.47.6) (2026-06-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* @applitools/req bumped to 1.11.0
|
|
9
|
+
#### Features
|
|
10
|
+
|
|
11
|
+
* add HTTP/2 proxy support (AD-13916) ([#3860](https://github.com/Applitools-Dev/sdk/issues/3860)) ([87cfb3e](https://github.com/Applitools-Dev/sdk/commit/87cfb3e2772cc8443d961b7916cc701f894b84cb))
|
|
12
|
+
* @applitools/nml-client bumped to 1.11.30
|
|
13
|
+
|
|
14
|
+
* @applitools/tunnel-client bumped to 1.12.0
|
|
15
|
+
#### Features
|
|
16
|
+
|
|
17
|
+
* add PAC-file proxy routing for tunnel agent | FLD-3783 ([#3897](https://github.com/Applitools-Dev/sdk/issues/3897)) ([e4f5818](https://github.com/Applitools-Dev/sdk/commit/e4f58181f4e835c9823915ecab9e99a9e150e493))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
* @applitools/ufg-client bumped to 1.22.3
|
|
22
|
+
|
|
23
|
+
* @applitools/core-base bumped to 1.35.1
|
|
24
|
+
|
|
25
|
+
* @applitools/ec-client bumped to 1.12.32
|
|
26
|
+
|
|
27
|
+
* @applitools/core bumped to 4.64.1
|
|
28
|
+
|
|
29
|
+
* @applitools/eyes bumped to 1.43.1
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [1.47.5](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.47.4...js/eyes-playwright@1.47.5) (2026-06-04)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* centralize APPLITOOLS_* env reads for fixture configuration | FLD-4601 ([#3888](https://github.com/Applitools-Dev/sdk/issues/3888)) ([9b3180f](https://github.com/Applitools-Dev/sdk/commit/9b3180f23e0d42a2326a0bef038382b4da07bb1a))
|
|
38
|
+
* use _apiName for Page/Locator type check on Playwright 1.60+ | FLD-4598 ([#3872](https://github.com/Applitools-Dev/sdk/issues/3872)) ([7149bef](https://github.com/Applitools-Dev/sdk/commit/7149bef4ea3e352d37383d21e8267989a0090591))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Dependencies
|
|
42
|
+
|
|
43
|
+
* @applitools/nml-client bumped to 1.11.29
|
|
44
|
+
|
|
45
|
+
* @applitools/core-base bumped to 1.35.0
|
|
46
|
+
#### Features
|
|
47
|
+
|
|
48
|
+
* auto-accept UFG diffs from infra updates | AD-9583 ([#3797](https://github.com/Applitools-Dev/sdk/issues/3797)) ([fde553c](https://github.com/Applitools-Dev/sdk/commit/fde553c947aa3c040660ef5d07855fa4a1412399))
|
|
49
|
+
* @applitools/core bumped to 4.64.0
|
|
50
|
+
#### Features
|
|
51
|
+
|
|
52
|
+
* auto-accept UFG diffs from infra updates | AD-9583 ([#3797](https://github.com/Applitools-Dev/sdk/issues/3797)) ([fde553c](https://github.com/Applitools-Dev/sdk/commit/fde553c947aa3c040660ef5d07855fa4a1412399))
|
|
53
|
+
* support default match level from renderinfo | AD-13499 ([#3799](https://github.com/Applitools-Dev/sdk/issues/3799)) ([c7e8aeb](https://github.com/Applitools-Dev/sdk/commit/c7e8aeb3f231d9b4e6e368d7ae5f87115c5cad09))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
#### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* source hideCaret from settings.hideCaret in NML classic capture | AD-14053 ([#3878](https://github.com/Applitools-Dev/sdk/issues/3878)) ([f07b4f5](https://github.com/Applitools-Dev/sdk/commit/f07b4f5c90bb9b7de0300cef93f23dc833268a7c))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
* @applitools/ec-client bumped to 1.12.31
|
|
63
|
+
|
|
64
|
+
* @applitools/eyes bumped to 1.43.0
|
|
65
|
+
#### Features
|
|
66
|
+
|
|
67
|
+
* auto-accept UFG diffs from infra updates | AD-9583 ([#3797](https://github.com/Applitools-Dev/sdk/issues/3797)) ([fde553c](https://github.com/Applitools-Dev/sdk/commit/fde553c947aa3c040660ef5d07855fa4a1412399))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
3
72
|
## [1.47.4](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.47.3...js/eyes-playwright@1.47.4) (2026-05-26)
|
|
4
73
|
|
|
5
74
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.applyEnvDefaults = void 0;
|
|
27
|
+
const utils = __importStar(require("@applitools/utils"));
|
|
28
|
+
// Empty-string env values are treated as unset so the fixture's fallback wins —
|
|
29
|
+
// CI systems commonly yield "" for declared-but-unfilled vars (e.g. a missing
|
|
30
|
+
// GH Actions secret), and a blank batch name / branch name is never intended.
|
|
31
|
+
// NOTE: intentionally differs from core's env block, which accepts ''.
|
|
32
|
+
function readString(name) {
|
|
33
|
+
const value = utils.general.getEnvValue(name);
|
|
34
|
+
return value ? value : undefined;
|
|
35
|
+
}
|
|
36
|
+
function readBoolean(name) {
|
|
37
|
+
const raw = readString(name);
|
|
38
|
+
if (raw === undefined)
|
|
39
|
+
return undefined;
|
|
40
|
+
return ['true', '1'].includes(raw);
|
|
41
|
+
}
|
|
42
|
+
// Assigns `value` to `obj[key]` only when there is a concrete value to write
|
|
43
|
+
// AND the slot is still nullish. `??=` alone is unsafe here because
|
|
44
|
+
// `obj[key] ??= undefined` still defines `key` as an enumerable property —
|
|
45
|
+
// and the legacy `eyes` `Configuration` class's setters (e.g. `set branchName`)
|
|
46
|
+
// throw `IllegalArgument` when an undefined key is assigned through them.
|
|
47
|
+
function assignIfDefined(obj, key, value) {
|
|
48
|
+
if (value === undefined)
|
|
49
|
+
return;
|
|
50
|
+
if (obj[key] === undefined || obj[key] === null)
|
|
51
|
+
obj[key] = value;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Mirrors the APPLITOOLS_* env block in @applitools/core's open-eyes so the
|
|
55
|
+
* fixture honors the same env contract before applying any Playwright-aware
|
|
56
|
+
* default — otherwise a fallback set via `??=` in the fixture would short-
|
|
57
|
+
* circuit core's later `??=` env read (see FLD-4601). Only writes keys that
|
|
58
|
+
* have a concrete value, so the merged config never contains undefined
|
|
59
|
+
* properties that the legacy `eyes` Configuration setters would reject.
|
|
60
|
+
* Mutates `configuration` in place.
|
|
61
|
+
*/
|
|
62
|
+
function applyEnvDefaults(configuration) {
|
|
63
|
+
var _a, _b, _c, _d;
|
|
64
|
+
const batchId = readString('BATCH_ID');
|
|
65
|
+
const batchBuildId = readString('BATCH_BUILD_ID');
|
|
66
|
+
const batchName = readString('BATCH_NAME');
|
|
67
|
+
const batchSequence = readString('BATCH_SEQUENCE');
|
|
68
|
+
const batchNotify = readBoolean('BATCH_NOTIFY');
|
|
69
|
+
if (batchId !== undefined ||
|
|
70
|
+
batchBuildId !== undefined ||
|
|
71
|
+
batchName !== undefined ||
|
|
72
|
+
batchSequence !== undefined ||
|
|
73
|
+
batchNotify !== undefined) {
|
|
74
|
+
(_a = configuration.batch) !== null && _a !== void 0 ? _a : (configuration.batch = {});
|
|
75
|
+
assignIfDefined(configuration.batch, 'id', batchId);
|
|
76
|
+
assignIfDefined(configuration.batch, 'buildId', batchBuildId);
|
|
77
|
+
assignIfDefined(configuration.batch, 'name', batchName);
|
|
78
|
+
assignIfDefined(configuration.batch, 'sequenceName', batchSequence);
|
|
79
|
+
assignIfDefined(configuration.batch, 'notifyOnCompletion', batchNotify);
|
|
80
|
+
}
|
|
81
|
+
assignIfDefined(configuration, 'branchName', (_b = readString('BRANCH')) !== null && _b !== void 0 ? _b : readString('BRANCH_NAME'));
|
|
82
|
+
assignIfDefined(configuration, 'parentBranchName', (_c = readString('PARENT_BRANCH')) !== null && _c !== void 0 ? _c : readString('PARENT_BRANCH_NAME'));
|
|
83
|
+
assignIfDefined(configuration, 'baselineBranchName', (_d = readString('BASELINE_BRANCH')) !== null && _d !== void 0 ? _d : readString('BASELINE_BRANCH_NAME'));
|
|
84
|
+
}
|
|
85
|
+
exports.applyEnvDefaults = applyEnvDefaults;
|
|
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getFinalEyesConfiguration = void 0;
|
|
6
|
+
exports.getFinalEyesConfiguration = exports.addBatchDefaults = void 0;
|
|
7
7
|
const name_1 = require("./batch/name");
|
|
8
|
+
const env_1 = require("./env");
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
9
10
|
function addConfigurationProperties({ properties = [], testInfo, }) {
|
|
10
11
|
const result = [
|
|
@@ -33,7 +34,8 @@ function addConfigurationProperties({ properties = [], testInfo, }) {
|
|
|
33
34
|
}
|
|
34
35
|
function addBatchDefaults({ configuration }) {
|
|
35
36
|
var _a, _b, _c, _d;
|
|
36
|
-
|
|
37
|
+
(0, env_1.applyEnvDefaults)(configuration);
|
|
38
|
+
const batch = ((_a = configuration.batch) !== null && _a !== void 0 ? _a : (configuration.batch = {}));
|
|
37
39
|
(_b = batch.id) !== null && _b !== void 0 ? _b : (batch.id = `generated-${process.ppid}`);
|
|
38
40
|
(_c = batch.name) !== null && _c !== void 0 ? _c : (batch.name = (0, name_1.getBatchName)({ appName: configuration.appName }));
|
|
39
41
|
(_d = batch.properties) !== null && _d !== void 0 ? _d : (batch.properties = []);
|
|
@@ -46,6 +48,7 @@ function addBatchDefaults({ configuration }) {
|
|
|
46
48
|
}
|
|
47
49
|
return batch;
|
|
48
50
|
}
|
|
51
|
+
exports.addBatchDefaults = addBatchDefaults;
|
|
49
52
|
function getFinalEyesConfiguration({ playwrightConfig = {}, projectConfig = {}, eyesConfig = {}, testInfo, }) {
|
|
50
53
|
var _a, _b, _c;
|
|
51
54
|
const configuration = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.expectTypes = exports.expect = void 0;
|
|
3
|
+
exports.expectTypes = exports.getApiName = exports.expect = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const index_1 = require("./index");
|
|
6
6
|
const getEyes_1 = require("./getEyes");
|
|
@@ -24,7 +24,7 @@ exports.expect = test_1.expect.extend({
|
|
|
24
24
|
// }
|
|
25
25
|
}
|
|
26
26
|
expectTypes(pageOrLocator, ['Page', 'Locator'], 'toHaveScreenshot');
|
|
27
|
-
const [targetPage, locator] = pageOrLocator
|
|
27
|
+
const [targetPage, locator] = getApiName(pageOrLocator) === 'Page'
|
|
28
28
|
? [pageOrLocator, undefined]
|
|
29
29
|
: [pageOrLocator.page(), pageOrLocator];
|
|
30
30
|
// For multi-page support: Always use the main page that has Eyes opened
|
|
@@ -140,8 +140,20 @@ exports.expect = test_1.expect.extend({
|
|
|
140
140
|
};
|
|
141
141
|
},
|
|
142
142
|
});
|
|
143
|
+
/**
|
|
144
|
+
* Returns the Playwright API name for a given object.
|
|
145
|
+
* Playwright 1.60+ uses a private `_apiName` property (e.g. `"Page"`, `"Locator"`) instead of
|
|
146
|
+
* relying on `constructor.name`. This is because the classes are defined as `class _Page` /
|
|
147
|
+
* `class _Locator`, so `constructor.name` returns `"_Page"` / `"_Locator"` in those versions.
|
|
148
|
+
* We fall back to `constructor.name` for older Playwright versions that do not expose `_apiName`.
|
|
149
|
+
*/
|
|
150
|
+
function getApiName(receiver) {
|
|
151
|
+
var _a, _b, _c;
|
|
152
|
+
return (_c = (_a = receiver === null || receiver === void 0 ? void 0 : receiver._apiName) !== null && _a !== void 0 ? _a : (_b = receiver === null || receiver === void 0 ? void 0 : receiver.constructor) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '';
|
|
153
|
+
}
|
|
154
|
+
exports.getApiName = getApiName;
|
|
143
155
|
function expectTypes(receiver, types, matcherName) {
|
|
144
|
-
if (typeof receiver !== 'object' || !types.includes(receiver
|
|
156
|
+
if (typeof receiver !== 'object' || !types.includes(getApiName(receiver))) {
|
|
145
157
|
const commaSeparated = types.slice();
|
|
146
158
|
const lastType = commaSeparated.pop();
|
|
147
159
|
const typesString = commaSeparated.length ? commaSeparated.join(', ') + ' or ' + lastType : lastType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-playwright",
|
|
3
|
-
"version": "1.47.
|
|
3
|
+
"version": "1.47.6",
|
|
4
4
|
"description": "Applitools Eyes SDK for Playwright",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eyes-playwright",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"up:framework": "echo \"$(jq '.devDependencies.playwright = $ENV.APPLITOOLS_FRAMEWORK_VERSION' ./package.json)\" > ./package.json"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@applitools/eyes": "1.
|
|
66
|
+
"@applitools/eyes": "1.43.1",
|
|
67
67
|
"@applitools/logger": "2.2.12",
|
|
68
|
-
"@applitools/req": "1.
|
|
68
|
+
"@applitools/req": "1.11.0",
|
|
69
69
|
"@applitools/spec-driver-playwright": "1.9.2",
|
|
70
70
|
"@applitools/utils": "1.14.5",
|
|
71
71
|
"@inquirer/prompts": "7.0.1",
|
package/types/index.d.ts
CHANGED
|
@@ -1935,6 +1935,7 @@ export type TestResultsPlain = {
|
|
|
1935
1935
|
readonly url?: undefined | string;
|
|
1936
1936
|
readonly server?: undefined | { eyesServerUrl: string; apiKey: string; proxy?: undefined | ProxySettingsPlain; };
|
|
1937
1937
|
readonly keepIfDuplicate?: undefined | boolean;
|
|
1938
|
+
readonly isAutoAcceptedInfraUpdate?: undefined | boolean;
|
|
1938
1939
|
};
|
|
1939
1940
|
export class TestResults implements Required<TestResultsPlain> {
|
|
1940
1941
|
get id(): string;
|
|
@@ -2036,6 +2037,8 @@ export class TestResults implements Required<TestResultsPlain> {
|
|
|
2036
2037
|
useDnsCache?: undefined | boolean;
|
|
2037
2038
|
};
|
|
2038
2039
|
get keepIfDuplicate(): boolean;
|
|
2040
|
+
get isAutoAcceptedInfraUpdate(): boolean;
|
|
2041
|
+
getIsAutoAcceptedInfraUpdate(): boolean;
|
|
2039
2042
|
isPassed(): boolean;
|
|
2040
2043
|
delete(): Promise<void>;
|
|
2041
2044
|
deleteSession(): Promise<void>;
|