@bigbinary/neeto-commons-frontend 2.1.24 → 2.1.25
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/cypress-utils.cjs.js +6 -3
- package/cypress-utils.cjs.js.map +1 -1
- package/cypress-utils.js +6 -3
- package/cypress-utils.js.map +1 -1
- package/package.json +1 -1
package/cypress-utils.cjs.js
CHANGED
|
@@ -195,7 +195,9 @@ var commonSelectors = {
|
|
|
195
195
|
paneBody: ".neeto-ui-pane__body",
|
|
196
196
|
paneHeader: ".neeto-ui-pane__header",
|
|
197
197
|
profileSidebar: ".neeto-ui-profile-sidebar",
|
|
198
|
-
selectOption:
|
|
198
|
+
selectOption: function selectOption(label) {
|
|
199
|
+
return dataCy("".concat(joinHyphenCase(label), "-select-option"));
|
|
200
|
+
},
|
|
199
201
|
toastMessage: dataCy("toastr-message-container"),
|
|
200
202
|
toastCloseButton: ".neeto-ui-toastr__close-button",
|
|
201
203
|
windowAlert: "#alert-box",
|
|
@@ -364,7 +366,7 @@ var initCustomCommands = function initCustomCommands() {
|
|
|
364
366
|
});
|
|
365
367
|
Cypress.Commands.add("selectOption", function (containerSelector, optionText) {
|
|
366
368
|
cy.get(containerSelector).click().type(optionText);
|
|
367
|
-
cy.
|
|
369
|
+
cy.get(commonSelectors.selectOption(optionText.split("_").join("-").toLowerCase())).invoke("click");
|
|
368
370
|
});
|
|
369
371
|
Cypress.Commands.add("clickDropdownOption", function (optionText) {
|
|
370
372
|
var dropdownSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : commonSelectors.dropdownIcon;
|
|
@@ -759,7 +761,8 @@ var uniqueDepartment = function uniqueDepartment() {
|
|
|
759
761
|
max: 100
|
|
760
762
|
});
|
|
761
763
|
};
|
|
762
|
-
var phoneNumber = function phoneNumber(
|
|
764
|
+
var phoneNumber = function phoneNumber() {
|
|
765
|
+
var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "9#########";
|
|
763
766
|
return faker.faker.phone.number(format);
|
|
764
767
|
};
|
|
765
768
|
var secureUrl = function secureUrl() {
|