@coolon/angular-ui-powerups 12.4.0-alpha.22 → 12.4.0-alpha.24
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/bundles/coolon-angular-ui-powerups-cypress.umd.js +101 -24
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
- package/cypress/builder.d.ts +27 -0
- package/cypress/components/aup-abstract-activity.d.ts +23 -1
- package/cypress/components/aup-alert-dialog.d.ts +22 -2
- package/cypress/components/aup-confirm-dialog.d.ts +27 -0
- package/cypress/components/aup-confirm.d.ts +11 -0
- package/cypress/components/aup-modal-activity.d.ts +22 -2
- package/cypress/components/aup-modal-mixin.d.ts +23 -0
- package/cypress/components/button.d.ts +2 -1
- package/cypress/components/form-element-mixin.d.ts +2 -1
- package/cypress/components/mat-checkbox.d.ts +2 -1
- package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
- package/cypress/exports.d.ts +3 -0
- package/cypress/page-builder.d.ts +2 -1
- package/cypress/page-element.d.ts +3 -1
- package/esm2015/cypress/builder.js +11 -0
- package/esm2015/cypress/builder.js.map +1 -1
- package/esm2015/cypress/builder.metadata.json +1 -1
- package/esm2015/cypress/components/aup-abstract-activity.js +3 -3
- package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -1
- package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -1
- package/esm2015/cypress/components/aup-alert-dialog.js +2 -6
- package/esm2015/cypress/components/aup-alert-dialog.js.map +1 -1
- package/esm2015/cypress/components/aup-alert-dialog.metadata.json +1 -1
- package/esm2015/cypress/components/aup-confirm-dialog.js +8 -0
- package/esm2015/cypress/components/aup-confirm-dialog.js.map +1 -0
- package/esm2015/cypress/components/aup-confirm-dialog.metadata.json +1 -0
- package/esm2015/cypress/components/aup-confirm.js +19 -0
- package/esm2015/cypress/components/aup-confirm.js.map +1 -0
- package/esm2015/cypress/components/aup-confirm.metadata.json +1 -0
- package/esm2015/cypress/components/aup-modal-activity.js +2 -4
- package/esm2015/cypress/components/aup-modal-activity.js.map +1 -1
- package/esm2015/cypress/components/aup-modal-activity.metadata.json +1 -1
- package/esm2015/cypress/components/aup-modal-mixin.js +18 -0
- package/esm2015/cypress/components/aup-modal-mixin.js.map +1 -0
- package/esm2015/cypress/components/aup-modal-mixin.metadata.json +1 -0
- package/esm2015/cypress/exports.js +3 -0
- package/esm2015/cypress/exports.js.map +1 -1
- package/esm2015/cypress/exports.metadata.json +1 -1
- package/esm2015/cypress/page-builder.js +4 -3
- package/esm2015/cypress/page-builder.js.map +1 -1
- package/esm2015/cypress/page-builder.metadata.json +1 -1
- package/esm2015/cypress/page-element.js +10 -6
- package/esm2015/cypress/page-element.js.map +1 -1
- package/esm2015/cypress/page-element.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups-cypress.js +70 -21
- package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
- package/package.json +1 -1
|
@@ -357,12 +357,16 @@
|
|
|
357
357
|
var PageElement = /** @class */ (function () {
|
|
358
358
|
function PageElement(parent, selectorOrLocator) {
|
|
359
359
|
this.parent = parent;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
360
|
+
this.domElementLocator = ___namespace.isNil(selectorOrLocator) ?
|
|
361
|
+
this.getDefaultElementLocator() :
|
|
362
|
+
___namespace.isString(selectorOrLocator) ?
|
|
363
|
+
exports.ElementLocator.findByCssSelector(selectorOrLocator) :
|
|
364
|
+
selectorOrLocator;
|
|
364
365
|
}
|
|
365
|
-
PageElement.prototype.
|
|
366
|
+
PageElement.prototype.getDefaultElementLocator = function () {
|
|
367
|
+
return exports.ElementLocator.findByCssSelector(this.getDefaultElementSelector());
|
|
368
|
+
};
|
|
369
|
+
PageElement.prototype.getDefaultElementSelector = function () {
|
|
366
370
|
return typescriptUtilities.Stringy.from(this.constructor.name).dasherize().toString();
|
|
367
371
|
};
|
|
368
372
|
PageElement.prototype.dom = function () {
|
|
@@ -884,7 +888,7 @@
|
|
|
884
888
|
return MatCheckbox;
|
|
885
889
|
}(FormElementMixin(PageElement)));
|
|
886
890
|
|
|
887
|
-
|
|
891
|
+
exports.Builder = /** @class */ (function () {
|
|
888
892
|
function Builder(parentPageElement) {
|
|
889
893
|
this.parentPageElement = parentPageElement;
|
|
890
894
|
}
|
|
@@ -952,6 +956,24 @@
|
|
|
952
956
|
};
|
|
953
957
|
return Builder;
|
|
954
958
|
}());
|
|
959
|
+
(function (Builder) {
|
|
960
|
+
function Mixin(Base) {
|
|
961
|
+
return /** @class */ (function (_super) {
|
|
962
|
+
__extends(class_1, _super);
|
|
963
|
+
function class_1() {
|
|
964
|
+
var args = [];
|
|
965
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
966
|
+
args[_i] = arguments[_i];
|
|
967
|
+
}
|
|
968
|
+
var _this = _super.apply(this, __spreadArray([], __read(args))) || this;
|
|
969
|
+
_this.builder = new Builder(_this);
|
|
970
|
+
return _this;
|
|
971
|
+
}
|
|
972
|
+
return class_1;
|
|
973
|
+
}(Base));
|
|
974
|
+
}
|
|
975
|
+
Builder.Mixin = Mixin;
|
|
976
|
+
})(exports.Builder || (exports.Builder = {}));
|
|
955
977
|
|
|
956
978
|
var AupAbstractActivity = /** @class */ (function (_super) {
|
|
957
979
|
__extends(AupAbstractActivity, _super);
|
|
@@ -960,12 +982,12 @@
|
|
|
960
982
|
// @ts-ignore
|
|
961
983
|
_super.call(this, parent, selector) || this;
|
|
962
984
|
_this.title = _this.find('aup-activity-title');
|
|
963
|
-
_this._confirmCommand =
|
|
964
|
-
_this._cancelCommand =
|
|
985
|
+
_this._confirmCommand = _this.builder.aupCommand('[data-cy=confirm-command]');
|
|
986
|
+
_this._cancelCommand = _this.builder.aupCommand('[data-cy=cancel-command]');
|
|
965
987
|
return _this;
|
|
966
988
|
}
|
|
967
989
|
return AupAbstractActivity;
|
|
968
|
-
}(PageElement));
|
|
990
|
+
}(exports.Builder.Mixin(PageElement)));
|
|
969
991
|
|
|
970
992
|
var AupAlert = /** @class */ (function (_super) {
|
|
971
993
|
__extends(AupAlert, _super);
|
|
@@ -985,18 +1007,74 @@
|
|
|
985
1007
|
return AupAlert;
|
|
986
1008
|
}(AupAbstractActivity));
|
|
987
1009
|
|
|
1010
|
+
function AupModalMixin(Base) {
|
|
1011
|
+
return /** @class */ (function (_super) {
|
|
1012
|
+
__extends(class_1, _super);
|
|
1013
|
+
function class_1() {
|
|
1014
|
+
var args = [];
|
|
1015
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1016
|
+
args[_i] = arguments[_i];
|
|
1017
|
+
}
|
|
1018
|
+
return _super.apply(this, __spreadArray([], __read(args))) || this;
|
|
1019
|
+
}
|
|
1020
|
+
class_1.prototype.getDefaultElementLocator = function () {
|
|
1021
|
+
var _this = this;
|
|
1022
|
+
return function (parent) {
|
|
1023
|
+
return parent.dom().closest('body').find(_this.getDefaultElementSelector());
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
class_1.prototype.clickBackdrop = function () {
|
|
1027
|
+
this.dom()
|
|
1028
|
+
.closest(".cdk-overlay-container")
|
|
1029
|
+
.find(".cdk-overlay-backdrop").click(-50, -50, { force: true });
|
|
1030
|
+
};
|
|
1031
|
+
return class_1;
|
|
1032
|
+
}(Base));
|
|
1033
|
+
}
|
|
1034
|
+
|
|
988
1035
|
var AupAlertDialog = /** @class */ (function (_super) {
|
|
989
1036
|
__extends(AupAlertDialog, _super);
|
|
990
1037
|
function AupAlertDialog(parent, selector) {
|
|
991
1038
|
return _super.call(this, parent, selector) || this;
|
|
992
1039
|
}
|
|
993
|
-
AupAlertDialog.prototype.clickBackdrop = function () {
|
|
994
|
-
this.dom()
|
|
995
|
-
.closest(".cdk-overlay-container")
|
|
996
|
-
.find(".cdk-overlay-backdrop").click(-50, -50, { force: true });
|
|
997
|
-
};
|
|
998
1040
|
return AupAlertDialog;
|
|
999
|
-
}(AupAlert));
|
|
1041
|
+
}(AupModalMixin(AupAlert)));
|
|
1042
|
+
|
|
1043
|
+
var AupConfirm = /** @class */ (function (_super) {
|
|
1044
|
+
__extends(AupConfirm, _super);
|
|
1045
|
+
function AupConfirm(parent, selector) {
|
|
1046
|
+
return _super.call(this, parent, selector) || this;
|
|
1047
|
+
}
|
|
1048
|
+
Object.defineProperty(AupConfirm.prototype, "confirmCommand", {
|
|
1049
|
+
get: function () {
|
|
1050
|
+
return this._confirmCommand;
|
|
1051
|
+
},
|
|
1052
|
+
enumerable: false,
|
|
1053
|
+
configurable: true
|
|
1054
|
+
});
|
|
1055
|
+
AupConfirm.prototype.clickConfirm = function () {
|
|
1056
|
+
this.confirmCommand.click();
|
|
1057
|
+
};
|
|
1058
|
+
Object.defineProperty(AupConfirm.prototype, "cancelCommand", {
|
|
1059
|
+
get: function () {
|
|
1060
|
+
return this._cancelCommand;
|
|
1061
|
+
},
|
|
1062
|
+
enumerable: false,
|
|
1063
|
+
configurable: true
|
|
1064
|
+
});
|
|
1065
|
+
AupConfirm.prototype.clickCancel = function () {
|
|
1066
|
+
this.cancelCommand.click();
|
|
1067
|
+
};
|
|
1068
|
+
return AupConfirm;
|
|
1069
|
+
}(AupAbstractActivity));
|
|
1070
|
+
|
|
1071
|
+
var AupConfirmDialog = /** @class */ (function (_super) {
|
|
1072
|
+
__extends(AupConfirmDialog, _super);
|
|
1073
|
+
function AupConfirmDialog(parent, selector) {
|
|
1074
|
+
return _super.call(this, parent, selector) || this;
|
|
1075
|
+
}
|
|
1076
|
+
return AupConfirmDialog;
|
|
1077
|
+
}(AupModalMixin(AupConfirm)));
|
|
1000
1078
|
|
|
1001
1079
|
var AupActivity = /** @class */ (function (_super) {
|
|
1002
1080
|
__extends(AupActivity, _super);
|
|
@@ -1025,11 +1103,8 @@
|
|
|
1025
1103
|
function AupModalActivity() {
|
|
1026
1104
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1027
1105
|
}
|
|
1028
|
-
AupModalActivity.prototype.clickBackdrop = function () {
|
|
1029
|
-
this.dom().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
|
|
1030
|
-
};
|
|
1031
1106
|
return AupModalActivity;
|
|
1032
|
-
}(AupActivity));
|
|
1107
|
+
}(AupModalMixin(AupActivity)));
|
|
1033
1108
|
|
|
1034
1109
|
var PageBuilder = /** @class */ (function (_super) {
|
|
1035
1110
|
__extends(PageBuilder, _super);
|
|
@@ -1037,16 +1112,16 @@
|
|
|
1037
1112
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1038
1113
|
}
|
|
1039
1114
|
PageBuilder.prototype.aupModalActivity = function (selector, builder) {
|
|
1040
|
-
return this.component(AupModalActivity,
|
|
1115
|
+
return this.component(AupModalActivity, selector, builder);
|
|
1041
1116
|
};
|
|
1042
1117
|
PageBuilder.prototype.aupModalAlert = function (builder) {
|
|
1043
|
-
return this.component(AupAlertDialog,
|
|
1118
|
+
return this.component(AupAlertDialog, builder);
|
|
1044
1119
|
};
|
|
1045
1120
|
PageBuilder.prototype.aupModelConfirm = function (builder) {
|
|
1046
|
-
return this.
|
|
1121
|
+
return this.component(AupConfirmDialog, builder);
|
|
1047
1122
|
};
|
|
1048
1123
|
return PageBuilder;
|
|
1049
|
-
}(Builder));
|
|
1124
|
+
}(exports.Builder));
|
|
1050
1125
|
|
|
1051
1126
|
var urlSerialiser = new router.DefaultUrlSerializer();
|
|
1052
1127
|
exports.Path = /** @class */ (function () {
|
|
@@ -1243,8 +1318,11 @@
|
|
|
1243
1318
|
exports.AupCommand = AupCommand;
|
|
1244
1319
|
exports.AupCommandFace = AupCommandFace;
|
|
1245
1320
|
exports.AupCommandGroup = AupCommandGroup;
|
|
1321
|
+
exports.AupConfirm = AupConfirm;
|
|
1322
|
+
exports.AupConfirmDialog = AupConfirmDialog;
|
|
1246
1323
|
exports.AupEmptyState = AupEmptyState;
|
|
1247
1324
|
exports.AupModalActivity = AupModalActivity;
|
|
1325
|
+
exports.AupModalMixin = AupModalMixin;
|
|
1248
1326
|
exports.AupMoreMenu = AupMoreMenu;
|
|
1249
1327
|
exports.AupNavigation = AupNavigation;
|
|
1250
1328
|
exports.AupPopupMenu = AupPopupMenu;
|
|
@@ -1256,7 +1334,6 @@
|
|
|
1256
1334
|
exports.AupTableSelectionCell = AupTableSelectionCell;
|
|
1257
1335
|
exports.AupTableSelectionColumn = AupTableSelectionColumn;
|
|
1258
1336
|
exports.AupToolBar = AupToolBar;
|
|
1259
|
-
exports.Builder = Builder;
|
|
1260
1337
|
exports.Button = Button;
|
|
1261
1338
|
exports.FormElementMixin = FormElementMixin;
|
|
1262
1339
|
exports.MatCheckbox = MatCheckbox;
|