@bigbinary/neeto-playwright-commons 1.9.3 → 1.9.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 +332 -24
- package/index.cjs.js.map +1 -1
- package/index.d.ts +119 -1
- package/index.js +351 -55
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -54,6 +54,7 @@ var fs__namespace = /*#__PURE__*/_interopNamespace(fs$d);
|
|
|
54
54
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$d);
|
|
55
55
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
|
|
56
56
|
var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path);
|
|
57
|
+
var Path__namespace = /*#__PURE__*/_interopNamespace(Path);
|
|
57
58
|
var MailosaurClient__default = /*#__PURE__*/_interopDefaultLegacy(MailosaurClient);
|
|
58
59
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
59
60
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
@@ -95,6 +96,7 @@ const ROUTES = {
|
|
|
95
96
|
index: "/team_members/teams",
|
|
96
97
|
show: (id) => `/team_members/teams/${id}`,
|
|
97
98
|
},
|
|
99
|
+
attachment: `/neeto_editor${BASE_URL}/direct_uploads/attach`,
|
|
98
100
|
};
|
|
99
101
|
const API_ROUTES = {
|
|
100
102
|
teamMembers: {
|
|
@@ -12742,6 +12744,8 @@ const TOASTR_MESSAGES = {
|
|
|
12742
12744
|
zapierApiKeyGenerated: "Zapier API key is generated successfully!",
|
|
12743
12745
|
};
|
|
12744
12746
|
const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
|
|
12747
|
+
const EMOJI_PICKER_LABEL = "Smileys & People";
|
|
12748
|
+
const ATTACHMENT_DELETION_TOASTR_MESSAGE = "Attachment has been successfully deleted.";
|
|
12745
12749
|
|
|
12746
12750
|
const HELP_CENTER_SELECTORS = {
|
|
12747
12751
|
helpButton: "help-button",
|
|
@@ -13578,6 +13582,322 @@ class ZapierPage extends IntegrationBase {
|
|
|
13578
13582
|
}
|
|
13579
13583
|
}
|
|
13580
13584
|
|
|
13585
|
+
const DESCRIPTION_EDITOR_TEXTS = {
|
|
13586
|
+
fontSize: "Font size",
|
|
13587
|
+
paragraph: "Paragraph",
|
|
13588
|
+
pasteLink: "Paste the link here...",
|
|
13589
|
+
invalidURLError: "Please enter a valid URL",
|
|
13590
|
+
pasteURL: "Paste URL",
|
|
13591
|
+
delete: "Delete",
|
|
13592
|
+
linkTag: "a",
|
|
13593
|
+
link: "Link",
|
|
13594
|
+
cannedResponseHeader: "Canned responses",
|
|
13595
|
+
paragraphOption: "paragraph",
|
|
13596
|
+
};
|
|
13597
|
+
const EXPANDED_FONT_SIZE = {
|
|
13598
|
+
h1: "Heading 1",
|
|
13599
|
+
h2: "Heading 2",
|
|
13600
|
+
h3: "Heading 3",
|
|
13601
|
+
h4: "Heading 4",
|
|
13602
|
+
h5: "Heading 5",
|
|
13603
|
+
};
|
|
13604
|
+
const TEXT_MODIFIER_TAGS = {
|
|
13605
|
+
underlineOption: "u",
|
|
13606
|
+
strikeOption: "s",
|
|
13607
|
+
highlightOption: "mark",
|
|
13608
|
+
};
|
|
13609
|
+
const TEXT_MODIFIER_ROLES = {
|
|
13610
|
+
boldOption: "strong",
|
|
13611
|
+
italicsOption: "emphasis",
|
|
13612
|
+
blockquoteOption: "blockquote",
|
|
13613
|
+
codeblockOption: "code",
|
|
13614
|
+
codeOption: "code",
|
|
13615
|
+
};
|
|
13616
|
+
const LIST_MODIFIER_TAGS = {
|
|
13617
|
+
bulletListOption: "ul",
|
|
13618
|
+
orderedListOption: "ol",
|
|
13619
|
+
};
|
|
13620
|
+
|
|
13621
|
+
const NEETO_EDITOR_SELECTORS = {
|
|
13622
|
+
boldOption: "neeto-editor-fixed-menu-bold-option",
|
|
13623
|
+
italicOption: "neeto-editor-fixed-menu-italic-option",
|
|
13624
|
+
underlineOption: "neeto-editor-fixed-menu-underline-option",
|
|
13625
|
+
strikeOption: "neeto-editor-fixed-menu-strike-option",
|
|
13626
|
+
codeBlockOption: "neeto-editor-fixed-menu-code-option",
|
|
13627
|
+
highlightOption: "neeto-editor-fixed-menu-highlight-option",
|
|
13628
|
+
linkInput: "neeto-editor-fixed-menu-link-option-input",
|
|
13629
|
+
linkSubmitButton: "neeto-editor-fixed-menu-link-option-link-button",
|
|
13630
|
+
commandList: (index) => `neeto-editor-command-list-item-${index}`,
|
|
13631
|
+
imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
13632
|
+
imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
|
|
13633
|
+
uploadInput: "neeto-editor-media-uploader-input",
|
|
13634
|
+
editorMenuBarWrapper: "neeto-editor-fixed-menu-wrapper",
|
|
13635
|
+
undoOption: "neeto-editor-fixed-menu-undo-option",
|
|
13636
|
+
redoOption: "neeto-editor-fixed-menu-redo-option",
|
|
13637
|
+
imageWrapper: "neeto-editor-image-wrapper",
|
|
13638
|
+
contentField: "neeto-editor-content",
|
|
13639
|
+
addLinkButton: "neeto-editor-fixed-menu-link-option",
|
|
13640
|
+
addLinkTextField: "neeto-editor-add-link-text-input",
|
|
13641
|
+
addURLTextField: "neeto-editor-add-link-url-input",
|
|
13642
|
+
submitLinkButton: "neeto-editor-add-link",
|
|
13643
|
+
fontSizeDropdown: (currentOption = "Paragraph") => `${joinHyphenCase(currentOption)}-dropdown-icon`,
|
|
13644
|
+
fixedMenuArrow: "neeto-editor-fixed-menu-arrow",
|
|
13645
|
+
cannedResponseOption: "neeto-editor-fixed-menu-canned-responses-option",
|
|
13646
|
+
cannedResponseSelectContainer: "select-a-canned-response-select-container",
|
|
13647
|
+
fixedMenuWrapper: "neeto-editor-fixed-menu-wrapper",
|
|
13648
|
+
linkOption: "neeto-editor-fixed-menu-link-option",
|
|
13649
|
+
addLinkUrlInput: "neeto-editor-add-link-url-input",
|
|
13650
|
+
addLinkDoneButton: "neeto-editor-add-link",
|
|
13651
|
+
unlinkButton: "neeto-editor-link-popover-unlink",
|
|
13652
|
+
editorAttachmentsButton: "neeto-editor-fixed-menu-attachments-option",
|
|
13653
|
+
attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
|
|
13654
|
+
imageUploadOption: "neeto-editor-fixed-menu-image-upload-option",
|
|
13655
|
+
imageUploadLinkInput: "neeto-editor-media-upload-url-input",
|
|
13656
|
+
imageUploadButton: "neeto-editor-media-uploader-dnd",
|
|
13657
|
+
imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
13658
|
+
applyButton: "apply-button",
|
|
13659
|
+
videoEmbedOption: "neeto-editor-fixed-menu-video-embed-option",
|
|
13660
|
+
videoEmbedInput: "neeto-editor-embed-input",
|
|
13661
|
+
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
13662
|
+
// TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1047
|
|
13663
|
+
videoWrapper: ".neeto-editor__video-wrapper",
|
|
13664
|
+
paragraphOption: "neeto-editor-fixed-menu-font-size-option-body2",
|
|
13665
|
+
attachmentPreview: "ne-attachments-wrapper",
|
|
13666
|
+
};
|
|
13667
|
+
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
13668
|
+
strikeOption: "neeto-editor-fixed-menu-strike-option",
|
|
13669
|
+
underlineOption: "neeto-editor-fixed-menu-underline-option",
|
|
13670
|
+
highlightOption: "neeto-editor-fixed-menu-highlight-option",
|
|
13671
|
+
};
|
|
13672
|
+
const TEXT_MODIFIER_SELECTORS = {
|
|
13673
|
+
boldOption: "neeto-editor-fixed-menu-bold-option",
|
|
13674
|
+
italicsOption: "neeto-editor-fixed-menu-italic-option",
|
|
13675
|
+
codeOption: "neeto-editor-fixed-menu-code-option",
|
|
13676
|
+
blockquoteOption: "neeto-editor-fixed-menu-block-quote-option",
|
|
13677
|
+
codeblockOption: "neeto-editor-fixed-menu-code-block-option",
|
|
13678
|
+
};
|
|
13679
|
+
const LIST_MODIFIER_SELECTORS = {
|
|
13680
|
+
bulletListOption: "neeto-editor-fixed-menu-bullet-list-option",
|
|
13681
|
+
orderedListOption: "neeto-editor-fixed-menu-ordered-list-option",
|
|
13682
|
+
};
|
|
13683
|
+
const FONT_SIZE_SELECTORS = {
|
|
13684
|
+
h1: "neeto-editor-fixed-menu-font-size-option-h1",
|
|
13685
|
+
h2: "neeto-editor-fixed-menu-font-size-option-h2",
|
|
13686
|
+
h3: "neeto-editor-fixed-menu-font-size-option-h3",
|
|
13687
|
+
h4: "neeto-editor-fixed-menu-font-size-option-h4",
|
|
13688
|
+
h5: "neeto-editor-fixed-menu-font-size-option-h5",
|
|
13689
|
+
};
|
|
13690
|
+
|
|
13691
|
+
/* eslint-disable playwright/no-nth-methods */
|
|
13692
|
+
class EditorPage {
|
|
13693
|
+
constructor(page, neetoPlaywrightUtilities) {
|
|
13694
|
+
this.verifyDescriptionEditor = async ({ text, linkUrl = faker.faker.internet.url(), fileName = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
|
|
13695
|
+
await this.page.getByTestId(NEETO_EDITOR_SELECTORS.contentField).fill(text);
|
|
13696
|
+
await this.page
|
|
13697
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown())
|
|
13698
|
+
.click();
|
|
13699
|
+
const fontSize = Object.keys(FONT_SIZE_SELECTORS);
|
|
13700
|
+
for (const font of fontSize) {
|
|
13701
|
+
const fontKey = font;
|
|
13702
|
+
await this.page.getByTestId(FONT_SIZE_SELECTORS[fontKey]).click();
|
|
13703
|
+
await test$1.expect(this.page
|
|
13704
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.contentField)
|
|
13705
|
+
.getByRole("heading", { level: Number(font.slice(1)) })).toBeVisible();
|
|
13706
|
+
await this.page
|
|
13707
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown(EXPANDED_FONT_SIZE[fontKey]))
|
|
13708
|
+
.click();
|
|
13709
|
+
}
|
|
13710
|
+
if (await this.paragraphSelector.isVisible()) {
|
|
13711
|
+
await this.paragraphSelector.click();
|
|
13712
|
+
const paragraphRole = DESCRIPTION_EDITOR_TEXTS.paragraphOption;
|
|
13713
|
+
await test$1.expect(this.page
|
|
13714
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.contentField)
|
|
13715
|
+
.getByRole(paragraphRole)).toBeVisible();
|
|
13716
|
+
}
|
|
13717
|
+
(await this.fixedMenuArrowSelector.isVisible()) &&
|
|
13718
|
+
(await this.fixedMenuArrowSelector.click());
|
|
13719
|
+
await this.page.getByText(text).click({ clickCount: 3 });
|
|
13720
|
+
const textModifier = Object.keys(TEXT_MODIFIER_SELECTORS);
|
|
13721
|
+
for (const modifier of textModifier) {
|
|
13722
|
+
const modifierKey = modifier;
|
|
13723
|
+
const textModifierRole = TEXT_MODIFIER_ROLES[modifierKey];
|
|
13724
|
+
const textModifierSelector = this.page.getByTestId(TEXT_MODIFIER_SELECTORS[modifierKey]);
|
|
13725
|
+
if (await textModifierSelector.isVisible()) {
|
|
13726
|
+
await textModifierSelector.click();
|
|
13727
|
+
await test$1.expect(this.page
|
|
13728
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.contentField)
|
|
13729
|
+
.getByRole(textModifierRole)).toBeVisible();
|
|
13730
|
+
await textModifierSelector.click();
|
|
13731
|
+
}
|
|
13732
|
+
}
|
|
13733
|
+
const textDeskModifier = Object.keys(NEETO_TEXT_MODIFIER_SELECTORS);
|
|
13734
|
+
for (const modifier of textDeskModifier) {
|
|
13735
|
+
const modifierKey = modifier;
|
|
13736
|
+
const textModifierSelector = this.page.getByTestId(NEETO_TEXT_MODIFIER_SELECTORS[modifierKey]);
|
|
13737
|
+
if (await textModifierSelector.isVisible()) {
|
|
13738
|
+
await textModifierSelector.click();
|
|
13739
|
+
await test$1.expect(this.page
|
|
13740
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.contentField)
|
|
13741
|
+
.locator(TEXT_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13742
|
+
await textModifierSelector.click();
|
|
13743
|
+
}
|
|
13744
|
+
}
|
|
13745
|
+
const listModifier = Object.keys(LIST_MODIFIER_SELECTORS);
|
|
13746
|
+
for (const modifier of listModifier) {
|
|
13747
|
+
const modifierKey = modifier;
|
|
13748
|
+
const listModifierSelector = this.page.getByTestId(LIST_MODIFIER_SELECTORS[modifierKey]);
|
|
13749
|
+
if (await listModifierSelector.isVisible()) {
|
|
13750
|
+
await listModifierSelector.click();
|
|
13751
|
+
await test$1.expect(this.page
|
|
13752
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.contentField)
|
|
13753
|
+
.locator(LIST_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13754
|
+
await listModifierSelector.click();
|
|
13755
|
+
}
|
|
13756
|
+
}
|
|
13757
|
+
if (await this.editorLinkButton.isVisible()) {
|
|
13758
|
+
await this.editorLinkButton.click();
|
|
13759
|
+
await this.page
|
|
13760
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.addLinkUrlInput)
|
|
13761
|
+
.fill(linkUrl);
|
|
13762
|
+
await this.page
|
|
13763
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.addLinkDoneButton)
|
|
13764
|
+
.click();
|
|
13765
|
+
const linkRole = DESCRIPTION_EDITOR_TEXTS.link;
|
|
13766
|
+
await test$1.expect(this.page
|
|
13767
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.contentField)
|
|
13768
|
+
.getByRole(linkRole)).toBeVisible();
|
|
13769
|
+
await this.page.getByTestId(NEETO_EDITOR_SELECTORS.unlinkButton).click();
|
|
13770
|
+
}
|
|
13771
|
+
if (await this.editorAttachmentsButton.isVisible()) {
|
|
13772
|
+
const fileUploaderPromise = this.page.waitForEvent("filechooser");
|
|
13773
|
+
await this.editorAttachmentsButton.click();
|
|
13774
|
+
const fileUploader = await fileUploaderPromise;
|
|
13775
|
+
const imagePath = Path__namespace.join(__dirname, fileName);
|
|
13776
|
+
await fileUploader.setFiles(imagePath);
|
|
13777
|
+
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
13778
|
+
responseUrl: ROUTES.attachment,
|
|
13779
|
+
});
|
|
13780
|
+
await this.neetoPlaywrightUtilities.verifySuccessToast();
|
|
13781
|
+
await test$1.expect(this.attachmentPreview).toBeVisible();
|
|
13782
|
+
await this.attachmentPreview
|
|
13783
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
13784
|
+
.click();
|
|
13785
|
+
await this.page
|
|
13786
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreviewDeleteButton)
|
|
13787
|
+
.click();
|
|
13788
|
+
await this.page
|
|
13789
|
+
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
13790
|
+
.click();
|
|
13791
|
+
}
|
|
13792
|
+
await this.neetoPlaywrightUtilities.verifySuccessToast({
|
|
13793
|
+
message: ATTACHMENT_DELETION_TOASTR_MESSAGE,
|
|
13794
|
+
});
|
|
13795
|
+
if (await this.imageUploadOption.isVisible()) {
|
|
13796
|
+
await this.imageUploadOption.click();
|
|
13797
|
+
const fileUploaderPromise = this.page.waitForEvent("filechooser");
|
|
13798
|
+
await this.page
|
|
13799
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadButton)
|
|
13800
|
+
.click();
|
|
13801
|
+
const fileUploader = await fileUploaderPromise;
|
|
13802
|
+
const imagePath = Path__namespace.join(__dirname, fileName);
|
|
13803
|
+
await fileUploader.setFiles(imagePath);
|
|
13804
|
+
await test$1.expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
|
|
13805
|
+
await this.neetoPlaywrightUtilities.verifySuccessToast();
|
|
13806
|
+
await this.imageWrapper
|
|
13807
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
13808
|
+
.click();
|
|
13809
|
+
await this.imageUploadDeleteButton.click();
|
|
13810
|
+
await test$1.expect(this.imageWrapper).toBeHidden({
|
|
13811
|
+
timeout: 15000,
|
|
13812
|
+
});
|
|
13813
|
+
await this.imageUploadOption.click();
|
|
13814
|
+
// TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1048
|
|
13815
|
+
await this.page
|
|
13816
|
+
.getByTestId(COMMON_SELECTORS.tabItem)
|
|
13817
|
+
.getByText(DESCRIPTION_EDITOR_TEXTS.link)
|
|
13818
|
+
.click();
|
|
13819
|
+
await this.page
|
|
13820
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkInput)
|
|
13821
|
+
.fill(imageUrl);
|
|
13822
|
+
await this.page
|
|
13823
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkSubmitButton)
|
|
13824
|
+
.click();
|
|
13825
|
+
await test$1.expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
|
|
13826
|
+
await this.imageWrapper
|
|
13827
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
13828
|
+
.click();
|
|
13829
|
+
await this.imageUploadDeleteButton.click();
|
|
13830
|
+
await test$1.expect(this.imageWrapper).toBeHidden({
|
|
13831
|
+
timeout: 15000,
|
|
13832
|
+
});
|
|
13833
|
+
}
|
|
13834
|
+
if (await this.cannedResponseOption.isVisible()) {
|
|
13835
|
+
await this.cannedResponseOption.click();
|
|
13836
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader)).toContainText(DESCRIPTION_EDITOR_TEXTS.cannedResponseHeader);
|
|
13837
|
+
await this.page
|
|
13838
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.cannedResponseSelectContainer)
|
|
13839
|
+
.fill(this.t("neetoRules.labels.feedback"));
|
|
13840
|
+
await this.page
|
|
13841
|
+
.getByTestId(COMMON_SELECTORS.selectOption(this.t("neetoRules.labels.feedback")))
|
|
13842
|
+
.click();
|
|
13843
|
+
await this.page.getByTestId(NEETO_EDITOR_SELECTORS.applyButton).click();
|
|
13844
|
+
await this.neetoPlaywrightUtilities.verifySuccessToast({
|
|
13845
|
+
message: cannedResponseSuccessMessage,
|
|
13846
|
+
});
|
|
13847
|
+
}
|
|
13848
|
+
if (await this.page
|
|
13849
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedOption)
|
|
13850
|
+
.isVisible()) {
|
|
13851
|
+
await this.videoEmbedOption.click();
|
|
13852
|
+
await this.videoEmbedOption.fill(videoUrl);
|
|
13853
|
+
await this.page
|
|
13854
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedSubmit)
|
|
13855
|
+
.click();
|
|
13856
|
+
await test$1.expect(this.videoWrapperSelector).toBeVisible({ timeout: 15000 });
|
|
13857
|
+
await this.videoWrapperSelector
|
|
13858
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
13859
|
+
.click();
|
|
13860
|
+
await this.imageUploadDeleteButton.click();
|
|
13861
|
+
await test$1.expect(this.videoWrapperSelector).toBeHidden({
|
|
13862
|
+
timeout: 15000,
|
|
13863
|
+
});
|
|
13864
|
+
}
|
|
13865
|
+
if (await this.emojiDropdownIcon.isVisible()) {
|
|
13866
|
+
await this.emojiDropdownIcon.click();
|
|
13867
|
+
await this.page
|
|
13868
|
+
.getByRole("region", {
|
|
13869
|
+
name: EMOJI_PICKER_LABEL,
|
|
13870
|
+
})
|
|
13871
|
+
.getByText("👍")
|
|
13872
|
+
.click();
|
|
13873
|
+
await test$1.expect(this.page.getByTestId(NEETO_EDITOR_SELECTORS.contentField)).toContainText("👍");
|
|
13874
|
+
}
|
|
13875
|
+
};
|
|
13876
|
+
this.page = page;
|
|
13877
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
13878
|
+
this.t = playwrightI18nextFixture.getI18nInstance().t;
|
|
13879
|
+
this.paragraphSelector = this.page.getByTestId(NEETO_EDITOR_SELECTORS.paragraphOption);
|
|
13880
|
+
this.fixedMenuArrowSelector = this.page.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuArrow);
|
|
13881
|
+
this.editorLinkButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.linkOption);
|
|
13882
|
+
this.attachmentPreview = this.page.getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreview);
|
|
13883
|
+
this.editorAttachmentsButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.editorAttachmentsButton);
|
|
13884
|
+
this.imageWrapper = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageWrapper);
|
|
13885
|
+
// TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1047
|
|
13886
|
+
this.imageUploadDeleteButton = this.page
|
|
13887
|
+
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
13888
|
+
.getByRole("button")
|
|
13889
|
+
.nth(3);
|
|
13890
|
+
this.imageUploadOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadOption);
|
|
13891
|
+
this.cannedResponseOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.cannedResponseOption);
|
|
13892
|
+
this.videoEmbedOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedOption);
|
|
13893
|
+
// TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1047
|
|
13894
|
+
this.videoWrapperSelector = this.page.locator(NEETO_EDITOR_SELECTORS.videoWrapper);
|
|
13895
|
+
this.emojiDropdownIcon = this.page
|
|
13896
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
|
|
13897
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon);
|
|
13898
|
+
}
|
|
13899
|
+
}
|
|
13900
|
+
|
|
13581
13901
|
class ImageUploader {
|
|
13582
13902
|
constructor({ page, neetoPlaywrightUtilities, }) {
|
|
13583
13903
|
this.submitCroppedImage = async () => {
|
|
@@ -14023,30 +14343,6 @@ const networkConditions = {
|
|
|
14023
14343
|
},
|
|
14024
14344
|
};
|
|
14025
14345
|
|
|
14026
|
-
const NEETO_EDITOR_SELECTORS = {
|
|
14027
|
-
boldOption: "neeto-editor-fixed-menu-bold-option",
|
|
14028
|
-
italicOption: "neeto-editor-fixed-menu-italic-option",
|
|
14029
|
-
underlineOption: "neeto-editor-fixed-menu-underline-option",
|
|
14030
|
-
strikeOption: "neeto-editor-fixed-menu-strike-option",
|
|
14031
|
-
codeBlockOption: "neeto-editor-fixed-menu-code-option",
|
|
14032
|
-
highlightOption: "neeto-editor-fixed-menu-highlight-option",
|
|
14033
|
-
linkInput: "neeto-editor-fixed-menu-link-option-input",
|
|
14034
|
-
linkSubmitButton: "neeto-editor-fixed-menu-link-option-link-button",
|
|
14035
|
-
commandList: (index) => `neeto-editor-command-list-item-${index}`,
|
|
14036
|
-
imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
14037
|
-
imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
|
|
14038
|
-
uploadInput: "neeto-editor-media-uploader-input",
|
|
14039
|
-
editorMenuBarWrapper: "neeto-editor-fixed-menu-wrapper",
|
|
14040
|
-
undoOption: "neeto-editor-fixed-menu-undo-option",
|
|
14041
|
-
redoOption: "neeto-editor-fixed-menu-redo-option",
|
|
14042
|
-
imageWrapper: "neeto-editor-image-wrapper",
|
|
14043
|
-
contentField: "neeto-editor-content",
|
|
14044
|
-
addLinkButton: "neeto-editor-fixed-menu-link-option",
|
|
14045
|
-
addLinkTextField: "neeto-editor-add-link-text-input",
|
|
14046
|
-
addURLTextField: "neeto-editor-add-link-url-input",
|
|
14047
|
-
submitLinkButton: "neeto-editor-add-link",
|
|
14048
|
-
};
|
|
14049
|
-
|
|
14050
14346
|
const MEMBER_SELECTORS = {
|
|
14051
14347
|
membersTab: "members-nav-tab",
|
|
14052
14348
|
newButton: "ntm-add-member-button",
|
|
@@ -147725,6 +148021,7 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
147725
148021
|
};
|
|
147726
148022
|
|
|
147727
148023
|
exports.API_ROUTES = API_ROUTES;
|
|
148024
|
+
exports.ATTACHMENT_DELETION_TOASTR_MESSAGE = ATTACHMENT_DELETION_TOASTR_MESSAGE;
|
|
147728
148025
|
exports.BASE_URL = BASE_URL;
|
|
147729
148026
|
exports.CHANGELOG_WIDGET_SELECTORS = CHANGELOG_WIDGET_SELECTORS;
|
|
147730
148027
|
exports.CHAT_WIDGET_SELECTORS = CHAT_WIDGET_SELECTORS;
|
|
@@ -147732,9 +148029,14 @@ exports.CHAT_WIDGET_TEXTS = CHAT_WIDGET_TEXTS;
|
|
|
147732
148029
|
exports.COMMON_SELECTORS = COMMON_SELECTORS;
|
|
147733
148030
|
exports.CREDENTIALS = CREDENTIALS;
|
|
147734
148031
|
exports.CustomCommands = CustomCommands;
|
|
148032
|
+
exports.DESCRIPTION_EDITOR_TEXTS = DESCRIPTION_EDITOR_TEXTS;
|
|
147735
148033
|
exports.EMBED_SELECTORS = EMBED_SELECTORS;
|
|
148034
|
+
exports.EMOJI_PICKER_LABEL = EMOJI_PICKER_LABEL;
|
|
147736
148035
|
exports.ENVIRONMENT = ENVIRONMENT;
|
|
148036
|
+
exports.EXPANDED_FONT_SIZE = EXPANDED_FONT_SIZE;
|
|
148037
|
+
exports.EditorPage = EditorPage;
|
|
147737
148038
|
exports.EmbedBase = EmbedBase;
|
|
148039
|
+
exports.FONT_SIZE_SELECTORS = FONT_SIZE_SELECTORS;
|
|
147738
148040
|
exports.GLOBAL_TRANSLATIONS_PATTERN = GLOBAL_TRANSLATIONS_PATTERN;
|
|
147739
148041
|
exports.HELP_CENTER_SELECTORS = HELP_CENTER_SELECTORS;
|
|
147740
148042
|
exports.HelpAndProfilePage = HelpAndProfilePage;
|
|
@@ -147744,6 +148046,8 @@ exports.IS_STAGING_ENV = IS_STAGING_ENV;
|
|
|
147744
148046
|
exports.ImageUploader = ImageUploader;
|
|
147745
148047
|
exports.IntegrationBase = IntegrationBase;
|
|
147746
148048
|
exports.KEYBOARD_SHORTCUTS_SELECTORS = KEYBOARD_SHORTCUTS_SELECTORS;
|
|
148049
|
+
exports.LIST_MODIFIER_SELECTORS = LIST_MODIFIER_SELECTORS;
|
|
148050
|
+
exports.LIST_MODIFIER_TAGS = LIST_MODIFIER_TAGS;
|
|
147747
148051
|
exports.LOGIN_SELECTORS = LOGIN_SELECTORS;
|
|
147748
148052
|
exports.MEMBER_FORM_SELECTORS = MEMBER_FORM_SELECTORS;
|
|
147749
148053
|
exports.MEMBER_SELECTORS = MEMBER_SELECTORS;
|
|
@@ -147755,6 +148059,7 @@ exports.NEETO_EDITOR_SELECTORS = NEETO_EDITOR_SELECTORS;
|
|
|
147755
148059
|
exports.NEETO_FILTERS_SELECTORS = NEETO_FILTERS_SELECTORS;
|
|
147756
148060
|
exports.NEETO_IMAGE_UPLOADER_SELECTORS = NEETO_IMAGE_UPLOADER_SELECTORS;
|
|
147757
148061
|
exports.NEETO_ROUTES = NEETO_ROUTES;
|
|
148062
|
+
exports.NEETO_TEXT_MODIFIER_SELECTORS = NEETO_TEXT_MODIFIER_SELECTORS;
|
|
147758
148063
|
exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;
|
|
147759
148064
|
exports.OrganizationPage = OrganizationPage;
|
|
147760
148065
|
exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
|
|
@@ -147770,6 +148075,9 @@ exports.STORAGE_STATE = STORAGE_STATE;
|
|
|
147770
148075
|
exports.SidebarSection = SidebarSection;
|
|
147771
148076
|
exports.SlackPage = SlackPage;
|
|
147772
148077
|
exports.TAGS_SELECTORS = TAGS_SELECTORS;
|
|
148078
|
+
exports.TEXT_MODIFIER_ROLES = TEXT_MODIFIER_ROLES;
|
|
148079
|
+
exports.TEXT_MODIFIER_SELECTORS = TEXT_MODIFIER_SELECTORS;
|
|
148080
|
+
exports.TEXT_MODIFIER_TAGS = TEXT_MODIFIER_TAGS;
|
|
147773
148081
|
exports.THIRD_PARTY_ROUTES = THIRD_PARTY_ROUTES;
|
|
147774
148082
|
exports.TOASTR_MESSAGES = TOASTR_MESSAGES;
|
|
147775
148083
|
exports.USER_AGENTS = USER_AGENTS;
|