@bigbinary/neeto-commons-frontend 2.0.101 → 2.0.103
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 +18 -3
- package/cypress-utils.cjs.js.map +1 -1
- package/cypress-utils.js +18 -3
- package/cypress-utils.js.map +1 -1
- package/initializers.cjs.js +0 -243
- package/initializers.cjs.js.map +1 -1
- package/initializers.js +0 -243
- package/initializers.js.map +1 -1
- package/package.json +1 -1
- package/utils.d.ts +2 -2
package/cypress-utils.js
CHANGED
|
@@ -130,7 +130,7 @@ var initializeCredentials = function initializeCredentials(stagingData) {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
var allPath = function allPath() {
|
|
133
|
-
return "".concat(Cypress.config("baseUrl")
|
|
133
|
+
return "".concat(Cypress.config("baseUrl"), "/**");
|
|
134
134
|
};
|
|
135
135
|
var requestApis = {
|
|
136
136
|
countries: getUrl("countries"),
|
|
@@ -144,7 +144,7 @@ var requestApis = {
|
|
|
144
144
|
return "/team_members/teams/".concat(id);
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
|
-
allChatPath: "https
|
|
147
|
+
allChatPath: "https://*.neetochat.net".concat(getUrl("**")),
|
|
148
148
|
myProfilePath: function myProfilePath(subdomain) {
|
|
149
149
|
return "https://".concat(subdomain, ".neetoauth.net/my/profile");
|
|
150
150
|
},
|
|
@@ -308,8 +308,9 @@ var initCustomCommands = function initCustomCommands() {
|
|
|
308
308
|
});
|
|
309
309
|
Cypress.Commands.add("interceptApi", function (alias) {
|
|
310
310
|
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
311
|
-
return cy.intercept({
|
|
311
|
+
return times > 0 && cy.intercept({
|
|
312
312
|
url: requestApis.allPath,
|
|
313
|
+
resourceType: "xhr",
|
|
313
314
|
times: times
|
|
314
315
|
}).as(alias);
|
|
315
316
|
});
|
|
@@ -1219,6 +1220,19 @@ var verifyWhatsNewTab = function verifyWhatsNewTab(whatsNewHeading) {
|
|
|
1219
1220
|
cy.get(helpIconSelectors.whatsNewWidgetCloseButton).last().click();
|
|
1220
1221
|
cy.get(helpIconSelectors.whatsNewWidgetInfo).should("not.exist");
|
|
1221
1222
|
};
|
|
1223
|
+
var waitForChatWidget = function waitForChatWidget() {
|
|
1224
|
+
var timeOut = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
1225
|
+
var defaultWait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
1226
|
+
if (timeOut === 0) return;
|
|
1227
|
+
cy.ifNotExist(chatWidgetSelectors.widgetIframe, function () {
|
|
1228
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
1229
|
+
cy.wait(defaultWait);
|
|
1230
|
+
navigationUtils.clickOnHelpSubTab(helpIconSelectors.chatButton, helpIconTexts.liveChat);
|
|
1231
|
+
cy.ifNotExist(chatWidgetSelectors.widgetIframe, function () {
|
|
1232
|
+
waitForChatWidget(timeOut - 1);
|
|
1233
|
+
});
|
|
1234
|
+
});
|
|
1235
|
+
};
|
|
1222
1236
|
var verifyChatWithUsTab = function verifyChatWithUsTab(_ref3) {
|
|
1223
1237
|
var alias = _ref3.alias,
|
|
1224
1238
|
_ref3$requestCount = _ref3.requestCount,
|
|
@@ -1230,6 +1244,7 @@ var verifyChatWithUsTab = function verifyChatWithUsTab(_ref3) {
|
|
|
1230
1244
|
});
|
|
1231
1245
|
clickOnHelpSubTab(helpIconSelectors.chatButton, helpIconTexts.liveChat);
|
|
1232
1246
|
requestCount && cy.waitForMultipleRequest("@".concat(alias), requestCount);
|
|
1247
|
+
waitForChatWidget();
|
|
1233
1248
|
cy.withinIframe(chatWidgetSelectors.widgetIframe, function () {
|
|
1234
1249
|
requestCount && cy.interceptNonVersionedApi({
|
|
1235
1250
|
url: requestApis.allChatPath,
|