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.
- package/lib/api/structure/interfaces.js +1 -1
- package/lib/client/driver/index.js +3 -1
- package/lib/client/driver/index.min.js +1 -1
- package/lib/configuration/types.js +1 -1
- package/lib/errors/runtime/index.js +29 -17
- package/lib/native-automation/request-pipeline/index.js +9 -8
- package/lib/reporter/index.js +1 -1
- package/lib/runner/index.js +3 -13
- package/lib/runner/task/index.js +2 -4
- package/lib/screenshots/capturer.js +8 -19
- package/lib/screenshots/index.js +4 -23
- package/package.json +2 -2
- package/ts-defs/index.d.ts +3 -3
- package/ts-defs/selectors.d.ts +3 -3
- package/ts-defs/testcafe-scripts.d.ts +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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
|
-
|
|
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); };
|