@mablhq/mabl-cli 1.58.25 → 1.58.28
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/api/basicApiClient.js +15 -21
- package/api/mablApiClient.js +48 -40
- package/api/mablApiClientFactory.js +1 -1
- package/auth/OktaClient.js +2 -1
- package/browserEngines/chromiumBrowserEngine.js +2 -1
- package/browserEngines/firefoxBrowserEngine.js +2 -2
- package/browserEngines/webkitBrowerEngine.js +2 -2
- package/browserLauncher/browserLauncherFactory.js +3 -2
- package/browserLauncher/elementHandle.js +2 -1
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumElementHandleDelegate.js +20 -12
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumFrameDelegate.js +1 -1
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumPageDelegate.js +10 -7
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxFrameDelegate.js +4 -3
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractElementHandleDelegate.js +5 -4
- package/browserLauncher/playwrightBrowserLauncher/nonChromium/nonChromiumAbstractPageDelegate.js +7 -4
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +1 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +7 -6
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +37 -31
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +9 -8
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +8 -4
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +5 -3
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitElementHandleDelegate.js +2 -1
- package/browserLauncher/playwrightBrowserLauncher/webkit/webkitFrameDelegate.js +1 -1
- package/browserTestMonitoring/metricsRecorder.js +6 -6
- package/commands/commandUtil/branches.js +3 -2
- package/commands/commandUtil/codeInsights.js +16 -13
- package/commands/commandUtil/fileUtil.js +1 -1
- package/commands/commandUtil/util.js +5 -3
- package/commands/commandUtil/versionUtil.js +5 -4
- package/commands/config/config_cmds/list.js +2 -2
- package/commands/datatables/datatables_cmds/create.js +3 -2
- package/commands/datatables/datatables_cmds/export.js +5 -3
- package/commands/datatables/datatables_cmds/list.js +2 -1
- package/commands/datatables/datatables_cmds/scenarios.js +2 -1
- package/commands/datatables/datatables_cmds/update.js +11 -11
- package/commands/datatables/utils.js +9 -9
- package/commands/deploy/deploy_cmds/awaitDeploymentCompletion.js +8 -6
- package/commands/deploy/deploy_cmds/create.js +13 -11
- package/commands/deploy/deploy_cmds/executionResultPresenter.js +11 -8
- package/commands/deploy/deploy_cmds/list.js +4 -3
- package/commands/deploy/deploy_cmds/watch.js +2 -1
- package/commands/environments/environments_cmds/create.js +2 -1
- package/commands/environments/environments_cmds/delete.js +2 -1
- package/commands/environments/environments_cmds/update.js +2 -1
- package/commands/environments/environments_cmds/urls_cmds/list.js +2 -1
- package/commands/flows/flows_cmds/export.js +2 -1
- package/commands/plans/plans_cmds/describe.js +2 -1
- package/commands/tests/mobileEmulationUtil.js +7 -5
- package/commands/tests/testsUtil.js +42 -40
- package/commands/tests/tests_cmds/export.js +2 -1
- package/commands/tests/tests_cmds/import.js +5 -4
- package/commands/tests/tests_cmds/run-cloud.js +13 -12
- package/commands/tests/tests_cmds/run.js +11 -9
- package/commands/users/users_cmds/list.js +2 -2
- package/commands/workspaces/workspace_cmds/copy.js +2 -1
- package/core/execution/ApiTestUtils.js +94 -82
- package/core/messaging/logLineMessaging.js +3 -2
- package/core/messaging/messaging.js +7 -6
- package/core/trainer/trainingSessions.js +15 -15
- package/coreWebVitals/index.js +18 -14
- package/execution/index.js +1 -1
- package/functions/apiTest/utils.js +5 -4
- package/http/MablHttpAgent.js +6 -4
- package/http/RequestSecurityError.js +1 -1
- package/http/axiosProxyConfig.js +5 -3
- package/http/httpUtil.js +3 -2
- package/http/requestInterceptor.js +15 -11
- package/mablscript/MablAction.js +3 -2
- package/mablscript/MablStep.js +4 -2
- package/mablscript/MablSymbol.js +1 -1
- package/mablscript/actions/ConditionAction.js +4 -2
- package/mablscript/actions/FindAction.js +4 -2
- package/mablscript/diffing/diffingUtil.js +7 -8
- package/mablscript/importer.js +2 -1
- package/mablscript/steps/AccessibilityCheck.js +9 -7
- package/mablscript/steps/AssertStep.js +16 -11
- package/mablscript/steps/ClickAndHoldStep.js +2 -1
- package/mablscript/steps/CreateVariableStep.js +2 -1
- package/mablscript/steps/DownloadStep.js +2 -1
- package/mablscript/steps/EnterTextStep.js +2 -1
- package/mablscript/steps/EvaluateFlowStep.js +1 -1
- package/mablscript/steps/IfConditionStep.js +6 -4
- package/mablscript/steps/ReleaseStep.js +2 -1
- package/mablscript/steps/SendHttpRequestStep.js +4 -2
- package/mablscript/steps/SendKeyStep.js +1 -1
- package/mablscript/steps/SetCookieStep.js +8 -7
- package/mablscript/steps/SetViewportStep.js +1 -1
- package/mablscript/steps/SwitchContextStep.js +6 -3
- package/mablscript/steps/SyntheticStep.js +2 -1
- package/middleware.js +2 -1
- package/package.json +1 -1
- package/popupDismissal/index.js +5 -4
- package/providers/authenticationProvider.js +6 -5
- package/providers/cliConfigProvider.js +12 -10
- package/providers/exportRequestProvider.js +5 -3
- package/providers/logging/loggingProvider.js +1 -1
- package/reporters/mochAwesome/mochAwesomeReporter.js +14 -12
- package/util/TestOutputWriter.js +12 -8
- package/util/actionabilityUtil.js +1 -1
- package/util/analytics.js +9 -6
- package/util/browserTestUtils.js +2 -1
- package/util/markdownUtil.js +11 -9
package/coreWebVitals/index.js
CHANGED
|
@@ -15,43 +15,46 @@ function attachListeners() {
|
|
|
15
15
|
}
|
|
16
16
|
exports.attachListeners = attachListeners;
|
|
17
17
|
function handleNavigationEvent(eventName, callback) {
|
|
18
|
+
var _a;
|
|
18
19
|
const performanceEntries = performance.getEntriesByType('navigation');
|
|
19
|
-
const navigationTiming = performanceEntries
|
|
20
|
-
const eventTimestamp = navigationTiming
|
|
20
|
+
const navigationTiming = performanceEntries === null || performanceEntries === void 0 ? void 0 : performanceEntries[0];
|
|
21
|
+
const eventTimestamp = navigationTiming === null || navigationTiming === void 0 ? void 0 : navigationTiming[eventName];
|
|
21
22
|
callback({
|
|
22
23
|
name: eventName,
|
|
23
24
|
value: eventTimestamp,
|
|
24
25
|
delta: eventTimestamp,
|
|
25
26
|
rating: 'none',
|
|
26
27
|
id: `NAV:${eventName}:${eventTimestamp}:${Date.now()}`,
|
|
27
|
-
entries: performanceEntries
|
|
28
|
-
navigationType: navigationTiming
|
|
28
|
+
entries: performanceEntries === null || performanceEntries === void 0 ? void 0 : performanceEntries.map((entry) => entry === null || entry === void 0 ? void 0 : entry.toJSON()),
|
|
29
|
+
navigationType: (_a = navigationTiming === null || navigationTiming === void 0 ? void 0 : navigationTiming.type) !== null && _a !== void 0 ? _a : 'navigate',
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
function pollForEventTimestamp(eventName, callback, navigationTiming) {
|
|
33
|
+
var _a;
|
|
32
34
|
navigationTiming =
|
|
33
|
-
navigationTiming
|
|
34
|
-
|
|
35
|
-
if (navigationTiming?.[eventName]) {
|
|
35
|
+
navigationTiming !== null && navigationTiming !== void 0 ? navigationTiming : (_a = performance.getEntriesByType('navigation')) === null || _a === void 0 ? void 0 : _a[0];
|
|
36
|
+
if (navigationTiming === null || navigationTiming === void 0 ? void 0 : navigationTiming[eventName]) {
|
|
36
37
|
handleNavigationEvent(eventName, callback);
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
let attempts = 0;
|
|
40
41
|
const interval = window.setInterval(() => {
|
|
42
|
+
var _a;
|
|
41
43
|
attempts++;
|
|
42
|
-
const navigationTiming = performance.getEntriesByType('navigation')
|
|
43
|
-
if (navigationTiming
|
|
44
|
+
const navigationTiming = (_a = performance.getEntriesByType('navigation')) === null || _a === void 0 ? void 0 : _a[0];
|
|
45
|
+
if ((navigationTiming === null || navigationTiming === void 0 ? void 0 : navigationTiming[eventName]) || attempts >= POLLING_MAX_ATTEMPTS) {
|
|
44
46
|
handleNavigationEvent(eventName, callback);
|
|
45
47
|
window.clearInterval(interval);
|
|
46
48
|
}
|
|
47
49
|
}, POLLING_INTERVAL_MILLIS);
|
|
48
50
|
}
|
|
49
51
|
function onNavigationEvent(callback) {
|
|
50
|
-
|
|
52
|
+
var _a;
|
|
53
|
+
const navigationTiming = (_a = performance.getEntriesByType('navigation')) === null || _a === void 0 ? void 0 : _a[0];
|
|
51
54
|
if (navigationTiming !== undefined) {
|
|
52
55
|
handleNavigationEvent('startTime', callback);
|
|
53
56
|
}
|
|
54
|
-
if (navigationTiming
|
|
57
|
+
if (navigationTiming === null || navigationTiming === void 0 ? void 0 : navigationTiming.domContentLoadedEventEnd) {
|
|
55
58
|
handleNavigationEvent('domContentLoadedEventEnd', callback);
|
|
56
59
|
}
|
|
57
60
|
else {
|
|
@@ -61,13 +64,14 @@ function onNavigationEvent(callback) {
|
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
const sendMetric = (metric) => {
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
var _a, _b, _c;
|
|
68
|
+
const navigationTiming = (_a = performance.getEntriesByType('navigation')) === null || _a === void 0 ? void 0 : _a[0];
|
|
69
|
+
(_c = (_b = window).dispatchMablEvent) === null || _c === void 0 ? void 0 : _c.call(_b, {
|
|
66
70
|
createdTime: Date.now(),
|
|
67
71
|
timeOrigin: performance.timeOrigin,
|
|
68
72
|
type: 'WEB_PERFORMANCE_METRIC_DETECTED',
|
|
69
73
|
currentUrl: window.document.URL,
|
|
70
|
-
navigationUrl: navigationTiming
|
|
74
|
+
navigationUrl: navigationTiming === null || navigationTiming === void 0 ? void 0 : navigationTiming.name,
|
|
71
75
|
metric,
|
|
72
76
|
});
|
|
73
77
|
};
|