@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.cjs.js
CHANGED
|
@@ -138,7 +138,7 @@ var initializeCredentials = function initializeCredentials(stagingData) {
|
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
var allPath = function allPath() {
|
|
141
|
-
return "".concat(Cypress.config("baseUrl")
|
|
141
|
+
return "".concat(Cypress.config("baseUrl"), "/**");
|
|
142
142
|
};
|
|
143
143
|
var requestApis = {
|
|
144
144
|
countries: getUrl("countries"),
|
|
@@ -152,7 +152,7 @@ var requestApis = {
|
|
|
152
152
|
return "/team_members/teams/".concat(id);
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
|
-
allChatPath: "https
|
|
155
|
+
allChatPath: "https://*.neetochat.net".concat(getUrl("**")),
|
|
156
156
|
myProfilePath: function myProfilePath(subdomain) {
|
|
157
157
|
return "https://".concat(subdomain, ".neetoauth.net/my/profile");
|
|
158
158
|
},
|
|
@@ -316,8 +316,9 @@ var initCustomCommands = function initCustomCommands() {
|
|
|
316
316
|
});
|
|
317
317
|
Cypress.Commands.add("interceptApi", function (alias) {
|
|
318
318
|
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
319
|
-
return cy.intercept({
|
|
319
|
+
return times > 0 && cy.intercept({
|
|
320
320
|
url: requestApis.allPath,
|
|
321
|
+
resourceType: "xhr",
|
|
321
322
|
times: times
|
|
322
323
|
}).as(alias);
|
|
323
324
|
});
|
|
@@ -1227,6 +1228,19 @@ var verifyWhatsNewTab = function verifyWhatsNewTab(whatsNewHeading) {
|
|
|
1227
1228
|
cy.get(helpIconSelectors.whatsNewWidgetCloseButton).last().click();
|
|
1228
1229
|
cy.get(helpIconSelectors.whatsNewWidgetInfo).should("not.exist");
|
|
1229
1230
|
};
|
|
1231
|
+
var waitForChatWidget = function waitForChatWidget() {
|
|
1232
|
+
var timeOut = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
1233
|
+
var defaultWait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
1234
|
+
if (timeOut === 0) return;
|
|
1235
|
+
cy.ifNotExist(chatWidgetSelectors.widgetIframe, function () {
|
|
1236
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
1237
|
+
cy.wait(defaultWait);
|
|
1238
|
+
navigationUtils.clickOnHelpSubTab(helpIconSelectors.chatButton, helpIconTexts.liveChat);
|
|
1239
|
+
cy.ifNotExist(chatWidgetSelectors.widgetIframe, function () {
|
|
1240
|
+
waitForChatWidget(timeOut - 1);
|
|
1241
|
+
});
|
|
1242
|
+
});
|
|
1243
|
+
};
|
|
1230
1244
|
var verifyChatWithUsTab = function verifyChatWithUsTab(_ref3) {
|
|
1231
1245
|
var alias = _ref3.alias,
|
|
1232
1246
|
_ref3$requestCount = _ref3.requestCount,
|
|
@@ -1238,6 +1252,7 @@ var verifyChatWithUsTab = function verifyChatWithUsTab(_ref3) {
|
|
|
1238
1252
|
});
|
|
1239
1253
|
clickOnHelpSubTab(helpIconSelectors.chatButton, helpIconTexts.liveChat);
|
|
1240
1254
|
requestCount && cy.waitForMultipleRequest("@".concat(alias), requestCount);
|
|
1255
|
+
waitForChatWidget();
|
|
1241
1256
|
cy.withinIframe(chatWidgetSelectors.widgetIframe, function () {
|
|
1242
1257
|
requestCount && cy.interceptNonVersionedApi({
|
|
1243
1258
|
url: requestApis.allChatPath,
|