@bigbinary/neeto-playwright-commons 1.9.19 → 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 +10 -12
- package/index.cjs.js.map +1 -1
- package/index.d.ts +36 -2
- package/index.js +10 -12
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -290,6 +290,7 @@ const COMMON_SELECTORS = {
|
|
|
290
290
|
pane: "pane-wrapper",
|
|
291
291
|
sideBar: "sidebar",
|
|
292
292
|
copyButton: "copy-button",
|
|
293
|
+
resetButton: "reset-button",
|
|
293
294
|
spinner: ".neeto-ui-spinner",
|
|
294
295
|
subheaderText: "subheader-left",
|
|
295
296
|
alertTitle: "alert-title",
|
|
@@ -14469,11 +14470,13 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
14469
14470
|
videoEmbedOption: "neeto-editor-fixed-menu-video-embed-option",
|
|
14470
14471
|
videoEmbedInput: "neeto-editor-embed-input",
|
|
14471
14472
|
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
14472
|
-
|
|
14473
|
-
videoWrapper: ".neeto-editor__video-wrapper",
|
|
14473
|
+
videoWrapper: "neeto-editor-video-wrapper",
|
|
14474
14474
|
paragraphOption: "neeto-editor-fixed-menu-font-size-option-body2",
|
|
14475
14475
|
attachmentPreview: "ne-attachments-wrapper",
|
|
14476
14476
|
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
14477
|
+
errorText: "neeto-editor-error-text",
|
|
14478
|
+
content: "editor-content",
|
|
14479
|
+
imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
|
|
14477
14480
|
};
|
|
14478
14481
|
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
14479
14482
|
strikeOption: "neeto-editor-fixed-menu-strike-option",
|
|
@@ -14502,7 +14505,7 @@ const FONT_SIZE_SELECTORS = {
|
|
|
14502
14505
|
/* eslint-disable playwright/no-nth-methods */
|
|
14503
14506
|
class EditorPage {
|
|
14504
14507
|
constructor(page, neetoPlaywrightUtilities) {
|
|
14505
|
-
this.verifyDescriptionEditor = async ({ text, linkUrl = faker.faker.internet.url(),
|
|
14508
|
+
this.verifyDescriptionEditor = async ({ text, linkUrl = faker.faker.internet.url(), filePath = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
|
|
14506
14509
|
await this.page.getByTestId(NEETO_EDITOR_SELECTORS.contentField).fill(text);
|
|
14507
14510
|
await this.page
|
|
14508
14511
|
.getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown())
|
|
@@ -14583,7 +14586,7 @@ class EditorPage {
|
|
|
14583
14586
|
const fileUploaderPromise = this.page.waitForEvent("filechooser");
|
|
14584
14587
|
await this.editorAttachmentsButton.click();
|
|
14585
14588
|
const fileUploader = await fileUploaderPromise;
|
|
14586
|
-
const imagePath = Path__namespace.join(__dirname,
|
|
14589
|
+
const imagePath = Path__namespace.join(__dirname, filePath);
|
|
14587
14590
|
await fileUploader.setFiles(imagePath);
|
|
14588
14591
|
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14589
14592
|
responseUrl: ROUTES.attachment,
|
|
@@ -14610,7 +14613,7 @@ class EditorPage {
|
|
|
14610
14613
|
.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadButton)
|
|
14611
14614
|
.click();
|
|
14612
14615
|
const fileUploader = await fileUploaderPromise;
|
|
14613
|
-
const imagePath = Path__namespace.join(__dirname,
|
|
14616
|
+
const imagePath = Path__namespace.join(__dirname, filePath);
|
|
14614
14617
|
await fileUploader.setFiles(imagePath);
|
|
14615
14618
|
await test$1.expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
|
|
14616
14619
|
await this.neetoPlaywrightUtilities.verifySuccessToast();
|
|
@@ -14691,16 +14694,11 @@ class EditorPage {
|
|
|
14691
14694
|
this.attachmentPreview = this.page.getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreview);
|
|
14692
14695
|
this.editorAttachmentsButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.editorAttachmentsButton);
|
|
14693
14696
|
this.imageWrapper = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageWrapper);
|
|
14694
|
-
|
|
14695
|
-
this.imageUploadDeleteButton = this.page
|
|
14696
|
-
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
14697
|
-
.getByRole("button")
|
|
14698
|
-
.nth(3);
|
|
14697
|
+
this.imageUploadDeleteButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadDeleteButton);
|
|
14699
14698
|
this.imageUploadOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadOption);
|
|
14700
14699
|
this.cannedResponseOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.cannedResponseOption);
|
|
14701
14700
|
this.videoEmbedOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedOption);
|
|
14702
|
-
|
|
14703
|
-
this.videoWrapperSelector = this.page.locator(NEETO_EDITOR_SELECTORS.videoWrapper);
|
|
14701
|
+
this.videoWrapperSelector = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoWrapper);
|
|
14704
14702
|
this.emojiDropdownIcon = this.page
|
|
14705
14703
|
.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
|
|
14706
14704
|
.getByTestId(COMMON_SELECTORS.dropdownIcon);
|