@applitools/core 4.73.0 → 4.73.1
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 +34 -0
- package/dist/make-manager.js +8 -0
- package/dist/ufg/utils/take-dom-snapshots.js +46 -37
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.73.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.73.0...js/core@4.73.1) (2026-10-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* dispatch resize after breakpoint viewport change so content isn't captured stale | AD-16809 ([#4295](https://github.com/Applitools-Dev/sdk/issues/4295)) ([56ec8be](https://github.com/Applitools-Dev/sdk/commit/56ec8beafe9e93fb425f8c96d37a76a603ecfa88))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Performance Improvements
|
|
12
|
+
|
|
13
|
+
* warm git branch/env detection at makeManager | AD-17264 ([#4349](https://github.com/Applitools-Dev/sdk/issues/4349)) ([b4e7b24](https://github.com/Applitools-Dev/sdk/commit/b4e7b248e344cbf17ac6baaffdfff41ff0477f02))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* @applitools/dom-snapshot bumped to 4.18.7
|
|
19
|
+
#### Performance Improvements
|
|
20
|
+
|
|
21
|
+
* parse identical css once per snapshot | FLD-4733 ([#4318](https://github.com/Applitools-Dev/sdk/issues/4318)) ([18faeb9](https://github.com/Applitools-Dev/sdk/commit/18faeb91396c5e185def88045394eee88e3ac45c))
|
|
22
|
+
* @applitools/dom-capture bumped to 11.8.9
|
|
23
|
+
#### Code Refactoring
|
|
24
|
+
|
|
25
|
+
* move timing out of captureFrame into an instrumentation layer | AD-17307 ([#4356](https://github.com/Applitools-Dev/sdk/issues/4356)) ([1886a83](https://github.com/Applitools-Dev/sdk/commit/1886a83c58d363d5fe4c422975220713eb13b903))
|
|
26
|
+
* @applitools/tunnel-client bumped to 1.12.7
|
|
27
|
+
#### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* keep the tunnel-client binary off native runners | AD-17238 ([#4345](https://github.com/Applitools-Dev/sdk/issues/4345)) ([b277be3](https://github.com/Applitools-Dev/sdk/commit/b277be3b4f3e6b5c3bc2f26cb6bbe58913b5a49b))
|
|
30
|
+
* @applitools/ufg-client bumped to 1.24.0
|
|
31
|
+
#### Features
|
|
32
|
+
|
|
33
|
+
* update iOS device names for the iOS 27 UFG upgrade | AD-17131 ([#4354](https://github.com/Applitools-Dev/sdk/issues/4354)) ([d825238](https://github.com/Applitools-Dev/sdk/commit/d8252386c111cbf4612c6ea559eecbef0b133fcf))
|
|
34
|
+
* @applitools/ec-client bumped to 1.12.53
|
|
35
|
+
|
|
36
|
+
|
|
3
37
|
## [4.73.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.72.2...js/core@4.73.0) (2026-10-18)
|
|
4
38
|
|
|
5
39
|
|
package/dist/make-manager.js
CHANGED
|
@@ -29,6 +29,7 @@ const core_1 = require("./classic/core");
|
|
|
29
29
|
const core_2 = require("./ufg/core");
|
|
30
30
|
const open_eyes_1 = require("./open-eyes");
|
|
31
31
|
const get_manager_results_1 = require("./get-manager-results");
|
|
32
|
+
const extract_git_info_1 = require("./utils/extract-git-info");
|
|
32
33
|
const utils = __importStar(require("@applitools/utils"));
|
|
33
34
|
function makeMakeManager({ spec, clients, core, base: defaultBase, agentId: defaultAgentId, environment, cwd = process.cwd(), logger: mainLogger, asyncCache, offlineLocationPath, maskLog, }) {
|
|
34
35
|
return async function makeManager({ type = 'classic', settings, logger = mainLogger, } = {}) {
|
|
@@ -42,6 +43,13 @@ function makeMakeManager({ spec, clients, core, base: defaultBase, agentId: defa
|
|
|
42
43
|
(_f = (_j = settings.batch).buildId) !== null && _f !== void 0 ? _f : (_j.buildId = utils.general.getEnvValue('BATCH_BUILD_ID'));
|
|
43
44
|
(_g = settings.agentId) !== null && _g !== void 0 ? _g : (settings.agentId = type === 'ufg' ? defaultAgentId === null || defaultAgentId === void 0 ? void 0 : defaultAgentId.replace(/(\/\d)/, '.visualgrid$1') : defaultAgentId);
|
|
44
45
|
logger.log('Command "makeManager" is called with settings', settings);
|
|
46
|
+
// Prime the per-cwd git caches so their subprocesses (incl. the ls-remote network probe in
|
|
47
|
+
// checkGitEnvironment) overlap user setup; open-eyes awaits the same cached promises. Only the
|
|
48
|
+
// branch name/env is warmable — branching timestamp and fallback list need the server's scmSettings.
|
|
49
|
+
void Promise.all([
|
|
50
|
+
(0, extract_git_info_1.extractGitBranch)({ execOptions: { cwd }, logger }),
|
|
51
|
+
(0, extract_git_info_1.extractGitRepo)({ execOptions: { cwd }, logger }),
|
|
52
|
+
]).catch(() => undefined);
|
|
45
53
|
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId: settings.agentId, logger, offlineLocationPath, maskLog });
|
|
46
54
|
const fetchConcurrency = settings.fetchConcurrency;
|
|
47
55
|
const cores = {
|
|
@@ -88,49 +88,58 @@ async function takeDomSnapshots({ driver, settings, hooks, provides, logger, })
|
|
|
88
88
|
});
|
|
89
89
|
const mediaGuard = (0, media_playback_guard_1.makeMediaPlaybackGuard)({ context: currentContext, logger });
|
|
90
90
|
await mediaGuard.setup();
|
|
91
|
+
// Keep the page foreground across the resizes: the browser dispatches `resize` (and runs
|
|
92
|
+
// ResizeObserver) only on a rendering frame, which a backgrounded/frozen tab never gets, so a page
|
|
93
|
+
// that rebuilds content on resize would otherwise be captured at the previous breakpoint's width.
|
|
94
|
+
const previousFocusEmulation = await driver.setFocusEmulation(true);
|
|
91
95
|
const snapshots = Array(settings.environments.length);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
catch (error) {
|
|
100
|
-
logger.error(`Failed to set viewport size to ${viewportSize} due to the error`, error);
|
|
101
|
-
const actualViewportSize = await driver.getViewportSize();
|
|
102
|
-
if (isStrictBreakpoints) {
|
|
103
|
-
const message = lang.breakpointOutOfDriverBoundsWarning({
|
|
104
|
-
requiredWidth: viewportSize.width,
|
|
105
|
-
actualWidth: actualViewportSize.width,
|
|
106
|
-
browsers,
|
|
107
|
-
});
|
|
108
|
-
logger.console.log(chalk_1.default.yellow(message));
|
|
109
|
-
logger.log(message);
|
|
96
|
+
try {
|
|
97
|
+
for (const [index, { viewportSize, browsers }] of entries.entries()) {
|
|
98
|
+
logger.log(`Taking dom snapshot for viewport size ${viewportSize}`);
|
|
99
|
+
await mediaGuard.beforeResize();
|
|
100
|
+
if (viewportSize) {
|
|
101
|
+
try {
|
|
102
|
+
await driver.setViewportSize(viewportSize);
|
|
110
103
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
104
|
+
catch (error) {
|
|
105
|
+
logger.error(`Failed to set viewport size to ${viewportSize} due to the error`, error);
|
|
106
|
+
const actualViewportSize = await driver.getViewportSize();
|
|
107
|
+
if (isStrictBreakpoints) {
|
|
108
|
+
const message = lang.breakpointOutOfDriverBoundsWarning({
|
|
109
|
+
requiredWidth: viewportSize.width,
|
|
110
|
+
actualWidth: actualViewportSize.width,
|
|
111
|
+
browsers,
|
|
112
|
+
});
|
|
113
|
+
logger.console.log(chalk_1.default.yellow(message));
|
|
114
|
+
logger.log(message);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
const message = lang.requestedEnvironmentOutOfDriverBoundsWarning({
|
|
118
|
+
requiredWidth: viewportSize.width,
|
|
119
|
+
actualWidth: actualViewportSize.width,
|
|
120
|
+
browsers,
|
|
121
|
+
});
|
|
122
|
+
logger.console.log(chalk_1.default.yellow(message));
|
|
123
|
+
logger.log(message);
|
|
124
|
+
}
|
|
119
125
|
}
|
|
120
126
|
}
|
|
127
|
+
if (settings.layoutBreakpoints.reload)
|
|
128
|
+
await driver.reloadPage();
|
|
129
|
+
if (settings.lazyLoad && (index === 0 || settings.layoutBreakpoints.reload)) {
|
|
130
|
+
await (0, wait_for_lazy_load_1.waitForLazyLoad)({ context: currentContext, settings: settings.lazyLoad, logger });
|
|
131
|
+
}
|
|
132
|
+
await beforeEachSnapshot();
|
|
133
|
+
await mediaGuard.beforeSnapshot();
|
|
134
|
+
const snapshot = await (0, take_dom_snapshot_1.takeDomSnapshot)({ context: currentContext, settings, logger });
|
|
135
|
+
browsers.forEach(({ index }) => (snapshots[index] = snapshot));
|
|
136
|
+
await mediaGuard.afterSnapshot();
|
|
121
137
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
await beforeEachSnapshot();
|
|
128
|
-
await mediaGuard.beforeSnapshot();
|
|
129
|
-
const snapshot = await (0, take_dom_snapshot_1.takeDomSnapshot)({ context: currentContext, settings, logger });
|
|
130
|
-
browsers.forEach(({ index }) => (snapshots[index] = snapshot));
|
|
131
|
-
await mediaGuard.afterSnapshot();
|
|
138
|
+
await driver.setViewportSize(initialViewportSize);
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
await driver.setFocusEmulation(previousFocusEmulation);
|
|
132
142
|
}
|
|
133
|
-
await driver.setViewportSize(initialViewportSize);
|
|
134
143
|
await mediaGuard.teardown();
|
|
135
144
|
if (settings.layoutBreakpoints.reload) {
|
|
136
145
|
await driver.reloadPage();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.73.
|
|
3
|
+
"version": "4.73.1",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": {
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@applitools/core-base": "1.41.2",
|
|
59
|
-
"@applitools/dom-capture": "11.8.
|
|
60
|
-
"@applitools/dom-snapshot": "4.18.
|
|
59
|
+
"@applitools/dom-capture": "11.8.9",
|
|
60
|
+
"@applitools/dom-snapshot": "4.18.7",
|
|
61
61
|
"@applitools/driver": "1.26.13",
|
|
62
|
-
"@applitools/ec-client": "1.12.
|
|
62
|
+
"@applitools/ec-client": "1.12.53",
|
|
63
63
|
"@applitools/image": "1.3.4",
|
|
64
64
|
"@applitools/logger": "2.3.2",
|
|
65
65
|
"@applitools/nml-client": "1.12.9",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@applitools/screenshoter": "3.12.35",
|
|
68
68
|
"@applitools/snippets": "2.9.9",
|
|
69
69
|
"@applitools/socket": "1.3.18",
|
|
70
|
-
"@applitools/ufg-client": "1.
|
|
70
|
+
"@applitools/ufg-client": "1.24.0",
|
|
71
71
|
"@applitools/utils": "1.15.3",
|
|
72
72
|
"abort-controller": "3.0.0",
|
|
73
73
|
"chalk": "4.1.2",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@applitools/spec-driver-webdriver": "^1.6.13",
|
|
86
86
|
"@applitools/test-server": "^1.4.8",
|
|
87
87
|
"@applitools/test-utils": "^1.5.17",
|
|
88
|
-
"@applitools/tunnel-client": "^1.12.
|
|
88
|
+
"@applitools/tunnel-client": "^1.12.7",
|
|
89
89
|
"@swc-node/register": "^1.6.8",
|
|
90
90
|
"@types/mocha": "^10.0.7",
|
|
91
91
|
"@types/node": "^12.20.55",
|