@bigbinary/neeto-playwright-commons 1.9.26 → 1.9.27
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.cjs.js +60 -40
- package/index.cjs.js.map +1 -1
- package/index.d.ts +4 -2
- package/index.js +60 -40
- package/index.js.map +1 -1
- package/package.json +24 -24
package/index.d.ts
CHANGED
|
@@ -1716,7 +1716,7 @@ declare class TeamMembers {
|
|
|
1716
1716
|
interceptOptions
|
|
1717
1717
|
}: {
|
|
1718
1718
|
email: string;
|
|
1719
|
-
interceptOptions?: Partial<InterceptMultipleResponsesParams
|
|
1719
|
+
interceptOptions?: Partial<Omit<InterceptMultipleResponsesParams, "responseUrl">>;
|
|
1720
1720
|
}) => Promise<void>;
|
|
1721
1721
|
/**
|
|
1722
1722
|
*
|
|
@@ -2063,12 +2063,14 @@ declare class OrganizationPage {
|
|
|
2063
2063
|
*
|
|
2064
2064
|
* email (optional): A bypass email. If not provided, a random bypass email will be generated.
|
|
2065
2065
|
*
|
|
2066
|
+
* loginTimeout (optional): Specifies the maximum amount of time the method will wait for the login process to complete before timing out. Default is 15s.
|
|
2067
|
+
*
|
|
2066
2068
|
* @example
|
|
2067
2069
|
*
|
|
2068
2070
|
* await organizationPage.loginViaSSO()
|
|
2069
2071
|
* @endexample
|
|
2070
2072
|
*/
|
|
2071
|
-
loginViaSSO: (email?: string) => Promise<void>;
|
|
2073
|
+
loginViaSSO: (email?: string, loginTimeout?: number) => Promise<void>;
|
|
2072
2074
|
/**
|
|
2073
2075
|
*
|
|
2074
2076
|
* 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
|
|
2639
|
-
var
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
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
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2662
|
+
if (c < 0x80) {
|
|
2663
|
+
arr[arr.length] = hexTable[c];
|
|
2664
|
+
continue;
|
|
2665
|
+
}
|
|
2659
2666
|
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2667
|
+
if (c < 0x800) {
|
|
2668
|
+
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
|
|
2669
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
2670
|
+
continue;
|
|
2671
|
+
}
|
|
2664
2672
|
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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"
|
|
149167
|
+
video: { mode: "on" },
|
|
149148
149168
|
screenshot: "on",
|
|
149149
149169
|
actionTimeout: 10 * 1000,
|
|
149150
149170
|
timezoneId: "Asia/Calcutta",
|