@mablhq/mabl-cli 1.13.17 → 1.13.19

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.
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.PlaywrightFrame = void 0;
23
23
  const browserLauncher_1 = require("../browserLauncher");
24
24
  const playwright = __importStar(require("@playwright/test"));
25
+ const types_1 = require("../types");
25
26
  const utils_1 = require("../utils");
26
27
  const playwrightHttpResponse_1 = require("./playwrightHttpResponse");
27
28
  const playwrightDom_1 = require("./playwrightDom");
@@ -117,7 +118,16 @@ class PlaywrightFrame extends browserLauncher_1.Frame {
117
118
  }
118
119
  async goto(url, options) {
119
120
  try {
121
+ const waitForNetworkIdle = (options === null || options === void 0 ? void 0 : options.waitUntil) === types_1.LifecycleEvent.NetworkIdle;
122
+ if (options && waitForNetworkIdle) {
123
+ options.waitUntil = types_1.LifecycleEvent.Load;
124
+ }
120
125
  const response = await this.frame.goto(url, options);
126
+ if (waitForNetworkIdle) {
127
+ await this.frame.waitForLoadState('networkidle', {
128
+ timeout: types_1.DefaultTimeouts.quickActionTimeoutMs,
129
+ });
130
+ }
121
131
  return utils_1.mapIfNotNull(response, (response) => new playwrightHttpResponse_1.PlaywrightHttpResponse(this.parentPage, response));
122
132
  }
123
133
  catch (e) {