@bigbinary/neeto-playwright-commons 1.9.20 → 1.9.21
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 +7 -12
- package/index.cjs.js.map +1 -1
- package/index.d.ts +27 -2
- package/index.js +7 -12
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1327,7 +1327,7 @@ declare class ZapierPage extends IntegrationBase {
|
|
|
1327
1327
|
interface VerifyDescriptionEditorParams {
|
|
1328
1328
|
text: string;
|
|
1329
1329
|
linkUrl?: string;
|
|
1330
|
-
|
|
1330
|
+
filePath?: string;
|
|
1331
1331
|
attachedImageName?: string;
|
|
1332
1332
|
imageUrl?: string;
|
|
1333
1333
|
videoUrl?: string;
|
|
@@ -1350,10 +1350,34 @@ declare class EditorPage {
|
|
|
1350
1350
|
videoWrapperSelector: Locator;
|
|
1351
1351
|
emojiDropdownIcon: Locator;
|
|
1352
1352
|
constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
|
|
1353
|
+
/**
|
|
1354
|
+
*
|
|
1355
|
+
* Used to verify description editor functionality
|
|
1356
|
+
*
|
|
1357
|
+
* text (required): The text to be filled in editor content field.
|
|
1358
|
+
*
|
|
1359
|
+
* linkUrl (optional): The url to be added when we select the button on the editor menu to link a url to a text. Default is faker.internet.url().
|
|
1360
|
+
*
|
|
1361
|
+
* filePath (optional): The file path to be added when we select the button on the editor menu to attach a file in the editor. Default is "../../../e2e/assets/images/BigBinary.png".
|
|
1362
|
+
*
|
|
1363
|
+
* imageUrl (optional): The url to be added when we select the button on the editor menu to upload an image in the editor. Default is https://picsum.photos/200/300.
|
|
1364
|
+
*
|
|
1365
|
+
* videoUrl (optional): The url to be added when we select the button on the editor menu to upload a video in the editor. Default is https://youtu.be/jNQXAC9IVRw.
|
|
1366
|
+
*
|
|
1367
|
+
* cannedResponseSuccessMessage (optional): The success toastr message after applying canned reesponse.
|
|
1368
|
+
*
|
|
1369
|
+
* @example
|
|
1370
|
+
*
|
|
1371
|
+
* await editorPage.verifyDescriptionEditor({
|
|
1372
|
+
* text: t("tickets.updated_one"),
|
|
1373
|
+
* cannedResponseSuccessMessage: t("messages.successCannedResponse"),
|
|
1374
|
+
* });
|
|
1375
|
+
* @endexample
|
|
1376
|
+
*/
|
|
1353
1377
|
verifyDescriptionEditor: ({
|
|
1354
1378
|
text,
|
|
1355
1379
|
linkUrl,
|
|
1356
|
-
|
|
1380
|
+
filePath,
|
|
1357
1381
|
imageUrl,
|
|
1358
1382
|
videoUrl,
|
|
1359
1383
|
cannedResponseSuccessMessage
|
|
@@ -2812,6 +2836,7 @@ declare const NEETO_EDITOR_SELECTORS: {
|
|
|
2812
2836
|
imageUploadLinkButton: string;
|
|
2813
2837
|
errorText: string;
|
|
2814
2838
|
content: string;
|
|
2839
|
+
imageUploadDeleteButton: string;
|
|
2815
2840
|
};
|
|
2816
2841
|
declare const NEETO_TEXT_MODIFIER_SELECTORS: {
|
|
2817
2842
|
strikeOption: string;
|
package/index.js
CHANGED
|
@@ -14424,13 +14424,13 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
14424
14424
|
videoEmbedOption: "neeto-editor-fixed-menu-video-embed-option",
|
|
14425
14425
|
videoEmbedInput: "neeto-editor-embed-input",
|
|
14426
14426
|
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
14427
|
-
|
|
14428
|
-
videoWrapper: ".neeto-editor__video-wrapper",
|
|
14427
|
+
videoWrapper: "neeto-editor-video-wrapper",
|
|
14429
14428
|
paragraphOption: "neeto-editor-fixed-menu-font-size-option-body2",
|
|
14430
14429
|
attachmentPreview: "ne-attachments-wrapper",
|
|
14431
14430
|
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
14432
14431
|
errorText: "neeto-editor-error-text",
|
|
14433
14432
|
content: "editor-content",
|
|
14433
|
+
imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
|
|
14434
14434
|
};
|
|
14435
14435
|
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
14436
14436
|
strikeOption: "neeto-editor-fixed-menu-strike-option",
|
|
@@ -14459,7 +14459,7 @@ const FONT_SIZE_SELECTORS = {
|
|
|
14459
14459
|
/* eslint-disable playwright/no-nth-methods */
|
|
14460
14460
|
class EditorPage {
|
|
14461
14461
|
constructor(page, neetoPlaywrightUtilities) {
|
|
14462
|
-
this.verifyDescriptionEditor = async ({ text, linkUrl = faker.internet.url(),
|
|
14462
|
+
this.verifyDescriptionEditor = async ({ text, linkUrl = faker.internet.url(), filePath = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
|
|
14463
14463
|
await this.page.getByTestId(NEETO_EDITOR_SELECTORS.contentField).fill(text);
|
|
14464
14464
|
await this.page
|
|
14465
14465
|
.getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown())
|
|
@@ -14540,7 +14540,7 @@ class EditorPage {
|
|
|
14540
14540
|
const fileUploaderPromise = this.page.waitForEvent("filechooser");
|
|
14541
14541
|
await this.editorAttachmentsButton.click();
|
|
14542
14542
|
const fileUploader = await fileUploaderPromise;
|
|
14543
|
-
const imagePath = Path.join(__dirname,
|
|
14543
|
+
const imagePath = Path.join(__dirname, filePath);
|
|
14544
14544
|
await fileUploader.setFiles(imagePath);
|
|
14545
14545
|
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14546
14546
|
responseUrl: ROUTES.attachment,
|
|
@@ -14567,7 +14567,7 @@ class EditorPage {
|
|
|
14567
14567
|
.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadButton)
|
|
14568
14568
|
.click();
|
|
14569
14569
|
const fileUploader = await fileUploaderPromise;
|
|
14570
|
-
const imagePath = Path.join(__dirname,
|
|
14570
|
+
const imagePath = Path.join(__dirname, filePath);
|
|
14571
14571
|
await fileUploader.setFiles(imagePath);
|
|
14572
14572
|
await expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
|
|
14573
14573
|
await this.neetoPlaywrightUtilities.verifySuccessToast();
|
|
@@ -14648,16 +14648,11 @@ class EditorPage {
|
|
|
14648
14648
|
this.attachmentPreview = this.page.getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreview);
|
|
14649
14649
|
this.editorAttachmentsButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.editorAttachmentsButton);
|
|
14650
14650
|
this.imageWrapper = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageWrapper);
|
|
14651
|
-
|
|
14652
|
-
this.imageUploadDeleteButton = this.page
|
|
14653
|
-
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
14654
|
-
.getByRole("button")
|
|
14655
|
-
.nth(3);
|
|
14651
|
+
this.imageUploadDeleteButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadDeleteButton);
|
|
14656
14652
|
this.imageUploadOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadOption);
|
|
14657
14653
|
this.cannedResponseOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.cannedResponseOption);
|
|
14658
14654
|
this.videoEmbedOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedOption);
|
|
14659
|
-
|
|
14660
|
-
this.videoWrapperSelector = this.page.locator(NEETO_EDITOR_SELECTORS.videoWrapper);
|
|
14655
|
+
this.videoWrapperSelector = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoWrapper);
|
|
14661
14656
|
this.emojiDropdownIcon = this.page
|
|
14662
14657
|
.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
|
|
14663
14658
|
.getByTestId(COMMON_SELECTORS.dropdownIcon);
|