@bigbinary/neeto-playwright-commons 1.8.35 → 1.8.37
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 +608 -252
- package/index.cjs.js.map +1 -1
- package/index.d.ts +77 -2
- package/index.js +608 -254
- package/index.js.map +1 -1
- package/package.json +43 -43
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _playwright_test from '@playwright/test';
|
|
2
|
-
import { Page, APIRequestContext, Response, APIResponse, Fixtures, PlaywrightWorkerArgs, PlaywrightWorkerOptions, PlaywrightTestArgs, PlaywrightTestOptions, Browser,
|
|
2
|
+
import { Page, APIRequestContext, Response, APIResponse, Fixtures, PlaywrightWorkerArgs, PlaywrightWorkerOptions, PlaywrightTestArgs, PlaywrightTestOptions, Browser, BrowserContext, FrameLocator, Locator, CDPSession } from '@playwright/test';
|
|
3
3
|
import MailosaurClient from 'mailosaur';
|
|
4
4
|
import { I18nPlaywrightFixture } from 'playwright-i18next-fixture';
|
|
5
5
|
import { TFunction } from 'i18next';
|
|
@@ -111,6 +111,78 @@ declare const _default: _playwright_test.TestType<_playwright_test.PlaywrightTes
|
|
|
111
111
|
|
|
112
112
|
declare const i18nFixture: Fixtures<I18nPlaywrightFixture, PlaywrightWorkerArgs & PlaywrightWorkerOptions, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
|
|
113
113
|
|
|
114
|
+
type EmbedType = "inline" | "floatingPopup" | "elementClick";
|
|
115
|
+
type GetByRoleOptions = {
|
|
116
|
+
checked?: boolean;
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
exact?: boolean;
|
|
119
|
+
expanded?: boolean;
|
|
120
|
+
includeHidden?: boolean;
|
|
121
|
+
level?: number;
|
|
122
|
+
name?: string | RegExp;
|
|
123
|
+
pressed?: boolean;
|
|
124
|
+
selected?: boolean;
|
|
125
|
+
};
|
|
126
|
+
type InlineCustomizationOptions = {
|
|
127
|
+
embedHeight: string;
|
|
128
|
+
embedWidth: string;
|
|
129
|
+
embedDivContainerId: string;
|
|
130
|
+
};
|
|
131
|
+
type VerifyInlineCustomizationParams = {
|
|
132
|
+
headingTestId: string;
|
|
133
|
+
inlineEmbedInterceptParams: Partial<InterceptMultipleResponsesParams>;
|
|
134
|
+
customizationOptions: InlineCustomizationOptions;
|
|
135
|
+
};
|
|
136
|
+
type FloatingPopupCustomizationOptions = {
|
|
137
|
+
buttonText: string;
|
|
138
|
+
buttonColorHex: string;
|
|
139
|
+
buttonTextColorHex: string;
|
|
140
|
+
buttonPosition: "Bottom left" | "Bottom right";
|
|
141
|
+
};
|
|
142
|
+
type ElementClickCustomizationOptions = {
|
|
143
|
+
customId: string;
|
|
144
|
+
};
|
|
145
|
+
type initializeEmbedPageParams = {
|
|
146
|
+
embedType: EmbedType;
|
|
147
|
+
embedCode: string;
|
|
148
|
+
customElementText?: string;
|
|
149
|
+
};
|
|
150
|
+
type EmbedBasePageConstructorParams = {
|
|
151
|
+
context: BrowserContext;
|
|
152
|
+
page: Page;
|
|
153
|
+
neetoPlaywrightUtilities: CustomCommands;
|
|
154
|
+
appName: string;
|
|
155
|
+
};
|
|
156
|
+
declare class EmbedBase {
|
|
157
|
+
context: BrowserContext;
|
|
158
|
+
page: Page;
|
|
159
|
+
neetoPlaywrightUtilities: CustomCommands;
|
|
160
|
+
appName: string;
|
|
161
|
+
t: TFunction;
|
|
162
|
+
embedTestPage: Page;
|
|
163
|
+
embedTestPageType: EmbedType;
|
|
164
|
+
embeddedFrame: FrameLocator;
|
|
165
|
+
filePath: string;
|
|
166
|
+
codeBlock: Locator;
|
|
167
|
+
previewTab: Locator;
|
|
168
|
+
constructor({ context, page, neetoPlaywrightUtilities, appName, }: EmbedBasePageConstructorParams);
|
|
169
|
+
initializeEmbedPage: ({ embedType, embedCode, customElementText, }: initializeEmbedPageParams) => Promise<Page>;
|
|
170
|
+
closeEmbedModalAndPage: () => Promise<void>;
|
|
171
|
+
clickOnPopupButton: (popUpButtonSelectorOptions: GetByRoleOptions) => Promise<void>;
|
|
172
|
+
copyEmbedScript: ({ embedLabel }: {
|
|
173
|
+
embedLabel: string;
|
|
174
|
+
}) => Promise<string>;
|
|
175
|
+
selectEmbedType: (embedLabel: string) => Promise<void>;
|
|
176
|
+
verifyInlineCustomization: ({ headingTestId, inlineEmbedInterceptParams, customizationOptions, }: VerifyInlineCustomizationParams) => Promise<void>;
|
|
177
|
+
verifyFloatingPopupCustomization: (customizationOptions: FloatingPopupCustomizationOptions) => Promise<void>;
|
|
178
|
+
verifyElementClickCustomization: (customizationOptions: ElementClickCustomizationOptions) => Promise<void>;
|
|
179
|
+
expectMultipleTextsInCodeblock: (containTextOptions: [
|
|
180
|
+
string | RegExp,
|
|
181
|
+
string | RegExp,
|
|
182
|
+
...(string | RegExp)[]
|
|
183
|
+
]) => Promise<void>;
|
|
184
|
+
}
|
|
185
|
+
|
|
114
186
|
interface HelpAndProfilePageInitializerProps {
|
|
115
187
|
page: Page;
|
|
116
188
|
neetoPlaywrightUtilities: CustomCommands;
|
|
@@ -320,6 +392,7 @@ declare const THIRD_PARTY_ROUTES: {
|
|
|
320
392
|
declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling", Protocol.Network.emulateNetworkConditionsParameters>;
|
|
321
393
|
|
|
322
394
|
declare const COMMON_SELECTORS: {
|
|
395
|
+
copyButton: string;
|
|
323
396
|
spinner: string;
|
|
324
397
|
subheaderText: string;
|
|
325
398
|
alertTitle: string;
|
|
@@ -334,6 +407,7 @@ declare const COMMON_SELECTORS: {
|
|
|
334
407
|
paneHeader: string;
|
|
335
408
|
profileSidebar: string;
|
|
336
409
|
selectOption: (label: string) => string;
|
|
410
|
+
radioLabel: (embedLabel: string) => string;
|
|
337
411
|
toastMessage: string;
|
|
338
412
|
toastCloseButton: string;
|
|
339
413
|
windowAlert: string;
|
|
@@ -649,6 +723,7 @@ declare const skipTest: {
|
|
|
649
723
|
};
|
|
650
724
|
declare const shouldSkipSetupAndTeardown: () => boolean | "";
|
|
651
725
|
declare const squish: (text: string) => string;
|
|
726
|
+
declare const toCamelCase: (string: string) => string;
|
|
652
727
|
|
|
653
728
|
interface LoginProps {
|
|
654
729
|
page: Page;
|
|
@@ -756,4 +831,4 @@ interface Overrides {
|
|
|
756
831
|
}
|
|
757
832
|
declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
|
|
758
833
|
|
|
759
|
-
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, generateStagingData, getGlobalUserState, headerUtils, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, updateCredentials, writeDataToFile };
|
|
834
|
+
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, generateStagingData, getGlobalUserState, headerUtils, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|