testcafe 3.0.0-rc.1 → 3.0.0

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.
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcGkvc3RydWN0dXJlL2ludGVyZmFjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpY3Rpb25hcnkgfSBmcm9tICcuLi8uLi9jb25maWd1cmF0aW9uL2ludGVyZmFjZXMnO1xuaW1wb3J0IFRlc3RUaW1lb3V0IGZyb20gJy4vdGVzdC10aW1lb3V0JztcblxuZXhwb3J0IHR5cGUgTWV0YWRhdGEgPSBEaWN0aW9uYXJ5PHN0cmluZz47XG5cbmV4cG9ydCBpbnRlcmZhY2UgQXV0aENyZWRlbnRpYWxzIHtcbiAgICB1c2VybmFtZTogc3RyaW5nO1xuICAgIHBhc3N3b3JkOiBzdHJpbmc7XG4gICAgZG9tYWluPzogc3RyaW5nO1xuICAgIHdvcmtzdGF0aW9uPzogc3RyaW5nO1xufVxuXG5leHBvcnQgdHlwZSBUZXN0VGltZW91dHMgPSB7XG4gICAgW2tleSBpbiBUZXN0VGltZW91dF0/OiBudW1iZXI7XG59XG4iXX0=
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcGkvc3RydWN0dXJlL2ludGVyZmFjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpY3Rpb25hcnkgfSBmcm9tICcuLi8uLi9jb25maWd1cmF0aW9uL2ludGVyZmFjZXMnO1xuaW1wb3J0IFRlc3RUaW1lb3V0IGZyb20gJy4vdGVzdC10aW1lb3V0JztcblxuZXhwb3J0IHR5cGUgTWV0YWRhdGEgPSBEaWN0aW9uYXJ5PHVua25vd24+O1xuXG5leHBvcnQgaW50ZXJmYWNlIEF1dGhDcmVkZW50aWFscyB7XG4gICAgdXNlcm5hbWU6IHN0cmluZztcbiAgICBwYXNzd29yZDogc3RyaW5nO1xuICAgIGRvbWFpbj86IHN0cmluZztcbiAgICB3b3Jrc3RhdGlvbj86IHN0cmluZztcbn1cblxuZXhwb3J0IHR5cGUgVGVzdFRpbWVvdXRzID0ge1xuICAgIFtrZXkgaW4gVGVzdFRpbWVvdXRdPzogbnVtYmVyO1xufVxuIl19
@@ -1736,6 +1736,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
1736
1736
  var UNEXPECTED_DIALOG = 'testcafe|native-dialog-tracker|unexpected-dialog';
1737
1737
  var ERROR_IN_HANDLER = 'testcafe|native-dialog-tracker|error-in-handler';
1738
1738
  var GETTING_PAGE_URL_PROCESSED_SCRIPT = processScript('window.location.href');
1739
+ var NATIVE_DIALOG_TYPES = ['alert', 'confirm', 'prompt', 'print'];
1739
1740
  var NativeDialogTracker = /** @class */ (function () {
1740
1741
  function NativeDialogTracker(contextStorage, _a) {
1741
1742
  var _b = _a === void 0 ? {} : _a, dialogHandler = _b.dialogHandler;
@@ -1815,6 +1816,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
1815
1816
  window.alert = function () { return _this._defaultDialogHandler('alert'); };
1816
1817
  window.confirm = function () { return _this._defaultDialogHandler('confirm'); };
1817
1818
  window.prompt = function () { return _this._defaultDialogHandler('prompt'); };
1819
+ window.print = function () { return _this._defaultDialogHandler('print'); };
1818
1820
  };
1819
1821
  NativeDialogTracker.prototype._createDialogHandler = function (type) {
1820
1822
  var _this = this;
@@ -1847,7 +1849,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
1847
1849
  NativeDialogTracker.prototype.setHandler = function (dialogHandler) {
1848
1850
  var _this = this;
1849
1851
  this.dialogHandler = dialogHandler;
1850
- ['alert', 'confirm', 'prompt'].forEach(function (dialogType) {
1852
+ NATIVE_DIALOG_TYPES.forEach(function (dialogType) {
1851
1853
  window[dialogType] = _this.dialogHandler ?
1852
1854
  _this._createDialogHandler(dialogType) :
1853
1855
  function () { return _this._defaultDialogHandler(dialogType); };