@applitools/eyes-playwright 1.47.3 → 1.47.5
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,210 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [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)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* 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))
|
|
9
|
+
* 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))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* @applitools/nml-client bumped to 1.11.29
|
|
15
|
+
|
|
16
|
+
* @applitools/core-base bumped to 1.35.0
|
|
17
|
+
#### Features
|
|
18
|
+
|
|
19
|
+
* 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))
|
|
20
|
+
* @applitools/core bumped to 4.64.0
|
|
21
|
+
#### Features
|
|
22
|
+
|
|
23
|
+
* 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))
|
|
24
|
+
* 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))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* 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))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
* @applitools/ec-client bumped to 1.12.31
|
|
34
|
+
|
|
35
|
+
* @applitools/eyes bumped to 1.43.0
|
|
36
|
+
#### Features
|
|
37
|
+
|
|
38
|
+
* 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))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## [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)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Bug Fixes
|
|
47
|
+
|
|
48
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Dependencies
|
|
52
|
+
|
|
53
|
+
* @applitools/utils bumped to 1.14.5
|
|
54
|
+
#### Bug Fixes
|
|
55
|
+
|
|
56
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
57
|
+
* @applitools/logger bumped to 2.2.12
|
|
58
|
+
#### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
* @applitools/dom-shared bumped to 1.2.1
|
|
65
|
+
#### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
68
|
+
* @applitools/dom-snapshot bumped to 4.17.2
|
|
69
|
+
#### Bug Fixes
|
|
70
|
+
|
|
71
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
* @applitools/socket bumped to 1.3.13
|
|
76
|
+
#### Bug Fixes
|
|
77
|
+
|
|
78
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
* @applitools/req bumped to 1.10.2
|
|
83
|
+
#### Bug Fixes
|
|
84
|
+
|
|
85
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
* @applitools/image bumped to 1.2.11
|
|
90
|
+
#### Bug Fixes
|
|
91
|
+
|
|
92
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
* @applitools/snippets bumped to 2.9.2
|
|
97
|
+
#### Bug Fixes
|
|
98
|
+
|
|
99
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
* @applitools/dom-capture bumped to 11.8.1
|
|
104
|
+
#### Bug Fixes
|
|
105
|
+
|
|
106
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
* @applitools/driver bumped to 1.26.2
|
|
111
|
+
#### Bug Fixes
|
|
112
|
+
|
|
113
|
+
* redact cookie values from logs to prevent sensitive data exposure | AD-12834 ([#3835](https://github.com/Applitools-Dev/sdk/issues/3835)) ([d883647](https://github.com/Applitools-Dev/sdk/commit/d883647d8e007467bd2770ddb79f89be057067b9))
|
|
114
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
* @applitools/spec-driver-webdriver bumped to 1.6.2
|
|
119
|
+
#### Bug Fixes
|
|
120
|
+
|
|
121
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
* @applitools/spec-driver-selenium bumped to 1.8.2
|
|
126
|
+
#### Bug Fixes
|
|
127
|
+
|
|
128
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
* @applitools/spec-driver-playwright bumped to 1.9.2
|
|
133
|
+
#### Bug Fixes
|
|
134
|
+
|
|
135
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
* @applitools/spec-driver-puppeteer bumped to 1.8.2
|
|
140
|
+
#### Bug Fixes
|
|
141
|
+
|
|
142
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
* @applitools/screenshoter bumped to 3.12.21
|
|
147
|
+
#### Bug Fixes
|
|
148
|
+
|
|
149
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
* @applitools/nml-client bumped to 1.11.28
|
|
154
|
+
#### Bug Fixes
|
|
155
|
+
|
|
156
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
* @applitools/tunnel-client bumped to 1.11.14
|
|
161
|
+
#### Bug Fixes
|
|
162
|
+
|
|
163
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
* @applitools/ufg-client bumped to 1.22.2
|
|
168
|
+
#### Bug Fixes
|
|
169
|
+
|
|
170
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
171
|
+
* strip extra fields from checkResources log output ([#3836](https://github.com/Applitools-Dev/sdk/issues/3836)) ([6d75209](https://github.com/Applitools-Dev/sdk/commit/6d752094abb6fcc0e998cf95e1f266964dbfd6f3))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
* @applitools/core-base bumped to 1.34.1
|
|
176
|
+
#### Bug Fixes
|
|
177
|
+
|
|
178
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
* @applitools/ec-client bumped to 1.12.30
|
|
183
|
+
#### Bug Fixes
|
|
184
|
+
|
|
185
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
* @applitools/core bumped to 4.63.1
|
|
190
|
+
#### Bug Fixes
|
|
191
|
+
|
|
192
|
+
* prevent BrightCove/video.js player corruption during layoutBreakpoints snapshots ([#3828](https://github.com/Applitools-Dev/sdk/issues/3828)) ([380fbae](https://github.com/Applitools-Dev/sdk/commit/380fbaeb1c6a964c640975f1a109417db51f691c))
|
|
193
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
194
|
+
* truly disable NML broker URL cache between checks | FLD-4283 ([#3837](https://github.com/Applitools-Dev/sdk/issues/3837)) ([da76dd3](https://github.com/Applitools-Dev/sdk/commit/da76dd3227c3297320be0d19558a7437b5733999))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
* @applitools/eyes bumped to 1.42.1
|
|
199
|
+
#### Bug Fixes
|
|
200
|
+
|
|
201
|
+
* strip .d.ts extension from import() type specifiers | FLD-4429 ([#3830](https://github.com/Applitools-Dev/sdk/issues/3830)) ([37aac45](https://github.com/Applitools-Dev/sdk/commit/37aac45958b713702bea87c144623dd3e65fce79))
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
* @applitools/test-server bumped to 1.4.4
|
|
206
|
+
|
|
207
|
+
|
|
3
208
|
## [1.47.3](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.47.2...js/eyes-playwright@1.47.3) (2026-05-19)
|
|
4
209
|
|
|
5
210
|
|
|
@@ -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.5",
|
|
4
4
|
"description": "Applitools Eyes SDK for Playwright",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eyes-playwright",
|
|
@@ -63,11 +63,11 @@
|
|
|
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.
|
|
67
|
-
"@applitools/logger": "2.2.
|
|
68
|
-
"@applitools/req": "1.10.
|
|
69
|
-
"@applitools/spec-driver-playwright": "1.9.
|
|
70
|
-
"@applitools/utils": "1.14.
|
|
66
|
+
"@applitools/eyes": "1.43.0",
|
|
67
|
+
"@applitools/logger": "2.2.12",
|
|
68
|
+
"@applitools/req": "1.10.2",
|
|
69
|
+
"@applitools/spec-driver-playwright": "1.9.2",
|
|
70
|
+
"@applitools/utils": "1.14.5",
|
|
71
71
|
"@inquirer/prompts": "7.0.1",
|
|
72
72
|
"chalk": "4.1.2",
|
|
73
73
|
"yargs": "17.7.2"
|
package/types/index.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export type CheckSettingsAutomationWithOptIn<TSpec extends SpecType> = {
|
|
|
68
68
|
timeout?: undefined | number;
|
|
69
69
|
waitBeforeCapture?: undefined | number | (() => Promise<void>);
|
|
70
70
|
lazyLoad?: undefined | boolean | { scrollLength?: undefined | number; waitingTime?: undefined | number; maxAmountToScroll?: undefined | number; };
|
|
71
|
-
} & import('
|
|
71
|
+
} & import('@applitools/eyes/types/input/CheckSettings').CheckSettingsOptIn<TSpec, ["page"]>;
|
|
72
72
|
export type CheckSettingsAutomationWithOptInPlan = {
|
|
73
73
|
name?: undefined | string;
|
|
74
74
|
region?: undefined | RegionPlain | ((LocationPlain & RectangleSizePlain & { page?: undefined | Driver; }) | { selector: string | Selector; page?: undefined | Driver; } | (Element | (string | Selector | { selector: string | Selector; type?: undefined | string; shadow?: undefined | EyesSelector<Selector>; frame?: undefined | EyesSelector<Selector>; }))) | LegacyRegionPlain;
|
|
@@ -127,7 +127,7 @@ export type CheckSettingsAutomationWithOptInPlan = {
|
|
|
127
127
|
timeout?: undefined | number;
|
|
128
128
|
waitBeforeCapture?: undefined | number | (() => Promise<void>);
|
|
129
129
|
lazyLoad?: undefined | boolean | { scrollLength?: undefined | number; waitingTime?: undefined | number; maxAmountToScroll?: undefined | number; };
|
|
130
|
-
} & import('
|
|
130
|
+
} & import('@applitools/eyes/types/input/CheckSettings').CheckSettingsOptIn<SpecType, ["page"]>;
|
|
131
131
|
export class Eyes {
|
|
132
132
|
static setViewportSize: (driver: Driver, viewportSize: RectangleSize) => Promise<void>;
|
|
133
133
|
static getExecutionCloudUrl(config?: undefined | (ConfigurationPlain & { maskLog?: undefined | boolean; })): Promise<string>;
|
|
@@ -394,7 +394,7 @@ export type CheckSettingsAutomationPlain = {
|
|
|
394
394
|
timeout?: undefined | number;
|
|
395
395
|
waitBeforeCapture?: undefined | number | (() => Promise<void>);
|
|
396
396
|
lazyLoad?: undefined | boolean | { scrollLength?: undefined | number; waitingTime?: undefined | number; maxAmountToScroll?: undefined | number; };
|
|
397
|
-
} & import('
|
|
397
|
+
} & import('@applitools/eyes/types/input/CheckSettings').CheckSettingsOptIn<SpecType, ["page"]>;
|
|
398
398
|
export class CheckSettingsAutomation {
|
|
399
399
|
constructor(settings?: undefined | CheckSettingsAutomation);
|
|
400
400
|
constructor(settings?: undefined | CheckSettingsAutomationWithOptIn<SpecType>);
|
|
@@ -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>;
|