@bigbinary/neeto-playwright-commons 1.11.2 → 1.11.4
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 +155 -109
- package/index.cjs.js.map +1 -1
- package/index.d.ts +56 -32
- package/index.js +155 -109
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1439,7 +1439,6 @@ declare class EditorPage {
|
|
|
1439
1439
|
neetoPlaywrightUtilities: CustomCommands;
|
|
1440
1440
|
t: TFunction;
|
|
1441
1441
|
editorWrapper: Locator | Page;
|
|
1442
|
-
paragraphSelector: Locator;
|
|
1443
1442
|
fixedMenuArrowSelector: Locator;
|
|
1444
1443
|
editorLinkButton: Locator;
|
|
1445
1444
|
attachmentPreview: Locator;
|
|
@@ -1455,8 +1454,15 @@ declare class EditorPage {
|
|
|
1455
1454
|
moreMenuSelector: Locator;
|
|
1456
1455
|
contentField: Locator;
|
|
1457
1456
|
dynamicVariablesButton: Locator;
|
|
1457
|
+
linkUrl: string;
|
|
1458
|
+
filePath: string;
|
|
1459
|
+
imageUrl: string;
|
|
1460
|
+
videoUrl: string;
|
|
1461
|
+
cannedResponseSuccessMessage?: string | undefined;
|
|
1458
1462
|
constructor(page: Page, neetoPlaywrightUtilities: CustomCommands, editorWrapper?: Locator | Page);
|
|
1459
|
-
|
|
1463
|
+
private cleanString;
|
|
1464
|
+
private fixedMenuOptions;
|
|
1465
|
+
private moreMenuOptions;
|
|
1460
1466
|
private verifyFontSize;
|
|
1461
1467
|
private verifyTextModifiers;
|
|
1462
1468
|
private verifyTextDeskModifier;
|
|
@@ -1468,6 +1474,7 @@ declare class EditorPage {
|
|
|
1468
1474
|
private verifyVideoEmbedOption;
|
|
1469
1475
|
private verifyEmojiSelector;
|
|
1470
1476
|
verifyDynamicVariables: (dynamicVariables: string[]) => Promise<void>;
|
|
1477
|
+
private buttonsAndVerifications;
|
|
1471
1478
|
/**
|
|
1472
1479
|
*
|
|
1473
1480
|
* Used to verify description editor functionality
|
|
@@ -2033,6 +2040,7 @@ interface BasicUserInfo {
|
|
|
2033
2040
|
firstName: string;
|
|
2034
2041
|
lastName: string;
|
|
2035
2042
|
email: string;
|
|
2043
|
+
country?: string;
|
|
2036
2044
|
}
|
|
2037
2045
|
interface CreateOrganizationProps extends BasicUserInfo {
|
|
2038
2046
|
businessName: string;
|
|
@@ -2159,10 +2167,12 @@ declare class OrganizationPage {
|
|
|
2159
2167
|
*/
|
|
2160
2168
|
setupProfile: ({
|
|
2161
2169
|
firstName,
|
|
2162
|
-
lastName
|
|
2170
|
+
lastName,
|
|
2171
|
+
country
|
|
2163
2172
|
}?: {
|
|
2164
2173
|
firstName?: string;
|
|
2165
2174
|
lastName?: string;
|
|
2175
|
+
country?: string;
|
|
2166
2176
|
}) => Promise<void>;
|
|
2167
2177
|
/**
|
|
2168
2178
|
*
|
|
@@ -2190,6 +2200,7 @@ declare class OrganizationPage {
|
|
|
2190
2200
|
email,
|
|
2191
2201
|
firstName,
|
|
2192
2202
|
lastName,
|
|
2203
|
+
country,
|
|
2193
2204
|
handleOnboarding
|
|
2194
2205
|
}: LoginAndOnboardParams) => Promise<void>;
|
|
2195
2206
|
/**
|
|
@@ -2279,6 +2290,7 @@ declare class OrganizationPage {
|
|
|
2279
2290
|
credentials: Credentials;
|
|
2280
2291
|
appName: string;
|
|
2281
2292
|
}) => Promise<void>;
|
|
2293
|
+
changeCountry: (country: string) => Promise<void>;
|
|
2282
2294
|
}
|
|
2283
2295
|
declare class SidebarSection {
|
|
2284
2296
|
page: Page;
|
|
@@ -2803,7 +2815,7 @@ declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling",
|
|
|
2803
2815
|
*
|
|
2804
2816
|
* alertModalMessage: Selector for alert modal messages.
|
|
2805
2817
|
*
|
|
2806
|
-
* alertModalSubmitButton: to get the submit button of the
|
|
2818
|
+
* alertModalSubmitButton: to get the submit button of the NeetoUI Alert component.
|
|
2807
2819
|
*
|
|
2808
2820
|
* checkbox: Selector for checkboxes.
|
|
2809
2821
|
*
|
|
@@ -2825,19 +2837,21 @@ declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling",
|
|
|
2825
2837
|
*
|
|
2826
2838
|
* radioLabel(embedLabel: string): Method that generates a selector for radio labels based on the embedded label.
|
|
2827
2839
|
*
|
|
2828
|
-
* toastMessage: To get the
|
|
2840
|
+
* toastMessage: To get the NeetoUI Toastr message.
|
|
2829
2841
|
*
|
|
2830
|
-
* toastCloseButton: To get the
|
|
2842
|
+
* toastCloseButton: To get the NeetoUI Toastr close icon.
|
|
2831
2843
|
*
|
|
2832
2844
|
* windowAlert: Selector for window alerts.
|
|
2833
2845
|
*
|
|
2834
2846
|
* body: Selector for the body.
|
|
2835
2847
|
*
|
|
2836
|
-
* toastIcon: To get the
|
|
2848
|
+
* toastIcon: To get the NeetoUI Toastr icon.
|
|
2849
|
+
*
|
|
2850
|
+
* toastContainer: To get the NeetoUI Toastr container.
|
|
2837
2851
|
*
|
|
2838
2852
|
* paneModalCrossIcon: Selector for pane modal cross icons.
|
|
2839
2853
|
*
|
|
2840
|
-
* inputField: Selector to get
|
|
2854
|
+
* inputField: Selector to get NeetoUI input field.
|
|
2841
2855
|
*
|
|
2842
2856
|
* alertBox: Selector for alert box.
|
|
2843
2857
|
*
|
|
@@ -2955,6 +2969,8 @@ declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling",
|
|
|
2955
2969
|
*
|
|
2956
2970
|
* buttonSpinner: Selector for button spinner,
|
|
2957
2971
|
*
|
|
2972
|
+
* customSelectValueContainer: Selector for select custom value container,
|
|
2973
|
+
*
|
|
2958
2974
|
*/
|
|
2959
2975
|
declare const COMMON_SELECTORS: {
|
|
2960
2976
|
emailInputError: string;
|
|
@@ -2983,6 +2999,7 @@ declare const COMMON_SELECTORS: {
|
|
|
2983
2999
|
windowAlert: string;
|
|
2984
3000
|
body: string;
|
|
2985
3001
|
toastIcon: string;
|
|
3002
|
+
toastContainer: string;
|
|
2986
3003
|
paneModalCrossIcon: string;
|
|
2987
3004
|
inputField: string;
|
|
2988
3005
|
alertBox: string;
|
|
@@ -3044,6 +3061,7 @@ declare const COMMON_SELECTORS: {
|
|
|
3044
3061
|
modalForever: string;
|
|
3045
3062
|
navigationHeader: string;
|
|
3046
3063
|
buttonSpinner: string;
|
|
3064
|
+
customSelectValueContainer: (label?: string) => string;
|
|
3047
3065
|
};
|
|
3048
3066
|
/**
|
|
3049
3067
|
*
|
|
@@ -3155,20 +3173,20 @@ declare const NEETO_EDITOR_SELECTORS: {
|
|
|
3155
3173
|
dynamicVariableSelector: (variable: string) => string;
|
|
3156
3174
|
};
|
|
3157
3175
|
declare const NEETO_TEXT_MODIFIER_SELECTORS: {
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3176
|
+
strike: string;
|
|
3177
|
+
underline: string;
|
|
3178
|
+
highlight: string;
|
|
3161
3179
|
};
|
|
3162
3180
|
declare const TEXT_MODIFIER_SELECTORS: {
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3181
|
+
bold: string;
|
|
3182
|
+
italic: string;
|
|
3183
|
+
code: string;
|
|
3184
|
+
blockquote: string;
|
|
3185
|
+
codeBlock: string;
|
|
3168
3186
|
};
|
|
3169
3187
|
declare const LIST_MODIFIER_SELECTORS: {
|
|
3170
|
-
|
|
3171
|
-
|
|
3188
|
+
bulletList: string;
|
|
3189
|
+
orderedList: string;
|
|
3172
3190
|
};
|
|
3173
3191
|
declare const FONT_SIZE_SELECTORS: {
|
|
3174
3192
|
h1: string;
|
|
@@ -3335,11 +3353,11 @@ declare const LOGIN_SELECTORS: {
|
|
|
3335
3353
|
*
|
|
3336
3354
|
* activatedMembersButton: Selector for the activated members button.
|
|
3337
3355
|
*
|
|
3338
|
-
* columnCheckBox: Selector to get the
|
|
3356
|
+
* columnCheckBox: Selector to get the NeetoUI checkbox.
|
|
3339
3357
|
*
|
|
3340
3358
|
* roleLabel(role: string): Method that generates a selector for role labels based on the role.
|
|
3341
3359
|
*
|
|
3342
|
-
* dropDownIcon: Selector to get the
|
|
3360
|
+
* dropDownIcon: Selector to get the NeetoUI Dropdown icon button.
|
|
3343
3361
|
*
|
|
3344
3362
|
* editButton: Selector for the edit button.
|
|
3345
3363
|
*
|
|
@@ -3719,6 +3737,10 @@ declare const KEYBOARD_SHORTCUTS_SELECTORS: {
|
|
|
3719
3737
|
*
|
|
3720
3738
|
* profileSidebarCancelButton: Selector for the profile sidebar cancel button.
|
|
3721
3739
|
*
|
|
3740
|
+
* profileAvatar: Selector for the profile avatar.
|
|
3741
|
+
*
|
|
3742
|
+
* actionHeaderUserEmail: Selector for the user email.
|
|
3743
|
+
*
|
|
3722
3744
|
*/
|
|
3723
3745
|
declare const PROFILE_SECTION_SELECTORS: {
|
|
3724
3746
|
profileSectionButton: string;
|
|
@@ -3728,6 +3750,8 @@ declare const PROFILE_SECTION_SELECTORS: {
|
|
|
3728
3750
|
logoutButton: string;
|
|
3729
3751
|
neetoAuthLink: string;
|
|
3730
3752
|
profileSidebarCancelButton: string;
|
|
3753
|
+
profileAvatar: string;
|
|
3754
|
+
actionHeaderUserEmail: string;
|
|
3731
3755
|
};
|
|
3732
3756
|
/**
|
|
3733
3757
|
*
|
|
@@ -4160,7 +4184,7 @@ declare const TOASTR_MESSAGES: {
|
|
|
4160
4184
|
*/
|
|
4161
4185
|
declare const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
|
|
4162
4186
|
declare const EMOJI_LABEL = "thumbs up";
|
|
4163
|
-
declare const
|
|
4187
|
+
declare const SELECT_COUNTRY = "Select country";
|
|
4164
4188
|
declare const DESCRIPTION_EDITOR_TEXTS: {
|
|
4165
4189
|
fontSize: string;
|
|
4166
4190
|
paragraph: string;
|
|
@@ -4184,20 +4208,20 @@ declare const EXPANDED_FONT_SIZE: {
|
|
|
4184
4208
|
h5: string;
|
|
4185
4209
|
};
|
|
4186
4210
|
declare const TEXT_MODIFIER_TAGS: {
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4211
|
+
underline: string;
|
|
4212
|
+
strike: string;
|
|
4213
|
+
highlight: string;
|
|
4190
4214
|
};
|
|
4191
4215
|
declare const TEXT_MODIFIER_ROLES: {
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4216
|
+
bold: string;
|
|
4217
|
+
italic: string;
|
|
4218
|
+
code: string;
|
|
4219
|
+
blockquote: string;
|
|
4220
|
+
codeBlock: string;
|
|
4197
4221
|
};
|
|
4198
4222
|
declare const LIST_MODIFIER_TAGS: {
|
|
4199
|
-
|
|
4200
|
-
|
|
4223
|
+
bulletList: string;
|
|
4224
|
+
orderedList: string;
|
|
4201
4225
|
};
|
|
4202
4226
|
/**
|
|
4203
4227
|
*
|
|
@@ -5071,4 +5095,4 @@ interface Overrides {
|
|
|
5071
5095
|
* @endexample
|
|
5072
5096
|
*/
|
|
5073
5097
|
declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
|
|
5074
|
-
export { API_ROUTES,
|
|
5098
|
+
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, 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, MailosaurUtils, 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, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, USER_AGENTS, 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, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
package/index.js
CHANGED
|
@@ -276,6 +276,7 @@ const COMMON_SELECTORS = {
|
|
|
276
276
|
windowAlert: "#alert-box",
|
|
277
277
|
body: "body",
|
|
278
278
|
toastIcon: ".Toastify__toast-icon",
|
|
279
|
+
toastContainer: ".Toastify__toast-container",
|
|
279
280
|
paneModalCrossIcon: "pane-close-button",
|
|
280
281
|
inputField: "nui-input-field",
|
|
281
282
|
alertBox: "alert-box",
|
|
@@ -337,6 +338,7 @@ const COMMON_SELECTORS = {
|
|
|
337
338
|
modalForever: "modal-footer",
|
|
338
339
|
navigationHeader: "navigation-header",
|
|
339
340
|
buttonSpinner: ".neeto-ui-btn__spinner",
|
|
341
|
+
customSelectValueContainer: (label = "nui") => `${hyphenize(label)}-select-value-container`,
|
|
340
342
|
};
|
|
341
343
|
|
|
342
344
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -3562,14 +3564,17 @@ class CustomCommands {
|
|
|
3562
3564
|
: verifyEachFieldValue(values);
|
|
3563
3565
|
};
|
|
3564
3566
|
this.searchAndVerify = async ({ searchTerm, searchInputSelector = COMMON_SELECTORS.inputField, countSelector, countText, }) => {
|
|
3565
|
-
await
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3567
|
+
await this.page.getByTestId(searchInputSelector).clear();
|
|
3568
|
+
await this.page
|
|
3569
|
+
.getByTestId(searchInputSelector)
|
|
3570
|
+
.pressSequentially(searchTerm, { delay: 100 });
|
|
3571
|
+
await expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden({
|
|
3572
|
+
timeout: 10000,
|
|
3573
|
+
});
|
|
3574
|
+
await expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.searchTermBlock)).toBeVisible();
|
|
3575
|
+
await this.waitForPageLoad();
|
|
3576
|
+
await expect(this.page.getByRole("cell", { name: searchTerm })).toBeVisible();
|
|
3577
|
+
await expect(this.page.getByTestId(countSelector)).toContainText(countText);
|
|
3573
3578
|
};
|
|
3574
3579
|
this.uploadImage = async (localImagePath) => {
|
|
3575
3580
|
const { imageName, imagePath } = getImagePathAndName(localImagePath);
|
|
@@ -12889,7 +12894,7 @@ const TOASTR_MESSAGES = {
|
|
|
12889
12894
|
};
|
|
12890
12895
|
const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
|
|
12891
12896
|
const EMOJI_LABEL = "thumbs up";
|
|
12892
|
-
const
|
|
12897
|
+
const SELECT_COUNTRY = "Select country";
|
|
12893
12898
|
|
|
12894
12899
|
const HELP_CENTER_SELECTORS = {
|
|
12895
12900
|
helpButton: "help-button",
|
|
@@ -12911,6 +12916,8 @@ const PROFILE_SECTION_SELECTORS = {
|
|
|
12911
12916
|
logoutButton: "profile-logout-button",
|
|
12912
12917
|
neetoAuthLink: "ntm-visit-auth-button",
|
|
12913
12918
|
profileSidebarCancelButton: "ntm-profile-cancel-button",
|
|
12919
|
+
profileAvatar: "profile-avatar",
|
|
12920
|
+
actionHeaderUserEmail: "floating-action-menu-header-user-email",
|
|
12914
12921
|
};
|
|
12915
12922
|
|
|
12916
12923
|
const CHAT_WIDGET_SELECTORS = {
|
|
@@ -13774,20 +13781,20 @@ const EXPANDED_FONT_SIZE = {
|
|
|
13774
13781
|
h5: "Heading 5",
|
|
13775
13782
|
};
|
|
13776
13783
|
const TEXT_MODIFIER_TAGS = {
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13784
|
+
underline: "u",
|
|
13785
|
+
strike: "s",
|
|
13786
|
+
highlight: "mark",
|
|
13780
13787
|
};
|
|
13781
13788
|
const TEXT_MODIFIER_ROLES = {
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
13789
|
+
bold: "strong",
|
|
13790
|
+
italic: "emphasis",
|
|
13791
|
+
code: "code",
|
|
13792
|
+
blockquote: "blockquote",
|
|
13793
|
+
codeBlock: "code",
|
|
13787
13794
|
};
|
|
13788
13795
|
const LIST_MODIFIER_TAGS = {
|
|
13789
|
-
|
|
13790
|
-
|
|
13796
|
+
bulletList: "ul",
|
|
13797
|
+
orderedList: "ol",
|
|
13791
13798
|
};
|
|
13792
13799
|
|
|
13793
13800
|
const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
|
|
@@ -13848,20 +13855,20 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
13848
13855
|
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${hyphenate(variable)}`,
|
|
13849
13856
|
};
|
|
13850
13857
|
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
13851
|
-
|
|
13852
|
-
|
|
13853
|
-
|
|
13858
|
+
strike: optionSelector("strike"),
|
|
13859
|
+
underline: optionSelector("underline"),
|
|
13860
|
+
highlight: optionSelector("highlight"),
|
|
13854
13861
|
};
|
|
13855
13862
|
const TEXT_MODIFIER_SELECTORS = {
|
|
13856
|
-
|
|
13857
|
-
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
|
|
13863
|
+
bold: optionSelector("bold"),
|
|
13864
|
+
italic: optionSelector("italic"),
|
|
13865
|
+
code: optionSelector("code"),
|
|
13866
|
+
blockquote: optionSelector("blockquote"),
|
|
13867
|
+
codeBlock: optionSelector("codeBlock"),
|
|
13861
13868
|
};
|
|
13862
13869
|
const LIST_MODIFIER_SELECTORS = {
|
|
13863
|
-
|
|
13864
|
-
|
|
13870
|
+
bulletList: optionSelector("bulletList"),
|
|
13871
|
+
orderedList: optionSelector("orderedList"),
|
|
13865
13872
|
};
|
|
13866
13873
|
const FONT_SIZE_SELECTORS = {
|
|
13867
13874
|
h1: fixedMenuSelector("font-size-option-h1"),
|
|
@@ -13873,12 +13880,36 @@ const FONT_SIZE_SELECTORS = {
|
|
|
13873
13880
|
|
|
13874
13881
|
class EditorPage {
|
|
13875
13882
|
constructor(page, neetoPlaywrightUtilities, editorWrapper) {
|
|
13876
|
-
this.
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
|
|
13880
|
-
|
|
13881
|
-
|
|
13883
|
+
this.linkUrl = faker.internet.url();
|
|
13884
|
+
this.filePath = "../../../e2e/assets/images/BigBinary.png";
|
|
13885
|
+
this.imageUrl = "https://picsum.photos/200/300";
|
|
13886
|
+
this.videoUrl = "https://youtu.be/jNQXAC9IVRw";
|
|
13887
|
+
this.cannedResponseSuccessMessage = "";
|
|
13888
|
+
this.cleanString = (selector = "") => (selector === null || selector === void 0 ? void 0 : selector.replace("neeto-editor-fixed-menu-", "").replace("-option", "")) ||
|
|
13889
|
+
"";
|
|
13890
|
+
this.fixedMenuOptions = async () => {
|
|
13891
|
+
(await this.fixedMenuArrowSelector.isVisible()) &&
|
|
13892
|
+
(await this.fixedMenuArrowSelector.click());
|
|
13893
|
+
const fixedMenuButtons = await this.editorWrapper
|
|
13894
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
|
|
13895
|
+
.getByRole("button")
|
|
13896
|
+
.all();
|
|
13897
|
+
(await this.moreMenuSelector.isVisible()) && fixedMenuButtons.pop();
|
|
13898
|
+
return Promise.all(fixedMenuButtons.map(async (button) => {
|
|
13899
|
+
const dataCy = await button.getAttribute("data-cy");
|
|
13900
|
+
return this.cleanString(dataCy);
|
|
13901
|
+
}));
|
|
13902
|
+
};
|
|
13903
|
+
this.moreMenuOptions = async () => {
|
|
13904
|
+
await this.moreMenuSelector.click();
|
|
13905
|
+
const moreMenuButtons = await this.page
|
|
13906
|
+
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
13907
|
+
.getByRole("button")
|
|
13908
|
+
.all();
|
|
13909
|
+
return Promise.all(moreMenuButtons.map(async (button) => {
|
|
13910
|
+
const dataCy = await button.getAttribute("data-cy");
|
|
13911
|
+
return this.cleanString(dataCy);
|
|
13912
|
+
}));
|
|
13882
13913
|
};
|
|
13883
13914
|
this.verifyFontSize = async () => {
|
|
13884
13915
|
const fontSizeDropdown = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.fontSize);
|
|
@@ -13893,42 +13924,24 @@ class EditorPage {
|
|
|
13893
13924
|
await fontSizeDropdown.click();
|
|
13894
13925
|
}
|
|
13895
13926
|
};
|
|
13896
|
-
this.verifyTextModifiers = async () => {
|
|
13897
|
-
const
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
|
|
13902
|
-
if (await this.assertOptionVisibility(textModifierSelector)) {
|
|
13903
|
-
await textModifierSelector.click();
|
|
13904
|
-
await expect(this.contentField.getByRole(textModifierRole)).toBeVisible();
|
|
13905
|
-
await textModifierSelector.click();
|
|
13906
|
-
}
|
|
13907
|
-
}
|
|
13927
|
+
this.verifyTextModifiers = async (modifier) => {
|
|
13928
|
+
const modifierKey = modifier;
|
|
13929
|
+
const textModifierRole = TEXT_MODIFIER_ROLES[modifierKey];
|
|
13930
|
+
const textModifierSelector = this.editorWrapper.getByTestId(TEXT_MODIFIER_SELECTORS[modifierKey]);
|
|
13931
|
+
await textModifierSelector.click();
|
|
13932
|
+
await expect(this.contentField.getByRole(textModifierRole)).toBeVisible();
|
|
13908
13933
|
};
|
|
13909
|
-
this.verifyTextDeskModifier = async () => {
|
|
13910
|
-
const
|
|
13911
|
-
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
if (await this.assertOptionVisibility(textModifierSelector)) {
|
|
13915
|
-
await textModifierSelector.click();
|
|
13916
|
-
await expect(this.contentField.locator(TEXT_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13917
|
-
await textModifierSelector.click();
|
|
13918
|
-
}
|
|
13919
|
-
}
|
|
13934
|
+
this.verifyTextDeskModifier = async (modifier) => {
|
|
13935
|
+
const modifierKey = modifier;
|
|
13936
|
+
const textModifierSelector = this.editorWrapper.getByTestId(NEETO_TEXT_MODIFIER_SELECTORS[modifierKey]);
|
|
13937
|
+
await textModifierSelector.click();
|
|
13938
|
+
await expect(this.contentField.locator(TEXT_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13920
13939
|
};
|
|
13921
|
-
this.verifyListModifiers = async () => {
|
|
13922
|
-
const
|
|
13923
|
-
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
if (await this.assertOptionVisibility(listModifierSelector)) {
|
|
13927
|
-
await listModifierSelector.click();
|
|
13928
|
-
await expect(this.contentField.locator(LIST_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13929
|
-
await listModifierSelector.click();
|
|
13930
|
-
}
|
|
13931
|
-
}
|
|
13940
|
+
this.verifyListModifiers = async (modifier) => {
|
|
13941
|
+
const modifierKey = modifier;
|
|
13942
|
+
const listModifierSelector = this.editorWrapper.getByTestId(LIST_MODIFIER_SELECTORS[modifierKey]);
|
|
13943
|
+
await listModifierSelector.click();
|
|
13944
|
+
await expect(this.contentField.locator(LIST_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13932
13945
|
};
|
|
13933
13946
|
this.verifyEditorLinkButton = async (linkUrl) => {
|
|
13934
13947
|
await this.editorLinkButton.click();
|
|
@@ -13951,7 +13964,6 @@ class EditorPage {
|
|
|
13951
13964
|
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
13952
13965
|
responseUrl: ROUTES.attachment,
|
|
13953
13966
|
});
|
|
13954
|
-
await this.neetoPlaywrightUtilities.verifyToast();
|
|
13955
13967
|
await expect(this.attachmentPreview).toBeVisible();
|
|
13956
13968
|
await this.attachmentPreview
|
|
13957
13969
|
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
@@ -13962,9 +13974,7 @@ class EditorPage {
|
|
|
13962
13974
|
await this.page
|
|
13963
13975
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
13964
13976
|
.click();
|
|
13965
|
-
await this.
|
|
13966
|
-
message: ATTACHMENT_DELETION_TOASTR_MESSAGE,
|
|
13967
|
-
});
|
|
13977
|
+
await expect(this.attachmentPreview).toBeHidden({ timeout: 10000 });
|
|
13968
13978
|
};
|
|
13969
13979
|
this.verifyImageUploadOption = async ({ imageUrl, filePath, }) => {
|
|
13970
13980
|
await this.imageUploadOption.click();
|
|
@@ -13981,6 +13991,8 @@ class EditorPage {
|
|
|
13981
13991
|
await expect(this.imageWrapper).toBeHidden({
|
|
13982
13992
|
timeout: 15000,
|
|
13983
13993
|
});
|
|
13994
|
+
(await this.imageUploadOption.isHidden()) &&
|
|
13995
|
+
(await this.moreMenuSelector.click());
|
|
13984
13996
|
await this.imageUploadOption.click();
|
|
13985
13997
|
await this.page
|
|
13986
13998
|
.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkButton)
|
|
@@ -14050,38 +14062,63 @@ class EditorPage {
|
|
|
14050
14062
|
await expect(this.contentField.getByText(dynamicVariable)).toBeVisible();
|
|
14051
14063
|
}
|
|
14052
14064
|
};
|
|
14053
|
-
this.
|
|
14065
|
+
this.buttonsAndVerifications = {
|
|
14066
|
+
"font-size": this.verifyFontSize,
|
|
14067
|
+
emoji: this.verifyEmojiSelector,
|
|
14068
|
+
bold: () => this.verifyTextModifiers("bold"),
|
|
14069
|
+
italic: () => this.verifyTextModifiers("italic"),
|
|
14070
|
+
code: () => this.verifyTextModifiers("code"),
|
|
14071
|
+
blockquote: () => this.verifyTextModifiers("blockquote"),
|
|
14072
|
+
codeBlock: () => this.verifyTextModifiers("codeBlock"),
|
|
14073
|
+
underline: () => this.verifyTextDeskModifier("underline"),
|
|
14074
|
+
strike: () => this.verifyTextDeskModifier("strike"),
|
|
14075
|
+
highlight: () => this.verifyTextDeskModifier("highlight"),
|
|
14076
|
+
bulletList: () => this.verifyListModifiers("bulletList"),
|
|
14077
|
+
orderedList: () => this.verifyListModifiers("orderedList"),
|
|
14078
|
+
link: () => this.verifyEditorLinkButton(this.linkUrl),
|
|
14079
|
+
attachments: () => this.verifyEditorAttachmentsButton(this.filePath),
|
|
14080
|
+
"image-upload": () => this.verifyImageUploadOption({
|
|
14081
|
+
imageUrl: this.imageUrl,
|
|
14082
|
+
filePath: this.filePath,
|
|
14083
|
+
}),
|
|
14084
|
+
"canned-responses": this.verifyCannedResponseOption,
|
|
14085
|
+
"video-embed": () => this.verifyVideoEmbedOption(this.videoUrl),
|
|
14086
|
+
};
|
|
14087
|
+
this.verifyDescriptionEditor = async ({ text, dynamicVariables, linkUrl, filePath, imageUrl, videoUrl, cannedResponseSuccessMessage, }) => {
|
|
14088
|
+
const fixedMenuButtons = await this.fixedMenuOptions();
|
|
14089
|
+
let moreMenuButtons = [];
|
|
14090
|
+
(await this.moreMenuSelector.isVisible()) &&
|
|
14091
|
+
(moreMenuButtons = await this.moreMenuOptions());
|
|
14092
|
+
const needToSkipDisabling = [
|
|
14093
|
+
"link",
|
|
14094
|
+
"attachments",
|
|
14095
|
+
"image-upload",
|
|
14096
|
+
"canned-responses",
|
|
14097
|
+
"video-embed",
|
|
14098
|
+
"emoji",
|
|
14099
|
+
];
|
|
14100
|
+
this.linkUrl = linkUrl || this.linkUrl;
|
|
14101
|
+
this.filePath = filePath || this.filePath;
|
|
14102
|
+
this.imageUrl = imageUrl || this.imageUrl;
|
|
14103
|
+
this.videoUrl = videoUrl || this.videoUrl;
|
|
14104
|
+
this.cannedResponseSuccessMessage = cannedResponseSuccessMessage;
|
|
14054
14105
|
await this.contentField.fill(text);
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
await this.
|
|
14058
|
-
|
|
14059
|
-
|
|
14106
|
+
for (const button of fixedMenuButtons) {
|
|
14107
|
+
await this.contentField.click({ clickCount: 3 });
|
|
14108
|
+
await this.buttonsAndVerifications[button]();
|
|
14109
|
+
!needToSkipDisabling.includes(button) &&
|
|
14110
|
+
(await this.editorWrapper.getByTestId(optionSelector(button)).click());
|
|
14060
14111
|
}
|
|
14061
|
-
(
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
(await this.assertOptionVisibility(this.imageUploadOption)) &&
|
|
14072
|
-
(await this.verifyImageUploadOption({
|
|
14073
|
-
imageUrl,
|
|
14074
|
-
filePath,
|
|
14075
|
-
}));
|
|
14076
|
-
(await this.assertOptionVisibility(this.cannedResponseOption)) &&
|
|
14077
|
-
(await this.verifyCannedResponseOption(cannedResponseSuccessMessage));
|
|
14078
|
-
(await this.assertOptionVisibility(this.videoEmbedOption)) &&
|
|
14079
|
-
(await this.verifyVideoEmbedOption(videoUrl));
|
|
14080
|
-
(await this.assertOptionVisibility(this.emojiSelector)) &&
|
|
14081
|
-
(await this.verifyEmojiSelector());
|
|
14082
|
-
dynamicVariables &&
|
|
14083
|
-
(await this.assertOptionVisibility(this.dynamicVariablesButton)) &&
|
|
14084
|
-
(await this.verifyDynamicVariables(dynamicVariables));
|
|
14112
|
+
for (const button of moreMenuButtons) {
|
|
14113
|
+
await this.contentField.click({ clickCount: 3 });
|
|
14114
|
+
await this.moreMenuSelector.click();
|
|
14115
|
+
await this.buttonsAndVerifications[button]();
|
|
14116
|
+
if (!needToSkipDisabling.includes(button)) {
|
|
14117
|
+
await this.moreMenuSelector.click();
|
|
14118
|
+
await this.editorWrapper.getByTestId(optionSelector(button)).click();
|
|
14119
|
+
}
|
|
14120
|
+
}
|
|
14121
|
+
dynamicVariables && (await this.verifyDynamicVariables(dynamicVariables));
|
|
14085
14122
|
};
|
|
14086
14123
|
this.page = page;
|
|
14087
14124
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
@@ -14089,7 +14126,6 @@ class EditorPage {
|
|
|
14089
14126
|
this.editorWrapper = this.page;
|
|
14090
14127
|
if (editorWrapper)
|
|
14091
14128
|
this.editorWrapper = editorWrapper;
|
|
14092
|
-
this.paragraphSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.paragraphOption);
|
|
14093
14129
|
this.fixedMenuArrowSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuArrow);
|
|
14094
14130
|
this.editorLinkButton = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.linkOption);
|
|
14095
14131
|
this.attachmentPreview = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreview);
|
|
@@ -14102,7 +14138,9 @@ class EditorPage {
|
|
|
14102
14138
|
this.videoEmbedInput = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedInput);
|
|
14103
14139
|
this.videoWrapperSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.videoWrapper);
|
|
14104
14140
|
this.emojiSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.emojiOption);
|
|
14105
|
-
this.moreMenuSelector = this.editorWrapper
|
|
14141
|
+
this.moreMenuSelector = this.editorWrapper
|
|
14142
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
|
|
14143
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon);
|
|
14106
14144
|
this.contentField = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.contentField);
|
|
14107
14145
|
this.dynamicVariablesButton = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.dynamicVariablesButton);
|
|
14108
14146
|
}
|
|
@@ -14651,13 +14689,14 @@ class OrganizationPage {
|
|
|
14651
14689
|
.getByTestId(SIGNUP_SELECTORS.otpTextBox)
|
|
14652
14690
|
.fill(faker.string.numeric(6));
|
|
14653
14691
|
};
|
|
14654
|
-
this.setupProfile = async ({ firstName = faker.person.firstName(), lastName = faker.person.lastName(), } = {}) => {
|
|
14692
|
+
this.setupProfile = async ({ firstName = faker.person.firstName(), lastName = faker.person.lastName(), country, } = {}) => {
|
|
14655
14693
|
await this.page
|
|
14656
14694
|
.getByTestId(SIGNUP_SELECTORS.firstNameTextField)
|
|
14657
14695
|
.fill(firstName);
|
|
14658
14696
|
await this.page
|
|
14659
14697
|
.getByTestId(SIGNUP_SELECTORS.lastNameTextField)
|
|
14660
14698
|
.fill(lastName);
|
|
14699
|
+
country && (await this.changeCountry(country));
|
|
14661
14700
|
await this.page.getByTestId(COMMON_SELECTORS.checkbox).click();
|
|
14662
14701
|
const submitProfile = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14663
14702
|
customPageContext: this.page,
|
|
@@ -14669,10 +14708,10 @@ class OrganizationPage {
|
|
|
14669
14708
|
await submitProfile;
|
|
14670
14709
|
await expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden();
|
|
14671
14710
|
};
|
|
14672
|
-
this.loginAndOnboard = async ({ email, firstName, lastName, handleOnboarding, }) => {
|
|
14711
|
+
this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, }) => {
|
|
14673
14712
|
await this.page.goto(ROUTES.admin);
|
|
14674
14713
|
await this.loginViaSSO(email);
|
|
14675
|
-
await this.setupProfile({ firstName, lastName });
|
|
14714
|
+
await this.setupProfile({ firstName, lastName, country });
|
|
14676
14715
|
await this.page.waitForURL(new RegExp(getGlobalUserState().domain), {
|
|
14677
14716
|
waitUntil: "load",
|
|
14678
14717
|
});
|
|
@@ -14741,6 +14780,13 @@ class OrganizationPage {
|
|
|
14741
14780
|
lastName: credentials.lastName,
|
|
14742
14781
|
});
|
|
14743
14782
|
};
|
|
14783
|
+
this.changeCountry = async (country) => {
|
|
14784
|
+
const countrySelector = this.page.getByTestId(COMMON_SELECTORS.customSelectValueContainer(SELECT_COUNTRY));
|
|
14785
|
+
await countrySelector.click();
|
|
14786
|
+
await countrySelector.pressSequentially(country);
|
|
14787
|
+
await this.page.getByTestId(COMMON_SELECTORS.selectOption(country)).click();
|
|
14788
|
+
await expect(countrySelector).toContainText(country);
|
|
14789
|
+
};
|
|
14744
14790
|
this.page = page;
|
|
14745
14791
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
14746
14792
|
}
|
|
@@ -148853,5 +148899,5 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
148853
148899
|
});
|
|
148854
148900
|
};
|
|
148855
148901
|
|
|
148856
|
-
export { API_ROUTES,
|
|
148902
|
+
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, 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, MailosaurUtils, 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, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, USER_AGENTS, 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, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
148857
148903
|
//# sourceMappingURL=index.js.map
|