@bigbinary/neeto-playwright-commons 1.9.25 → 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 +75 -55
- package/index.cjs.js.map +1 -1
- package/index.d.ts +150 -12
- package/index.js +75 -55
- package/index.js.map +1 -1
- package/package.json +24 -24
package/index.cjs.js
CHANGED
|
@@ -2660,6 +2660,10 @@ var decode$3 = function (str, decoder, charset) {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
};
|
|
2662
2662
|
|
|
2663
|
+
var limit = 1024;
|
|
2664
|
+
|
|
2665
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
2666
|
+
|
|
2663
2667
|
var encode$3 = function encode(str, defaultEncoder, charset, kind, format) {
|
|
2664
2668
|
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
2665
2669
|
// It has been adapted here for stricter adherence to RFC 3986
|
|
@@ -2681,45 +2685,54 @@ var encode$3 = function encode(str, defaultEncoder, charset, kind, format) {
|
|
|
2681
2685
|
}
|
|
2682
2686
|
|
|
2683
2687
|
var out = '';
|
|
2684
|
-
for (var
|
|
2685
|
-
var
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2688
|
+
for (var j = 0; j < string.length; j += limit) {
|
|
2689
|
+
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
2690
|
+
var arr = [];
|
|
2691
|
+
|
|
2692
|
+
for (var i = 0; i < segment.length; ++i) {
|
|
2693
|
+
var c = segment.charCodeAt(i);
|
|
2694
|
+
if (
|
|
2695
|
+
c === 0x2D // -
|
|
2696
|
+
|| c === 0x2E // .
|
|
2697
|
+
|| c === 0x5F // _
|
|
2698
|
+
|| c === 0x7E // ~
|
|
2699
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
2700
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
2701
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
2702
|
+
|| (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
2703
|
+
) {
|
|
2704
|
+
arr[arr.length] = segment.charAt(i);
|
|
2705
|
+
continue;
|
|
2706
|
+
}
|
|
2700
2707
|
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2708
|
+
if (c < 0x80) {
|
|
2709
|
+
arr[arr.length] = hexTable[c];
|
|
2710
|
+
continue;
|
|
2711
|
+
}
|
|
2705
2712
|
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2713
|
+
if (c < 0x800) {
|
|
2714
|
+
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
|
|
2715
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
2716
|
+
continue;
|
|
2717
|
+
}
|
|
2710
2718
|
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2719
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
2720
|
+
arr[arr.length] = hexTable[0xE0 | (c >> 12)]
|
|
2721
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
2722
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
2723
|
+
continue;
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2726
|
+
i += 1;
|
|
2727
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
|
|
2728
|
+
|
|
2729
|
+
arr[arr.length] = hexTable[0xF0 | (c >> 18)]
|
|
2730
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
2731
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
2732
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
2714
2733
|
}
|
|
2715
2734
|
|
|
2716
|
-
|
|
2717
|
-
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
2718
|
-
/* eslint operator-linebreak: [2, "before"] */
|
|
2719
|
-
out += hexTable[0xF0 | (c >> 18)]
|
|
2720
|
-
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
2721
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
2722
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
2735
|
+
out += arr.join('');
|
|
2723
2736
|
}
|
|
2724
2737
|
|
|
2725
2738
|
return out;
|
|
@@ -3153,7 +3166,7 @@ var defaults$1 = {
|
|
|
3153
3166
|
charset: 'utf-8',
|
|
3154
3167
|
charsetSentinel: false,
|
|
3155
3168
|
comma: false,
|
|
3156
|
-
decodeDotInKeys:
|
|
3169
|
+
decodeDotInKeys: false,
|
|
3157
3170
|
decoder: utils$m.decode,
|
|
3158
3171
|
delimiter: '&',
|
|
3159
3172
|
depth: 5,
|
|
@@ -14621,7 +14634,7 @@ class EditorPage {
|
|
|
14621
14634
|
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14622
14635
|
responseUrl: ROUTES.attachment,
|
|
14623
14636
|
});
|
|
14624
|
-
await this.neetoPlaywrightUtilities.
|
|
14637
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
14625
14638
|
await test$1.expect(this.attachmentPreview).toBeVisible();
|
|
14626
14639
|
await this.attachmentPreview
|
|
14627
14640
|
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
@@ -14633,7 +14646,7 @@ class EditorPage {
|
|
|
14633
14646
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
14634
14647
|
.click();
|
|
14635
14648
|
}
|
|
14636
|
-
await this.neetoPlaywrightUtilities.
|
|
14649
|
+
await this.neetoPlaywrightUtilities.verifyToast({
|
|
14637
14650
|
message: ATTACHMENT_DELETION_TOASTR_MESSAGE,
|
|
14638
14651
|
});
|
|
14639
14652
|
if (await this.imageUploadOption.isVisible()) {
|
|
@@ -14646,7 +14659,7 @@ class EditorPage {
|
|
|
14646
14659
|
const imagePath = Path__namespace.join(__dirname, filePath);
|
|
14647
14660
|
await fileUploader.setFiles(imagePath);
|
|
14648
14661
|
await test$1.expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
|
|
14649
|
-
await this.neetoPlaywrightUtilities.
|
|
14662
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
14650
14663
|
await this.imageWrapper
|
|
14651
14664
|
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
14652
14665
|
.click();
|
|
@@ -14683,7 +14696,7 @@ class EditorPage {
|
|
|
14683
14696
|
.getByTestId(COMMON_SELECTORS.selectOption(this.t("neetoRules.labels.feedback")))
|
|
14684
14697
|
.click();
|
|
14685
14698
|
await this.page.getByTestId(NEETO_EDITOR_SELECTORS.applyButton).click();
|
|
14686
|
-
await this.neetoPlaywrightUtilities.
|
|
14699
|
+
await this.neetoPlaywrightUtilities.verifyToast({
|
|
14687
14700
|
message: cannedResponseSuccessMessage,
|
|
14688
14701
|
});
|
|
14689
14702
|
}
|
|
@@ -14942,7 +14955,7 @@ class TeamMembers {
|
|
|
14942
14955
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
14943
14956
|
await this.neetoPlaywrightUtilities.verifySuccessToast();
|
|
14944
14957
|
};
|
|
14945
|
-
this.searchAndVerifyMemberByEmail = async ({ email, interceptOptions, }) => {
|
|
14958
|
+
this.searchAndVerifyMemberByEmail = async ({ email, interceptOptions = {}, }) => {
|
|
14946
14959
|
const searchMembers = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14947
14960
|
responseUrl: API_ROUTES.teamMembers.index,
|
|
14948
14961
|
...interceptOptions,
|
|
@@ -15270,12 +15283,12 @@ class OrganizationPage {
|
|
|
15270
15283
|
}
|
|
15271
15284
|
}
|
|
15272
15285
|
};
|
|
15273
|
-
this.loginViaSSO = async (email = generateRandomBypassEmail()) => {
|
|
15286
|
+
this.loginViaSSO = async (email = generateRandomBypassEmail(), loginTimeout = 15000) => {
|
|
15274
15287
|
await this.page.getByTestId(LOGIN_SELECTORS.emailTextField).fill(email);
|
|
15275
15288
|
await test$1.expect(async () => {
|
|
15276
15289
|
await this.page.getByTestId(LOGIN_SELECTORS.submitButton).click();
|
|
15277
15290
|
await test$1.expect(this.page.getByTestId(SIGNUP_SELECTORS.unregisterdEmailError)).toBeHidden();
|
|
15278
|
-
}).toPass({ timeout:
|
|
15291
|
+
}).toPass({ timeout: loginTimeout });
|
|
15279
15292
|
await this.page
|
|
15280
15293
|
.getByTestId(SIGNUP_SELECTORS.otpTextBox)
|
|
15281
15294
|
.fill(faker.faker.string.numeric(6));
|
|
@@ -15436,7 +15449,7 @@ class TagsPage {
|
|
|
15436
15449
|
});
|
|
15437
15450
|
await this.page.getByTestId(TAGS_SELECTORS.submitButton).click();
|
|
15438
15451
|
await waitForSave;
|
|
15439
|
-
await this.neetoPlaywrightUtilities.
|
|
15452
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15440
15453
|
await this.searchAndVerifyTags(tagName);
|
|
15441
15454
|
};
|
|
15442
15455
|
this.filterTagsViaUI = async (tagName) => {
|
|
@@ -15468,7 +15481,7 @@ class TagsPage {
|
|
|
15468
15481
|
.getByTestId(TAGS_SELECTORS.tagNameTextField)
|
|
15469
15482
|
.fill(newTagName);
|
|
15470
15483
|
await this.page.getByTestId(TAGS_SELECTORS.submitButton).click();
|
|
15471
|
-
await this.neetoPlaywrightUtilities.
|
|
15484
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15472
15485
|
await test$1.expect(this.page.getByRole("row", { name: tagName })).toBeHidden();
|
|
15473
15486
|
await test$1.expect(this.page.getByRole("row", { name: newTagName })).toBeVisible();
|
|
15474
15487
|
};
|
|
@@ -15481,18 +15494,18 @@ class TagsPage {
|
|
|
15481
15494
|
await this.page
|
|
15482
15495
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
15483
15496
|
.click();
|
|
15484
|
-
await this.neetoPlaywrightUtilities.
|
|
15497
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15485
15498
|
await test$1.expect(this.page.getByRole("row", { name: tagName })).toBeHidden();
|
|
15486
15499
|
};
|
|
15487
|
-
this.
|
|
15488
|
-
url:
|
|
15500
|
+
this.addTagsViaRequest = ({ name, description = "", tagsRequestUrl, }) => this.neetoPlaywrightUtilities.apiRequest({
|
|
15501
|
+
url: tagsRequestUrl,
|
|
15489
15502
|
body: { name, description },
|
|
15490
15503
|
method: "post",
|
|
15491
15504
|
});
|
|
15492
|
-
this.navigateToMergeTagsPage = async (
|
|
15505
|
+
this.navigateToMergeTagsPage = async () => {
|
|
15493
15506
|
await this.page.getByTestId(MERGE_TAGS_SELECTORS.mergeTagsButton).click();
|
|
15494
15507
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
15495
|
-
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.heading)).toHaveText(
|
|
15508
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.heading)).toHaveText(this.t("neetoTags.common.mergeTag_other"));
|
|
15496
15509
|
};
|
|
15497
15510
|
this.searchAndSelect = async ({ selector, tagName, rowSelector, }) => {
|
|
15498
15511
|
await this.page.getByTestId(selector).fill(tagName);
|
|
@@ -15501,7 +15514,7 @@ class TagsPage {
|
|
|
15501
15514
|
.filter({ hasText: tagName })
|
|
15502
15515
|
.click();
|
|
15503
15516
|
};
|
|
15504
|
-
this.
|
|
15517
|
+
this.mergeAndVerifyTagsViaUI = async ({ sourceTagName, destinationTagName, tagsBreadcrumbSelector, }) => {
|
|
15505
15518
|
await this.searchAndSelect({
|
|
15506
15519
|
selector: MERGE_TAGS_SELECTORS.sourceSearchTextField,
|
|
15507
15520
|
tagName: sourceTagName,
|
|
@@ -15513,10 +15526,10 @@ class TagsPage {
|
|
|
15513
15526
|
rowSelector: MERGE_TAGS_SELECTORS.destinationTagRow,
|
|
15514
15527
|
});
|
|
15515
15528
|
await this.page.getByTestId(MERGE_TAGS_SELECTORS.mergeButton).click();
|
|
15516
|
-
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.modalHeader)).toHaveText(
|
|
15529
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.modalHeader)).toHaveText(this.t("neetoTags.common.mergeTag_other"));
|
|
15517
15530
|
await this.page.getByTestId(MERGE_TAGS_SELECTORS.proceedButton).click();
|
|
15518
|
-
await this.neetoPlaywrightUtilities.
|
|
15519
|
-
await this.page.getByTestId(
|
|
15531
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15532
|
+
await this.page.getByTestId(tagsBreadcrumbSelector).click();
|
|
15520
15533
|
await test$1.expect(this.page.getByText(sourceTagName)).toBeHidden();
|
|
15521
15534
|
await test$1.expect(this.page.getByText(destinationTagName)).toBeVisible();
|
|
15522
15535
|
};
|
|
@@ -148293,7 +148306,7 @@ class HOTP {
|
|
|
148293
148306
|
// Return early if the token length does not match the digit number.
|
|
148294
148307
|
if (token.length !== digits) return null;
|
|
148295
148308
|
let delta = null;
|
|
148296
|
-
|
|
148309
|
+
const check = ( /** @type {number} */i) => {
|
|
148297
148310
|
const generatedToken = HOTP.generate({
|
|
148298
148311
|
secret,
|
|
148299
148312
|
algorithm,
|
|
@@ -148303,6 +148316,13 @@ class HOTP {
|
|
|
148303
148316
|
if (timingSafeEqual(token, generatedToken)) {
|
|
148304
148317
|
delta = i - counter;
|
|
148305
148318
|
}
|
|
148319
|
+
};
|
|
148320
|
+
check(counter);
|
|
148321
|
+
for (let i = 1; i <= window && delta === null; ++i) {
|
|
148322
|
+
check(counter - i);
|
|
148323
|
+
if (delta !== null) break;
|
|
148324
|
+
check(counter + i);
|
|
148325
|
+
if (delta !== null) break;
|
|
148306
148326
|
}
|
|
148307
148327
|
return delta;
|
|
148308
148328
|
}
|
|
@@ -149190,7 +149210,7 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
149190
149210
|
baseURL: process.env.BASE_URL,
|
|
149191
149211
|
testIdAttribute: "data-cy",
|
|
149192
149212
|
trace: "on",
|
|
149193
|
-
video: { mode: "on"
|
|
149213
|
+
video: { mode: "on" },
|
|
149194
149214
|
screenshot: "on",
|
|
149195
149215
|
actionTimeout: 10 * 1000,
|
|
149196
149216
|
timezoneId: "Asia/Calcutta",
|