@bigbinary/neeto-playwright-commons 1.16.5 → 1.16.7
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 +117 -149
- package/index.cjs.js.map +1 -1
- package/index.d.ts +65 -286
- package/index.js +117 -149
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -74,7 +74,7 @@ const THIRD_PARTY_ROUTES = {
|
|
|
74
74
|
loginWithPassword: (workspace) => `https://${workspace}.slack.com/sign_in_with_password`,
|
|
75
75
|
},
|
|
76
76
|
zapier: {
|
|
77
|
-
login: "https://zapier.com/
|
|
77
|
+
login: "https://zapier.com/",
|
|
78
78
|
logOut: "https://zapier.com/logout",
|
|
79
79
|
zapEditor: (zapId) => `https://zapier.com/editor/${zapId}`,
|
|
80
80
|
},
|
|
@@ -396,6 +396,7 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
396
396
|
imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
|
|
397
397
|
dynamicVariablesButton: "dynamic-variables-button",
|
|
398
398
|
emojiContainer: "neeto-editor-emoji-picker",
|
|
399
|
+
characterCount: "neeto-editor-character-count",
|
|
399
400
|
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${variable}`,
|
|
400
401
|
};
|
|
401
402
|
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
@@ -462,6 +463,7 @@ const NEETO_FILTERS_SELECTORS = {
|
|
|
462
463
|
filtersEmailFilter: "neeto-filters-email-filter",
|
|
463
464
|
paneModalCrossIcon: "neeto-filters-close-button",
|
|
464
465
|
searchTermBlock: "neeto-filters-search-term-block",
|
|
466
|
+
categoriesFilter: "neeto-filters-categories-filter",
|
|
465
467
|
neetoFiltersFilter: (filterName) => `neeto-filters-${hyphenize(filterName)}-filter`,
|
|
466
468
|
filtersTermBlock: (filterType = "search-term") => `neeto-filters-${hyphenize(filterType)}-block`,
|
|
467
469
|
};
|
|
@@ -568,6 +570,7 @@ const PROFILE_SECTION_SELECTORS = {
|
|
|
568
570
|
profileSidebarCancelButton: "ntm-profile-cancel-button",
|
|
569
571
|
profileAvatar: "profile-avatar",
|
|
570
572
|
actionHeaderUserEmail: "floating-action-menu-header-user-email",
|
|
573
|
+
submitButton: "ntm-profile-submit-button",
|
|
571
574
|
};
|
|
572
575
|
|
|
573
576
|
const ROLES_SELECTORS = {
|
|
@@ -588,6 +591,9 @@ const ROLES_SELECTORS = {
|
|
|
588
591
|
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
589
592
|
deleteRoleButton: "ntm-roles-table-delete-role-button",
|
|
590
593
|
permissionCard: "ntm-roles-permission-card",
|
|
594
|
+
searchPermissionsInput: "ntm-search-permissions-input",
|
|
595
|
+
permissionDescription: "ntm-permission-category-description",
|
|
596
|
+
rolesEditButton: "ntm-roles-table-edit-role-button",
|
|
591
597
|
};
|
|
592
598
|
|
|
593
599
|
const SIGNUP_SELECTORS = {
|
|
@@ -748,6 +754,16 @@ const ZAPIER_SELECTORS = {
|
|
|
748
754
|
sidebarFooter: "css=[class$=InAppSidebarFooter__footerWrapper]",
|
|
749
755
|
contextualSideBar: "[data-testid='contextual-sidebar']",
|
|
750
756
|
iconContainer: "[data-testid='iconContainer']",
|
|
757
|
+
deleteApiButton: "delete-apikey-button",
|
|
758
|
+
zapierSubLink: "zapier-sub-link",
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
const TABLE_SELECTORS = {
|
|
762
|
+
freezeUnfreezeButton: "freeze-unfreeze-column-menu-button",
|
|
763
|
+
ascendingButton: "ascending-column-menu-button",
|
|
764
|
+
descendingButton: "descending-column-menu-button",
|
|
765
|
+
hideButton: "hide-column-menu-button",
|
|
766
|
+
columnHeaderTitle: (columnName) => `${hyphenate(columnName)}-header-title`,
|
|
751
767
|
};
|
|
752
768
|
|
|
753
769
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -3882,20 +3898,6 @@ class CustomCommands {
|
|
|
3882
3898
|
const startTime = Date.now();
|
|
3883
3899
|
return await this.recursiveMethod(callback, condition, timeout, startTime, 1);
|
|
3884
3900
|
};
|
|
3885
|
-
/**
|
|
3886
|
-
* @deprecated Use verifyToast instead.
|
|
3887
|
-
*/
|
|
3888
|
-
this.verifySuccessToast = async ({ message = "", closeAfterVerification = true, } = {}) => {
|
|
3889
|
-
if (!isEmpty$1(message)) {
|
|
3890
|
-
await expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage("success"))).toContainText(message);
|
|
3891
|
-
}
|
|
3892
|
-
else {
|
|
3893
|
-
await expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍");
|
|
3894
|
-
}
|
|
3895
|
-
closeAfterVerification &&
|
|
3896
|
-
(await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
|
|
3897
|
-
await expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
|
|
3898
|
-
};
|
|
3899
3901
|
this.verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, timeout = 10000, customPageContext = this.page, } = {}) => {
|
|
3900
3902
|
const toastrCloseButton = customPageContext.getByTestId(COMMON_SELECTORS.toastCloseButton);
|
|
3901
3903
|
if (!isEmpty$1(message)) {
|
|
@@ -21485,6 +21487,11 @@ const ZAPIER_WEB_TEXTS = {
|
|
|
21485
21487
|
connectStagingApp: (appName) => `Connect ${appName} Staging`,
|
|
21486
21488
|
zapierWorkflowTriggered: "Zapier Workflow Triggered",
|
|
21487
21489
|
confirmPublishing: "Confirm Publishing",
|
|
21490
|
+
startFreeWithEmail: "Start free with email",
|
|
21491
|
+
appsByTitle: "Apps by title",
|
|
21492
|
+
logIn: "Log in",
|
|
21493
|
+
loginToYourAccount: "Log in to your account",
|
|
21494
|
+
deleteMessage: "Zapier API Keys are deleted successfully!",
|
|
21488
21495
|
};
|
|
21489
21496
|
const TOASTR_MESSAGES = {
|
|
21490
21497
|
zapierApiKeyGenerated: "Zapier API key is generated successfully!",
|
|
@@ -21520,7 +21527,10 @@ const GOOGLE_LOGIN_TEXTS = {
|
|
|
21520
21527
|
};
|
|
21521
21528
|
const ENGAGE_TEXTS = { subscribe: "Subscribe" };
|
|
21522
21529
|
const AUDIT_LOGS_TEXTS = { organizationRole: "Organization Role" };
|
|
21523
|
-
const COMMON_TEXTS = {
|
|
21530
|
+
const COMMON_TEXTS = {
|
|
21531
|
+
skipCleanup: "SKIP_CLEANUP",
|
|
21532
|
+
skipSetup: "SKIP_SETUP",
|
|
21533
|
+
};
|
|
21524
21534
|
|
|
21525
21535
|
/* eslint-disable playwright/require-top-level-describe */
|
|
21526
21536
|
/* eslint-disable playwright/no-standalone-expect */
|
|
@@ -23479,18 +23489,16 @@ const initializeTotp = ({ issuer, secret, }) => {
|
|
|
23479
23489
|
|
|
23480
23490
|
class IntegrationBase {
|
|
23481
23491
|
constructor({ page, neetoPlaywrightUtilities, integration, connectHeader, connectedHeader, pageloaderTimeout, integrationRouteIndex, integrationRouteResponsesParams, }) {
|
|
23482
|
-
this.disconnect = async (
|
|
23492
|
+
this.disconnect = async (
|
|
23493
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23494
|
+
interceptMultipleResponsesParams = {}) => {
|
|
23483
23495
|
await this.gotoIntegrationIndex();
|
|
23484
23496
|
await this.clickOnIntegrationCard();
|
|
23485
23497
|
await this.page.getByTestId(INTEGRATION_SELECTORS.disconnectButton).click();
|
|
23486
|
-
const disconnectPromise = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
23487
|
-
times: 0,
|
|
23488
|
-
...interceptMultipleResponsesParams,
|
|
23489
|
-
});
|
|
23490
23498
|
await this.page
|
|
23491
23499
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
23492
23500
|
.click();
|
|
23493
|
-
await
|
|
23501
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
23494
23502
|
};
|
|
23495
23503
|
this.connect = async (skipGoTo) => {
|
|
23496
23504
|
!skipGoTo && (await this.gotoIntegrationIndex());
|
|
@@ -23949,6 +23957,37 @@ class WebhooksPage {
|
|
|
23949
23957
|
}
|
|
23950
23958
|
}
|
|
23951
23959
|
|
|
23960
|
+
const simulateTypingWithDelay = async ({ field, value, delay = 500, }) => {
|
|
23961
|
+
const sliceLength = Math.floor(Math.random() * 5) + 10;
|
|
23962
|
+
const backspaceCount = Math.floor(Math.random() * 3) + 2;
|
|
23963
|
+
const textPart1 = value.slice(0, sliceLength);
|
|
23964
|
+
const textPart2 = value.slice(sliceLength - backspaceCount);
|
|
23965
|
+
await field.hover();
|
|
23966
|
+
await field.click({ delay: Math.floor(Math.random() * delay) + 700 });
|
|
23967
|
+
await field.pressSequentially(textPart1, {
|
|
23968
|
+
delay: Math.floor(Math.random() * delay) + 400,
|
|
23969
|
+
timeout: 30000,
|
|
23970
|
+
});
|
|
23971
|
+
for (let i = 0; i < backspaceCount; i++) {
|
|
23972
|
+
await field.press("Backspace", {
|
|
23973
|
+
delay: Math.floor(Math.random() * 1000) + 300,
|
|
23974
|
+
});
|
|
23975
|
+
}
|
|
23976
|
+
await field.pressSequentially(textPart2, {
|
|
23977
|
+
delay: Math.floor(Math.random() * delay) + 700,
|
|
23978
|
+
timeout: 45000,
|
|
23979
|
+
});
|
|
23980
|
+
};
|
|
23981
|
+
const simulateClickWithDelay = async ({ element, page, }) => {
|
|
23982
|
+
const locatorBoundingBox = await element.boundingBox();
|
|
23983
|
+
const clickX = locatorBoundingBox.x + locatorBoundingBox.width / 2 + 10;
|
|
23984
|
+
const clickY = locatorBoundingBox.y + locatorBoundingBox.height / 2 - 10;
|
|
23985
|
+
await element.hover();
|
|
23986
|
+
await page.mouse.click(clickX, clickY, {
|
|
23987
|
+
delay: Math.floor(Math.random() * 1000) + 1000,
|
|
23988
|
+
});
|
|
23989
|
+
};
|
|
23990
|
+
|
|
23952
23991
|
class ZapierPage extends IntegrationBase {
|
|
23953
23992
|
constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, mailerUtils, }) {
|
|
23954
23993
|
super({
|
|
@@ -23963,16 +24002,41 @@ class ZapierPage extends IntegrationBase {
|
|
|
23963
24002
|
name: ZAPIER_WEB_TEXTS.continue,
|
|
23964
24003
|
exact: true,
|
|
23965
24004
|
});
|
|
23966
|
-
await
|
|
23967
|
-
await
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
|
|
24005
|
+
await zapierWebPage.goto(THIRD_PARTY_ROUTES.zapier.login);
|
|
24006
|
+
await expect(zapierWebPage.getByRole("link", {
|
|
24007
|
+
name: ZAPIER_WEB_TEXTS.startFreeWithEmail,
|
|
24008
|
+
})).toBeVisible();
|
|
24009
|
+
const loginLink = zapierWebPage.getByRole("link", {
|
|
24010
|
+
name: ZAPIER_WEB_TEXTS.logIn,
|
|
24011
|
+
});
|
|
24012
|
+
await simulateClickWithDelay({ element: loginLink, page: zapierWebPage });
|
|
24013
|
+
const emailField = zapierWebPage.getByLabel(ZAPIER_WEB_TEXTS.email);
|
|
24014
|
+
const passwordField = zapierWebPage.getByLabel(ZAPIER_WEB_TEXTS.password);
|
|
24015
|
+
const loginToYourAccountHeading = zapierWebPage.getByRole("heading", {
|
|
24016
|
+
name: ZAPIER_WEB_TEXTS.loginToYourAccount,
|
|
24017
|
+
});
|
|
24018
|
+
await expect(emailField).toBeVisible();
|
|
24019
|
+
await loginToYourAccountHeading.hover();
|
|
24020
|
+
await loginToYourAccountHeading.dblclick({
|
|
24021
|
+
delay: Math.floor(Math.random() * 1000) + 300,
|
|
24022
|
+
});
|
|
24023
|
+
await simulateTypingWithDelay({
|
|
24024
|
+
field: emailField,
|
|
24025
|
+
value: process.env.ZAPIER_LOGIN_EMAIL,
|
|
24026
|
+
});
|
|
24027
|
+
await simulateClickWithDelay({
|
|
24028
|
+
element: this.continueButton,
|
|
24029
|
+
page: zapierWebPage,
|
|
24030
|
+
});
|
|
24031
|
+
await expect(zapierWebPage.getByText(ZAPIER_WEB_TEXTS.welcomeText(process.env.ZAPIER_LOGIN_EMAIL))).toBeVisible();
|
|
24032
|
+
await simulateTypingWithDelay({
|
|
24033
|
+
field: passwordField,
|
|
24034
|
+
value: process.env.ZAPIER_LOGIN_PASSWORD,
|
|
24035
|
+
});
|
|
24036
|
+
await simulateClickWithDelay({
|
|
24037
|
+
element: this.continueButton,
|
|
24038
|
+
page: zapierWebPage,
|
|
24039
|
+
});
|
|
23976
24040
|
};
|
|
23977
24041
|
this.logoutFromZapier = async () => {
|
|
23978
24042
|
await this.zapierWebPage.goto(THIRD_PARTY_ROUTES.zapier.logOut, {
|
|
@@ -24095,7 +24159,9 @@ class ZapierPage extends IntegrationBase {
|
|
|
24095
24159
|
this.skipIfTaskLimitIsExhausted = async () => {
|
|
24096
24160
|
var _a;
|
|
24097
24161
|
// Zapier provides 100 free task limit for free account; skip test if it's exhausted
|
|
24098
|
-
await
|
|
24162
|
+
await this.zapierWebPage.locator(ZAPIER_SELECTORS.universalSidebar).hover({
|
|
24163
|
+
timeout: 30000,
|
|
24164
|
+
});
|
|
24099
24165
|
await expect(this.zapierWebPage.locator(ZAPIER_SELECTORS.sidebarFooter)).toBeVisible({ timeout: 10000 });
|
|
24100
24166
|
if (await this.zapierWebPage
|
|
24101
24167
|
.getByText(RegExp(ZAPIER_WEB_TEXTS.trialEndsRegExp))
|
|
@@ -24132,10 +24198,15 @@ class ZapierPage extends IntegrationBase {
|
|
|
24132
24198
|
await this.verifyIntegrationStatus();
|
|
24133
24199
|
return apiKey;
|
|
24134
24200
|
};
|
|
24135
|
-
this.disconnectAndVerify = async () => {
|
|
24136
|
-
await this.
|
|
24137
|
-
|
|
24138
|
-
|
|
24201
|
+
this.disconnectAndVerify = async (toastMessage = ZAPIER_WEB_TEXTS.deleteMessage) => {
|
|
24202
|
+
await this.gotoIntegrationIndex();
|
|
24203
|
+
await this.clickOnIntegrationCard();
|
|
24204
|
+
await this.page.getByTestId(INTEGRATION_SELECTORS.disconnectButton).click();
|
|
24205
|
+
await this.page
|
|
24206
|
+
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
24207
|
+
.click();
|
|
24208
|
+
await this.neetoPlaywrightUtilities.verifyToast({
|
|
24209
|
+
message: toastMessage,
|
|
24139
24210
|
});
|
|
24140
24211
|
await this.verifyIntegrationStatus("disconnected");
|
|
24141
24212
|
};
|
|
@@ -25430,81 +25501,6 @@ const initializeCredentials = (product) => {
|
|
|
25430
25501
|
}
|
|
25431
25502
|
};
|
|
25432
25503
|
|
|
25433
|
-
const addMemberViaRequest = async ({ email, role = MEMBER_TEXTS.agent, appName, neetoPlaywrightUtilities, }) => {
|
|
25434
|
-
let response;
|
|
25435
|
-
await expect
|
|
25436
|
-
.poll(async () => {
|
|
25437
|
-
response = await neetoPlaywrightUtilities.apiRequest({
|
|
25438
|
-
method: "post",
|
|
25439
|
-
url: API_ROUTES.teamMembers.index,
|
|
25440
|
-
body: {
|
|
25441
|
-
user: {
|
|
25442
|
-
emails: [email],
|
|
25443
|
-
organization_role: role,
|
|
25444
|
-
app_roles: [
|
|
25445
|
-
{ app_name: appName, active_role: role, is_enabled: true },
|
|
25446
|
-
],
|
|
25447
|
-
},
|
|
25448
|
-
},
|
|
25449
|
-
});
|
|
25450
|
-
return response === null || response === void 0 ? void 0 : response.status();
|
|
25451
|
-
}, { timeout: 30000 })
|
|
25452
|
-
.toBe(200);
|
|
25453
|
-
const responseBodyBuffer = await (response === null || response === void 0 ? void 0 : response.body());
|
|
25454
|
-
const { job_id: jobId } = JSON.parse(String(responseBodyBuffer));
|
|
25455
|
-
await expect
|
|
25456
|
-
.poll(async () => {
|
|
25457
|
-
const jobResponse = await neetoPlaywrightUtilities.apiRequest({
|
|
25458
|
-
url: API_ROUTES.teamMembers.creationStatus(jobId),
|
|
25459
|
-
});
|
|
25460
|
-
const responseBodyBuffer = await (jobResponse === null || jobResponse === void 0 ? void 0 : jobResponse.body());
|
|
25461
|
-
const { is_completed: isCompleted } = JSON.parse(String(responseBodyBuffer));
|
|
25462
|
-
return isCompleted;
|
|
25463
|
-
}, { timeout: 30000 })
|
|
25464
|
-
.toBe(true);
|
|
25465
|
-
};
|
|
25466
|
-
const editMemberViaRequest = async ({ email, firstName, lastName, newRole, neetoPlaywrightUtilities, }) => {
|
|
25467
|
-
const response = await neetoPlaywrightUtilities.apiRequest({
|
|
25468
|
-
method: "get",
|
|
25469
|
-
url: API_ROUTES.teamMembers.index,
|
|
25470
|
-
params: { search: email },
|
|
25471
|
-
});
|
|
25472
|
-
if (response) {
|
|
25473
|
-
const responseBodyBuffer = await response.body();
|
|
25474
|
-
const responseBody = JSON.parse(responseBodyBuffer.toString());
|
|
25475
|
-
const memberDetails = responseBody === null || responseBody === void 0 ? void 0 : responseBody.members[0];
|
|
25476
|
-
await neetoPlaywrightUtilities.apiRequest({
|
|
25477
|
-
method: "put",
|
|
25478
|
-
url: API_ROUTES.teamMembers.show(memberDetails.id),
|
|
25479
|
-
body: {
|
|
25480
|
-
team: {
|
|
25481
|
-
active: true,
|
|
25482
|
-
first_name: firstName,
|
|
25483
|
-
last_name: lastName,
|
|
25484
|
-
organization_role: newRole,
|
|
25485
|
-
},
|
|
25486
|
-
},
|
|
25487
|
-
});
|
|
25488
|
-
}
|
|
25489
|
-
};
|
|
25490
|
-
const deactivateMemberViaRequest = ({ email, neetoPlaywrightUtilities, }) => neetoPlaywrightUtilities.apiRequest({
|
|
25491
|
-
method: "patch",
|
|
25492
|
-
url: API_ROUTES.teamMembers.bulkUpdate,
|
|
25493
|
-
body: { users: { active: false, emails: [email] } },
|
|
25494
|
-
});
|
|
25495
|
-
const generateRandomTeamMembers = ({ count = 1, role = "standard" }) => dynamicArray(count, () => ({
|
|
25496
|
-
firstName: faker.person.firstName(),
|
|
25497
|
-
lastName: faker.person.lastName(),
|
|
25498
|
-
email: faker.internet.exampleEmail(),
|
|
25499
|
-
role,
|
|
25500
|
-
}));
|
|
25501
|
-
const memberUtils = {
|
|
25502
|
-
addMemberViaRequest,
|
|
25503
|
-
editMemberViaRequest,
|
|
25504
|
-
deactivateMemberViaRequest,
|
|
25505
|
-
generateRandomTeamMembers,
|
|
25506
|
-
};
|
|
25507
|
-
|
|
25508
25504
|
const assertColumnHeaderVisibility = async ({ page, columnName, shouldBeVisible, }) => {
|
|
25509
25505
|
const visibilityAssertion = shouldBeVisible ? "toBeVisible" : "toBeHidden";
|
|
25510
25506
|
await expect(page.getByRole("columnheader", { name: columnName, exact: true }))[visibilityAssertion]();
|
|
@@ -25537,15 +25533,18 @@ const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, sho
|
|
|
25537
25533
|
}
|
|
25538
25534
|
};
|
|
25539
25535
|
const verifyFreezeColumnAction = async (page, t) => {
|
|
25540
|
-
var _a, _b;
|
|
25541
25536
|
const columnHeader = page.getByRole("columnheader");
|
|
25542
25537
|
const checkboxVisible = await columnHeader.getByRole("checkbox").isVisible();
|
|
25543
25538
|
const columnOffset = checkboxVisible ? 1 : 0;
|
|
25544
|
-
const freezeColumnButton = page
|
|
25545
|
-
|
|
25539
|
+
const freezeColumnButton = page
|
|
25540
|
+
.getByTestId(TABLE_SELECTORS.freezeUnfreezeButton)
|
|
25541
|
+
.filter({
|
|
25542
|
+
hasText: t("neetoui.table.freezeColumn"),
|
|
25546
25543
|
});
|
|
25547
|
-
const unFreezeColumnButton = page
|
|
25548
|
-
|
|
25544
|
+
const unFreezeColumnButton = page
|
|
25545
|
+
.getByTestId(TABLE_SELECTORS.freezeUnfreezeButton)
|
|
25546
|
+
.filter({
|
|
25547
|
+
hasText: t("neetoui.table.unFreezeColumn"),
|
|
25549
25548
|
});
|
|
25550
25549
|
const [columnHeaders, originalColumnNames] = await Promise.all([
|
|
25551
25550
|
columnHeader.all(),
|
|
@@ -158013,37 +158012,6 @@ const hexToRGBA = (hex) => {
|
|
|
158013
158012
|
return `rgba(${r}, ${g}, ${b}, ${a.toFixed(2)})`;
|
|
158014
158013
|
};
|
|
158015
158014
|
|
|
158016
|
-
const simulateTypingWithDelay = async ({ field, value, delay = 500, }) => {
|
|
158017
|
-
const sliceLength = Math.floor(Math.random() * 5) + 10;
|
|
158018
|
-
const backspaceCount = Math.floor(Math.random() * 3) + 2;
|
|
158019
|
-
const textPart1 = value.slice(0, sliceLength);
|
|
158020
|
-
const textPart2 = value.slice(sliceLength - backspaceCount);
|
|
158021
|
-
await field.hover();
|
|
158022
|
-
await field.click({ delay: Math.floor(Math.random() * delay) + 700 });
|
|
158023
|
-
await field.pressSequentially(textPart1, {
|
|
158024
|
-
delay: Math.floor(Math.random() * delay) + 400,
|
|
158025
|
-
timeout: 30000,
|
|
158026
|
-
});
|
|
158027
|
-
for (let i = 0; i < backspaceCount; i++) {
|
|
158028
|
-
await field.press("Backspace", {
|
|
158029
|
-
delay: Math.floor(Math.random() * 1000) + 300,
|
|
158030
|
-
});
|
|
158031
|
-
}
|
|
158032
|
-
await field.pressSequentially(textPart2, {
|
|
158033
|
-
delay: Math.floor(Math.random() * delay) + 700,
|
|
158034
|
-
timeout: 45000,
|
|
158035
|
-
});
|
|
158036
|
-
};
|
|
158037
|
-
const simulateClickWithDelay = async ({ element, page, }) => {
|
|
158038
|
-
const locatorBoundingBox = await element.boundingBox();
|
|
158039
|
-
const clickX = locatorBoundingBox.x + locatorBoundingBox.width / 2 + 10;
|
|
158040
|
-
const clickY = locatorBoundingBox.y + locatorBoundingBox.height / 2 - 10;
|
|
158041
|
-
await element.hover();
|
|
158042
|
-
await page.mouse.click(clickX, clickY, {
|
|
158043
|
-
delay: Math.floor(Math.random() * 1000) + 1000,
|
|
158044
|
-
});
|
|
158045
|
-
};
|
|
158046
|
-
|
|
158047
158015
|
var main$2 = {exports: {}};
|
|
158048
158016
|
|
|
158049
158017
|
var name = "dotenv";
|
|
@@ -158665,5 +158633,5 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
158665
158633
|
});
|
|
158666
158634
|
};
|
|
158667
158635
|
|
|
158668
|
-
export { API_ROUTES, AUDIT_LOGS_TEXTS, AuditLogsPage, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, COMMON_TEXTS, CREDENTIALS, CustomCommands, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENGAGE_TEXTS, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailerUtils, Member, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_TEXT_MODIFIER_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PLURAL, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAB_SELECTORS, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, ThankYouPage, USER_AGENTS, WEBHOOK_SELECTORS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, currencyUtils, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, getListCount, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO,
|
|
158636
|
+
export { API_ROUTES, AUDIT_LOGS_TEXTS, AuditLogsPage, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, COMMON_TEXTS, CREDENTIALS, CustomCommands, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENGAGE_TEXTS, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailerUtils, Member, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_TEXT_MODIFIER_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PLURAL, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, ThankYouPage, USER_AGENTS, WEBHOOK_SELECTORS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, currencyUtils, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, getListCount, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
158669
158637
|
//# sourceMappingURL=index.js.map
|