@bigbinary/neeto-playwright-commons 1.9.26 → 1.9.28

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/index.d.ts CHANGED
@@ -362,9 +362,9 @@ declare class MailosaurUtils {
362
362
  * email: `someone@${process.env.MAILOSAUR_SERVER_ID}.mailosaur.net`,
363
363
  * subjectSubstring: "is your OTP",
364
364
  * timeout: 60 * 1000,
365
- * receivedAfter: new Date()
366
- * })
367
- * })
365
+ * receivedAfter: new Date(),
366
+ * });
367
+ * });
368
368
  * @endexample
369
369
  */
370
370
  getEmailContent: ({
@@ -400,9 +400,9 @@ declare class MailosaurUtils {
400
400
  * email: `someone@${process.env.MAILOSAUR_SERVER_ID}.mailosaur.net`,
401
401
  * subjectSubstring: "is your OTP",
402
402
  * timeout: 60 * 1000,
403
- * receivedAfter: new Date()
404
- * })
405
- * })
403
+ * receivedAfter: new Date(),
404
+ * });
405
+ * });
406
406
  * @endexample
407
407
  */
408
408
  fetchOtpFromEmail: FetchOtpFromEmail;
@@ -414,7 +414,7 @@ declare class MailosaurUtils {
414
414
  *
415
415
  * test("sample test", async ({ mailosaurUtils }) => {
416
416
  * const email = mailosaurUtils.generateRandomMailosaurEmail();
417
- * })
417
+ * });
418
418
  * @endexample
419
419
  */
420
420
  generateRandomMailosaurEmail: () => string;
@@ -947,7 +947,7 @@ declare class SlackPage extends IntegrationBase {
947
947
  *
948
948
  * @example
949
949
  *
950
- * await slackPage.setupCloseHandlers(slackWebappPageInstance);
950
+ * await slackPage.setupCloseHandlers(slackWebappPageInstance);
951
951
  * @endexample
952
952
  */
953
953
  setupCloseHandlers: (slackWebappPage?: Page) => Promise<void>;
@@ -963,7 +963,11 @@ declare class SlackPage extends IntegrationBase {
963
963
  *
964
964
  * @example
965
965
  *
966
- * await slackPage.connectAndVerifyIntegration(/example\.com/, customSteps, "general");
966
+ * await slackPage.connectAndVerifyIntegration(
967
+ * /example\.com/,
968
+ * customSteps,
969
+ * "general"
970
+ * );
967
971
  * @endexample
968
972
  */
969
973
  connectAndVerifyIntegration: (redirectUrl: RedirectUrl, customSteps?: AsyncNoArgsFunction, channelToConfigure?: string) => Promise<void>;
@@ -973,7 +977,7 @@ declare class SlackPage extends IntegrationBase {
973
977
  *
974
978
  * @example
975
979
  *
976
- * await slackPage.disconnectAndVerifyIntegration();
980
+ * await slackPage.disconnectAndVerifyIntegration();
977
981
  * @endexample
978
982
  */
979
983
  disconnectAndVerifyIntegration: () => Promise<void>;
@@ -1041,6 +1045,12 @@ declare class SlackPage extends IntegrationBase {
1041
1045
  */
1042
1046
  clickOnChannelListRefreshButton: (refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams) => Promise<void>;
1043
1047
  /**
1048
+ *
1049
+ * Note: Either ENV variables SLACK_WORKSPACE, SLACK_LOGIN_PASSWORD and
1050
+ *
1051
+ * SLACK_LOGIN_EMAIL is required for this method to work or custom credentials
1052
+ *
1053
+ * workspace, loginPassword and loginEmail must be passed.
1044
1054
  *
1045
1055
  * Logs into slack web app. It takes the following parameters:
1046
1056
  *
@@ -1050,13 +1060,13 @@ declare class SlackPage extends IntegrationBase {
1050
1060
  *
1051
1061
  * @example
1052
1062
  *
1053
- * await slackPage.loginToSlackWebapp(slackWebappPageInstance);
1054
- * // OR
1055
- * await slackPage.loginToSlackWebapp(slackWebappPageInstance,{
1056
- * loginEmail:"jhondoe@gmail.com",
1057
- * loginPassword: "123456789",
1058
- * workspace: "your-workspace-name",
1059
- * })
1063
+ * await slackPage.loginToSlackWebapp(slackWebappPageInstance);
1064
+ * // OR
1065
+ * await slackPage.loginToSlackWebapp(slackWebappPageInstance, {
1066
+ * loginEmail: "johndoe@gmail.com",
1067
+ * loginPassword: "123456789",
1068
+ * workspace: "your-workspace-name",
1069
+ * });
1060
1070
  * @endexample
1061
1071
  */
1062
1072
  loginToSlackWebapp: (slackWebappPage: Page, customCredentials?: Record<"workspace" | "loginPassword" | "loginEmail", string | undefined>) => Promise<void>;
@@ -1066,7 +1076,7 @@ declare class SlackPage extends IntegrationBase {
1066
1076
  *
1067
1077
  * @example
1068
1078
  *
1069
- * await slackPage.logoutFromSlackWebApp();
1079
+ * await slackPage.logoutFromSlackWebApp();
1070
1080
  * @endexample
1071
1081
  */
1072
1082
  logoutFromSlackWebApp: () => Promise<void>;
@@ -1078,7 +1088,7 @@ declare class SlackPage extends IntegrationBase {
1078
1088
  *
1079
1089
  * @example
1080
1090
  *
1081
- * await slackPage.goToSlackChannel("general");
1091
+ * await slackPage.goToSlackChannel("general");
1082
1092
  * @endexample
1083
1093
  */
1084
1094
  goToSlackChannel: (slackChannel: string) => Promise<void>;
@@ -1092,7 +1102,10 @@ declare class SlackPage extends IntegrationBase {
1092
1102
  *
1093
1103
  * @example
1094
1104
  *
1095
- * await slackPage.createNewSlackChannel({ channelName: "new-channel", kind: "public" });
1105
+ * await slackPage.createNewSlackChannel({
1106
+ * channelName: "new-channel",
1107
+ * kind: "public",
1108
+ * });
1096
1109
  * @endexample
1097
1110
  */
1098
1111
  createNewSlackChannel: ({
@@ -1110,7 +1123,7 @@ declare class SlackPage extends IntegrationBase {
1110
1123
  *
1111
1124
  * @example
1112
1125
  *
1113
- * await slackPage.deleteSlackChannel("old-channel");
1126
+ * await slackPage.deleteSlackChannel("old-channel");
1114
1127
  * @endexample
1115
1128
  */
1116
1129
  deleteSlackChannel: (channel: string) => Promise<void>;
@@ -1263,7 +1276,7 @@ declare class ZapierPage extends IntegrationBase {
1263
1276
  *
1264
1277
  * @example
1265
1278
  *
1266
- * await zapierPage.loginToZapier(zapierWebPageInstance);
1279
+ * await zapierPage.loginToZapier(zapierWebPageInstance);
1267
1280
  * @endexample
1268
1281
  */
1269
1282
  loginToZapier: (zapierWebPage: Page) => Promise<void>;
@@ -1273,7 +1286,7 @@ declare class ZapierPage extends IntegrationBase {
1273
1286
  *
1274
1287
  * @example
1275
1288
  *
1276
- * await zapierPage.logoutFromZapier();
1289
+ * await zapierPage.logoutFromZapier();
1277
1290
  * @endexample
1278
1291
  */
1279
1292
  logoutFromZapier: () => Promise<void>;
@@ -1285,7 +1298,7 @@ declare class ZapierPage extends IntegrationBase {
1285
1298
  *
1286
1299
  * @example
1287
1300
  *
1288
- * await zapierPage.reconnectAccountAndPublish("your-zapier-api-key");
1301
+ * await zapierPage.reconnectAccountAndPublish("your-zapier-api-key");
1289
1302
  * @endexample
1290
1303
  */
1291
1304
  reconnectAccountAndPublish: (zapierApiKey: string) => Promise<void>;
@@ -1297,7 +1310,7 @@ declare class ZapierPage extends IntegrationBase {
1297
1310
  *
1298
1311
  * @example
1299
1312
  *
1300
- * await zapierPage.deleteAllConnections("https://zapier.com/app/dashboard");
1313
+ * await zapierPage.deleteAllConnections("https://zapier.com/app/dashboard");
1301
1314
  * @endexample
1302
1315
  */
1303
1316
  deleteAllConnections: (zapierAppLink: string) => Promise<void>;
@@ -1313,11 +1326,11 @@ declare class ZapierPage extends IntegrationBase {
1313
1326
  *
1314
1327
  * @example
1315
1328
  *
1316
- * await zapierPage.verifyZapIsTriggered({
1317
- * submittedEmail: "example@example.com",
1318
- * zapTriggeredAfter: new Date(),
1319
- * productName: "neetoChat"
1320
- * });
1329
+ * await zapierPage.verifyZapIsTriggered({
1330
+ * submittedEmail: "example@example.com",
1331
+ * zapTriggeredAfter: new Date(),
1332
+ * productName: "neetoChat",
1333
+ * });
1321
1334
  * @endexample
1322
1335
  */
1323
1336
  verifyZapIsTriggered: ({
@@ -1335,7 +1348,7 @@ declare class ZapierPage extends IntegrationBase {
1335
1348
  *
1336
1349
  * @example
1337
1350
  *
1338
- * await zapierPage.skipIfTaskLimitIsExhausted();
1351
+ * await zapierPage.skipIfTaskLimitIsExhausted();
1339
1352
  * @endexample
1340
1353
  */
1341
1354
  skipIfTaskLimitIsExhausted: () => Promise<void>;
@@ -1349,7 +1362,7 @@ declare class ZapierPage extends IntegrationBase {
1349
1362
  *
1350
1363
  * @example
1351
1364
  *
1352
- * const apiKey = await zapierPage.connectAndVerify({ apiKeyLabel: "Your API Key" });
1365
+ * const apiKey = await zapierPage.connectAndVerify({ apiKeyLabel: "Your API Key" });
1353
1366
  * @endexample
1354
1367
  */
1355
1368
  connectAndVerify: ({
@@ -1363,7 +1376,7 @@ declare class ZapierPage extends IntegrationBase {
1363
1376
  *
1364
1377
  * @example
1365
1378
  *
1366
- * await zapierPage.disconnectAndVerify();
1379
+ * await zapierPage.disconnectAndVerify();
1367
1380
  * @endexample
1368
1381
  */
1369
1382
  disconnectAndVerify: () => Promise<void>;
@@ -1716,7 +1729,7 @@ declare class TeamMembers {
1716
1729
  interceptOptions
1717
1730
  }: {
1718
1731
  email: string;
1719
- interceptOptions?: Partial<InterceptMultipleResponsesParams>;
1732
+ interceptOptions?: Partial<Omit<InterceptMultipleResponsesParams, "responseUrl">>;
1720
1733
  }) => Promise<void>;
1721
1734
  /**
1722
1735
  *
@@ -2063,12 +2076,14 @@ declare class OrganizationPage {
2063
2076
  *
2064
2077
  * email (optional): A bypass email. If not provided, a random bypass email will be generated.
2065
2078
  *
2079
+ * loginTimeout (optional): Specifies the maximum amount of time the method will wait for the login process to complete before timing out. Default is 15s.
2080
+ *
2066
2081
  * @example
2067
2082
  *
2068
2083
  * await organizationPage.loginViaSSO()
2069
2084
  * @endexample
2070
2085
  */
2071
- loginViaSSO: (email?: string) => Promise<void>;
2086
+ loginViaSSO: (email?: string, loginTimeout?: number) => Promise<void>;
2072
2087
  /**
2073
2088
  *
2074
2089
  * Used to fill and submit all the profile info. It takes the following parameters:
package/index.js CHANGED
@@ -2614,6 +2614,10 @@ var decode$3 = function (str, decoder, charset) {
2614
2614
  }
2615
2615
  };
2616
2616
 
2617
+ var limit = 1024;
2618
+
2619
+ /* eslint operator-linebreak: [2, "before"] */
2620
+
2617
2621
  var encode$3 = function encode(str, defaultEncoder, charset, kind, format) {
2618
2622
  // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
2619
2623
  // It has been adapted here for stricter adherence to RFC 3986
@@ -2635,45 +2639,54 @@ var encode$3 = function encode(str, defaultEncoder, charset, kind, format) {
2635
2639
  }
2636
2640
 
2637
2641
  var out = '';
2638
- for (var i = 0; i < string.length; ++i) {
2639
- var c = string.charCodeAt(i);
2640
-
2641
- if (
2642
- c === 0x2D // -
2643
- || c === 0x2E // .
2644
- || c === 0x5F // _
2645
- || c === 0x7E // ~
2646
- || (c >= 0x30 && c <= 0x39) // 0-9
2647
- || (c >= 0x41 && c <= 0x5A) // a-z
2648
- || (c >= 0x61 && c <= 0x7A) // A-Z
2649
- || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
2650
- ) {
2651
- out += string.charAt(i);
2652
- continue;
2653
- }
2642
+ for (var j = 0; j < string.length; j += limit) {
2643
+ var segment = string.length >= limit ? string.slice(j, j + limit) : string;
2644
+ var arr = [];
2645
+
2646
+ for (var i = 0; i < segment.length; ++i) {
2647
+ var c = segment.charCodeAt(i);
2648
+ if (
2649
+ c === 0x2D // -
2650
+ || c === 0x2E // .
2651
+ || c === 0x5F // _
2652
+ || c === 0x7E // ~
2653
+ || (c >= 0x30 && c <= 0x39) // 0-9
2654
+ || (c >= 0x41 && c <= 0x5A) // a-z
2655
+ || (c >= 0x61 && c <= 0x7A) // A-Z
2656
+ || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
2657
+ ) {
2658
+ arr[arr.length] = segment.charAt(i);
2659
+ continue;
2660
+ }
2654
2661
 
2655
- if (c < 0x80) {
2656
- out = out + hexTable[c];
2657
- continue;
2658
- }
2662
+ if (c < 0x80) {
2663
+ arr[arr.length] = hexTable[c];
2664
+ continue;
2665
+ }
2659
2666
 
2660
- if (c < 0x800) {
2661
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
2662
- continue;
2663
- }
2667
+ if (c < 0x800) {
2668
+ arr[arr.length] = hexTable[0xC0 | (c >> 6)]
2669
+ + hexTable[0x80 | (c & 0x3F)];
2670
+ continue;
2671
+ }
2664
2672
 
2665
- if (c < 0xD800 || c >= 0xE000) {
2666
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
2667
- continue;
2673
+ if (c < 0xD800 || c >= 0xE000) {
2674
+ arr[arr.length] = hexTable[0xE0 | (c >> 12)]
2675
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
2676
+ + hexTable[0x80 | (c & 0x3F)];
2677
+ continue;
2678
+ }
2679
+
2680
+ i += 1;
2681
+ c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
2682
+
2683
+ arr[arr.length] = hexTable[0xF0 | (c >> 18)]
2684
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
2685
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
2686
+ + hexTable[0x80 | (c & 0x3F)];
2668
2687
  }
2669
2688
 
2670
- i += 1;
2671
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
2672
- /* eslint operator-linebreak: [2, "before"] */
2673
- out += hexTable[0xF0 | (c >> 18)]
2674
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
2675
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
2676
- + hexTable[0x80 | (c & 0x3F)];
2689
+ out += arr.join('');
2677
2690
  }
2678
2691
 
2679
2692
  return out;
@@ -3107,7 +3120,7 @@ var defaults$1 = {
3107
3120
  charset: 'utf-8',
3108
3121
  charsetSentinel: false,
3109
3122
  comma: false,
3110
- decodeDotInKeys: true,
3123
+ decodeDotInKeys: false,
3111
3124
  decoder: utils$m.decode,
3112
3125
  delimiter: '&',
3113
3126
  depth: 5,
@@ -14896,7 +14909,7 @@ class TeamMembers {
14896
14909
  await this.neetoPlaywrightUtilities.waitForPageLoad();
14897
14910
  await this.neetoPlaywrightUtilities.verifySuccessToast();
14898
14911
  };
14899
- this.searchAndVerifyMemberByEmail = async ({ email, interceptOptions, }) => {
14912
+ this.searchAndVerifyMemberByEmail = async ({ email, interceptOptions = {}, }) => {
14900
14913
  const searchMembers = this.neetoPlaywrightUtilities.interceptMultipleResponses({
14901
14914
  responseUrl: API_ROUTES.teamMembers.index,
14902
14915
  ...interceptOptions,
@@ -15224,12 +15237,12 @@ class OrganizationPage {
15224
15237
  }
15225
15238
  }
15226
15239
  };
15227
- this.loginViaSSO = async (email = generateRandomBypassEmail()) => {
15240
+ this.loginViaSSO = async (email = generateRandomBypassEmail(), loginTimeout = 15000) => {
15228
15241
  await this.page.getByTestId(LOGIN_SELECTORS.emailTextField).fill(email);
15229
15242
  await expect(async () => {
15230
15243
  await this.page.getByTestId(LOGIN_SELECTORS.submitButton).click();
15231
15244
  await expect(this.page.getByTestId(SIGNUP_SELECTORS.unregisterdEmailError)).toBeHidden();
15232
- }).toPass({ timeout: 15000 });
15245
+ }).toPass({ timeout: loginTimeout });
15233
15246
  await this.page
15234
15247
  .getByTestId(SIGNUP_SELECTORS.otpTextBox)
15235
15248
  .fill(faker.string.numeric(6));
@@ -148247,7 +148260,7 @@ class HOTP {
148247
148260
  // Return early if the token length does not match the digit number.
148248
148261
  if (token.length !== digits) return null;
148249
148262
  let delta = null;
148250
- for (let i = counter - window; i <= counter + window; ++i) {
148263
+ const check = ( /** @type {number} */i) => {
148251
148264
  const generatedToken = HOTP.generate({
148252
148265
  secret,
148253
148266
  algorithm,
@@ -148257,6 +148270,13 @@ class HOTP {
148257
148270
  if (timingSafeEqual(token, generatedToken)) {
148258
148271
  delta = i - counter;
148259
148272
  }
148273
+ };
148274
+ check(counter);
148275
+ for (let i = 1; i <= window && delta === null; ++i) {
148276
+ check(counter - i);
148277
+ if (delta !== null) break;
148278
+ check(counter + i);
148279
+ if (delta !== null) break;
148260
148280
  }
148261
148281
  return delta;
148262
148282
  }
@@ -149144,7 +149164,7 @@ const definePlaywrightConfig = (overrides) => {
149144
149164
  baseURL: process.env.BASE_URL,
149145
149165
  testIdAttribute: "data-cy",
149146
149166
  trace: "on",
149147
- video: { mode: "on", size: { width: 1200, height: 1200 } },
149167
+ video: { mode: "on" },
149148
149168
  screenshot: "on",
149149
149169
  actionTimeout: 10 * 1000,
149150
149170
  timezoneId: "Asia/Calcutta",