@bigbinary/neeto-commons-frontend 2.1.35 → 2.1.37
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/README.md +1 -1
- package/cypress-utils.cjs.js +11 -2
- package/cypress-utils.cjs.js.map +1 -1
- package/cypress-utils.js +11 -3
- package/cypress-utils.js.map +1 -1
- package/initializers.cjs.js +1762 -1796
- package/initializers.cjs.js.map +1 -1
- package/initializers.js +1763 -1797
- package/initializers.js.map +1 -1
- package/package.json +1 -1
- package/utils.cjs.js.map +1 -1
- package/utils.js.map +1 -1
package/README.md
CHANGED
package/cypress-utils.cjs.js
CHANGED
|
@@ -133,6 +133,14 @@ var joinHyphenCase = function joinHyphenCase() {
|
|
|
133
133
|
}
|
|
134
134
|
return args.join(" ").replace(/\s+/g, "-").toLowerCase();
|
|
135
135
|
};
|
|
136
|
+
var hyphenize = function hyphenize(input) {
|
|
137
|
+
var fallbackString = "";
|
|
138
|
+
if (typeof input === "number") return String(input);
|
|
139
|
+
if (input && typeof input === "string" && input.replace) {
|
|
140
|
+
return input.replace(/[\s_]/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/-+/g, "-").toLowerCase();
|
|
141
|
+
}
|
|
142
|
+
return fallbackString;
|
|
143
|
+
};
|
|
136
144
|
var initializeCredentials = function initializeCredentials(stagingData) {
|
|
137
145
|
cy.task("getGlobalState").then(function (state) {
|
|
138
146
|
var newState = _objectSpread$2(_objectSpread$2({}, state), {}, {
|
|
@@ -196,7 +204,7 @@ var commonSelectors = {
|
|
|
196
204
|
paneHeader: ".neeto-ui-pane__header",
|
|
197
205
|
profileSidebar: ".neeto-ui-profile-sidebar",
|
|
198
206
|
selectOption: function selectOption(label) {
|
|
199
|
-
return dataCy("".concat(
|
|
207
|
+
return dataCy("".concat(hyphenize(label), "-select-option"));
|
|
200
208
|
},
|
|
201
209
|
toastMessage: dataCy("toastr-message-container"),
|
|
202
210
|
toastCloseButton: ".neeto-ui-toastr__close-button",
|
|
@@ -366,7 +374,7 @@ var initCustomCommands = function initCustomCommands() {
|
|
|
366
374
|
});
|
|
367
375
|
Cypress.Commands.add("selectOption", function (containerSelector, optionText) {
|
|
368
376
|
cy.get(containerSelector).click().type(optionText);
|
|
369
|
-
cy.get(commonSelectors.selectOption(optionText
|
|
377
|
+
cy.get(commonSelectors.selectOption(optionText)).invoke("click");
|
|
370
378
|
});
|
|
371
379
|
Cypress.Commands.add("clickDropdownOption", function (optionText) {
|
|
372
380
|
var dropdownSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : commonSelectors.dropdownIcon;
|
|
@@ -1739,6 +1747,7 @@ exports.getTestTitle = getTestTitle;
|
|
|
1739
1747
|
exports.getUrl = getUrl;
|
|
1740
1748
|
exports.helpIconSelectors = helpIconSelectors;
|
|
1741
1749
|
exports.helpIconTexts = helpIconTexts;
|
|
1750
|
+
exports.hyphenize = hyphenize;
|
|
1742
1751
|
exports.initCustomCommands = initCustomCommands;
|
|
1743
1752
|
exports.initializeCredentials = initializeCredentials;
|
|
1744
1753
|
exports.isStagingEnv = isStagingEnv;
|