@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.js CHANGED
@@ -4,7 +4,8 @@ import * as fs$d from 'fs';
4
4
  import fs__default, { writeFileSync as writeFileSync$1, unlinkSync, readFileSync } from 'fs';
5
5
  import { curry, not, isEmpty as isEmpty$1, isNil, isNotNil, mergeDeepLeft, mergeAll } from 'ramda';
6
6
  import require$$0$2 from 'util';
7
- import Path from 'path';
7
+ import * as Path from 'path';
8
+ import Path__default from 'path';
8
9
  import { faker } from '@faker-js/faker';
9
10
  import MailosaurClient from 'mailosaur';
10
11
  import dayjs from 'dayjs';
@@ -49,6 +50,7 @@ const ROUTES = {
49
50
  index: "/team_members/teams",
50
51
  show: (id) => `/team_members/teams/${id}`,
51
52
  },
53
+ attachment: `/neeto_editor${BASE_URL}/direct_uploads/attach`,
52
54
  };
53
55
  const API_ROUTES = {
54
56
  teamMembers: {
@@ -2585,8 +2587,8 @@ var lib$7 = {
2585
2587
  var qs$1 = /*@__PURE__*/getDefaultExportFromCjs(lib$7);
2586
2588
 
2587
2589
  const getImagePathAndName = (localImagePath) => {
2588
- const imagePath = Path.join(__dirname, localImagePath);
2589
- const imageName = Path.basename(localImagePath, Path.extname(localImagePath));
2590
+ const imagePath = Path__default.join(__dirname, localImagePath);
2591
+ const imageName = Path__default.basename(localImagePath, Path__default.extname(localImagePath));
2590
2592
  return { imagePath, imageName };
2591
2593
  };
2592
2594
 
@@ -5717,7 +5719,7 @@ var path$a = {};
5717
5719
  Object.defineProperty(path$a, "__esModule", { value: true });
5718
5720
  path$a.convertPosixPathToPattern = path$a.convertWindowsPathToPattern = path$a.convertPathToPattern = path$a.escapePosixPath = path$a.escapeWindowsPath = path$a.escape = path$a.removeLeadingDotSegment = path$a.makeAbsolute = path$a.unixify = void 0;
5719
5721
  const os$1 = require$$0$3;
5720
- const path$9 = Path;
5722
+ const path$9 = Path__default;
5721
5723
  const IS_WINDOWS_PLATFORM = os$1.platform() === 'win32';
5722
5724
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
5723
5725
  /**
@@ -5957,7 +5959,7 @@ var isGlob$1 = function isGlob(str, options) {
5957
5959
  };
5958
5960
 
5959
5961
  var isGlob = isGlob$1;
5960
- var pathPosixDirname = Path.posix.dirname;
5962
+ var pathPosixDirname = Path__default.posix.dirname;
5961
5963
  var isWin32 = require$$0$3.platform() === 'win32';
5962
5964
 
5963
5965
  var slash = '/';
@@ -7419,7 +7421,7 @@ var braces_1 = braces$1;
7419
7421
 
7420
7422
  var utils$g = {};
7421
7423
 
7422
- const path$8 = Path;
7424
+ const path$8 = Path__default;
7423
7425
  const WIN_SLASH = '\\\\/';
7424
7426
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
7425
7427
 
@@ -7599,7 +7601,7 @@ var constants$b = {
7599
7601
 
7600
7602
  (function (exports) {
7601
7603
 
7602
- const path = Path;
7604
+ const path = Path__default;
7603
7605
  const win32 = process.platform === 'win32';
7604
7606
  const {
7605
7607
  REGEX_BACKSLASH,
@@ -9143,7 +9145,7 @@ parse$3.fastpaths = (input, options) => {
9143
9145
 
9144
9146
  var parse_1 = parse$3;
9145
9147
 
9146
- const path$7 = Path;
9148
+ const path$7 = Path__default;
9147
9149
  const scan$1 = scan_1;
9148
9150
  const parse$2 = parse_1;
9149
9151
  const utils$d = utils$g;
@@ -9954,7 +9956,7 @@ var micromatch_1 = micromatch$1;
9954
9956
 
9955
9957
  Object.defineProperty(pattern$1, "__esModule", { value: true });
9956
9958
  pattern$1.removeDuplicateSlashes = pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
9957
- const path$6 = Path;
9959
+ const path$6 = Path__default;
9958
9960
  const globParent = globParent$1;
9959
9961
  const micromatch = micromatch_1;
9960
9962
  const GLOBSTAR = '**';
@@ -10899,7 +10901,7 @@ var fs$6 = {};
10899
10901
  } (fs$6));
10900
10902
 
10901
10903
  Object.defineProperty(settings$2, "__esModule", { value: true });
10902
- const path$4 = Path;
10904
+ const path$4 = Path__default;
10903
10905
  const fsStat$3 = out$1;
10904
10906
  const fs$5 = fs$6;
10905
10907
  class Settings$1 {
@@ -11562,7 +11564,7 @@ sync$3.default = SyncProvider;
11562
11564
  var settings$1 = {};
11563
11565
 
11564
11566
  Object.defineProperty(settings$1, "__esModule", { value: true });
11565
- const path$3 = Path;
11567
+ const path$3 = Path__default;
11566
11568
  const fsScandir = out$2;
11567
11569
  class Settings {
11568
11570
  constructor(_options = {}) {
@@ -11624,7 +11626,7 @@ function getSettings(settingsOrOptions = {}) {
11624
11626
  var reader = {};
11625
11627
 
11626
11628
  Object.defineProperty(reader, "__esModule", { value: true });
11627
- const path$2 = Path;
11629
+ const path$2 = Path__default;
11628
11630
  const fsStat$2 = out$1;
11629
11631
  const utils$7 = utils$l;
11630
11632
  class Reader {
@@ -12012,7 +12014,7 @@ class EntryTransformer {
12012
12014
  entry.default = EntryTransformer;
12013
12015
 
12014
12016
  Object.defineProperty(provider, "__esModule", { value: true });
12015
- const path$1 = Path;
12017
+ const path$1 = Path__default;
12016
12018
  const deep_1 = deep;
12017
12019
  const entry_1 = entry$1;
12018
12020
  const error_1 = error;
@@ -12488,7 +12490,7 @@ class EmbedBase {
12488
12490
  : embedCode);
12489
12491
  this.filePath = `tmp/${faker.word.noun()}.html`;
12490
12492
  writeFileSync$1(this.filePath, fileContent, "utf8");
12491
- await this.embedTestPage.goto(`file://${Path.resolve(this.filePath)}`);
12493
+ await this.embedTestPage.goto(`file://${Path__default.resolve(this.filePath)}`);
12492
12494
  await this.embedTestPage.waitForLoadState("load");
12493
12495
  this.embeddedFrame = this.embedTestPage.frameLocator(this.embedTestPageType === "inline"
12494
12496
  ? "iframe"
@@ -12696,6 +12698,8 @@ const TOASTR_MESSAGES = {
12696
12698
  zapierApiKeyGenerated: "Zapier API key is generated successfully!",
12697
12699
  };
12698
12700
  const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
12701
+ const EMOJI_PICKER_LABEL = "Smileys & People";
12702
+ const ATTACHMENT_DELETION_TOASTR_MESSAGE = "Attachment has been successfully deleted.";
12699
12703
 
12700
12704
  const HELP_CENTER_SELECTORS = {
12701
12705
  helpButton: "help-button",
@@ -13532,6 +13536,322 @@ class ZapierPage extends IntegrationBase {
13532
13536
  }
13533
13537
  }
13534
13538
 
13539
+ const DESCRIPTION_EDITOR_TEXTS = {
13540
+ fontSize: "Font size",
13541
+ paragraph: "Paragraph",
13542
+ pasteLink: "Paste the link here...",
13543
+ invalidURLError: "Please enter a valid URL",
13544
+ pasteURL: "Paste URL",
13545
+ delete: "Delete",
13546
+ linkTag: "a",
13547
+ link: "Link",
13548
+ cannedResponseHeader: "Canned responses",
13549
+ paragraphOption: "paragraph",
13550
+ };
13551
+ const EXPANDED_FONT_SIZE = {
13552
+ h1: "Heading 1",
13553
+ h2: "Heading 2",
13554
+ h3: "Heading 3",
13555
+ h4: "Heading 4",
13556
+ h5: "Heading 5",
13557
+ };
13558
+ const TEXT_MODIFIER_TAGS = {
13559
+ underlineOption: "u",
13560
+ strikeOption: "s",
13561
+ highlightOption: "mark",
13562
+ };
13563
+ const TEXT_MODIFIER_ROLES = {
13564
+ boldOption: "strong",
13565
+ italicsOption: "emphasis",
13566
+ blockquoteOption: "blockquote",
13567
+ codeblockOption: "code",
13568
+ codeOption: "code",
13569
+ };
13570
+ const LIST_MODIFIER_TAGS = {
13571
+ bulletListOption: "ul",
13572
+ orderedListOption: "ol",
13573
+ };
13574
+
13575
+ const NEETO_EDITOR_SELECTORS = {
13576
+ boldOption: "neeto-editor-fixed-menu-bold-option",
13577
+ italicOption: "neeto-editor-fixed-menu-italic-option",
13578
+ underlineOption: "neeto-editor-fixed-menu-underline-option",
13579
+ strikeOption: "neeto-editor-fixed-menu-strike-option",
13580
+ codeBlockOption: "neeto-editor-fixed-menu-code-option",
13581
+ highlightOption: "neeto-editor-fixed-menu-highlight-option",
13582
+ linkInput: "neeto-editor-fixed-menu-link-option-input",
13583
+ linkSubmitButton: "neeto-editor-fixed-menu-link-option-link-button",
13584
+ commandList: (index) => `neeto-editor-command-list-item-${index}`,
13585
+ imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
13586
+ imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
13587
+ uploadInput: "neeto-editor-media-uploader-input",
13588
+ editorMenuBarWrapper: "neeto-editor-fixed-menu-wrapper",
13589
+ undoOption: "neeto-editor-fixed-menu-undo-option",
13590
+ redoOption: "neeto-editor-fixed-menu-redo-option",
13591
+ imageWrapper: "neeto-editor-image-wrapper",
13592
+ contentField: "neeto-editor-content",
13593
+ addLinkButton: "neeto-editor-fixed-menu-link-option",
13594
+ addLinkTextField: "neeto-editor-add-link-text-input",
13595
+ addURLTextField: "neeto-editor-add-link-url-input",
13596
+ submitLinkButton: "neeto-editor-add-link",
13597
+ fontSizeDropdown: (currentOption = "Paragraph") => `${joinHyphenCase(currentOption)}-dropdown-icon`,
13598
+ fixedMenuArrow: "neeto-editor-fixed-menu-arrow",
13599
+ cannedResponseOption: "neeto-editor-fixed-menu-canned-responses-option",
13600
+ cannedResponseSelectContainer: "select-a-canned-response-select-container",
13601
+ fixedMenuWrapper: "neeto-editor-fixed-menu-wrapper",
13602
+ linkOption: "neeto-editor-fixed-menu-link-option",
13603
+ addLinkUrlInput: "neeto-editor-add-link-url-input",
13604
+ addLinkDoneButton: "neeto-editor-add-link",
13605
+ unlinkButton: "neeto-editor-link-popover-unlink",
13606
+ editorAttachmentsButton: "neeto-editor-fixed-menu-attachments-option",
13607
+ attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
13608
+ imageUploadOption: "neeto-editor-fixed-menu-image-upload-option",
13609
+ imageUploadLinkInput: "neeto-editor-media-upload-url-input",
13610
+ imageUploadButton: "neeto-editor-media-uploader-dnd",
13611
+ imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
13612
+ applyButton: "apply-button",
13613
+ videoEmbedOption: "neeto-editor-fixed-menu-video-embed-option",
13614
+ videoEmbedInput: "neeto-editor-embed-input",
13615
+ videoEmbedSubmit: "neeto-editor-embed-cancel",
13616
+ // TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1047
13617
+ videoWrapper: ".neeto-editor__video-wrapper",
13618
+ paragraphOption: "neeto-editor-fixed-menu-font-size-option-body2",
13619
+ attachmentPreview: "ne-attachments-wrapper",
13620
+ };
13621
+ const NEETO_TEXT_MODIFIER_SELECTORS = {
13622
+ strikeOption: "neeto-editor-fixed-menu-strike-option",
13623
+ underlineOption: "neeto-editor-fixed-menu-underline-option",
13624
+ highlightOption: "neeto-editor-fixed-menu-highlight-option",
13625
+ };
13626
+ const TEXT_MODIFIER_SELECTORS = {
13627
+ boldOption: "neeto-editor-fixed-menu-bold-option",
13628
+ italicsOption: "neeto-editor-fixed-menu-italic-option",
13629
+ codeOption: "neeto-editor-fixed-menu-code-option",
13630
+ blockquoteOption: "neeto-editor-fixed-menu-block-quote-option",
13631
+ codeblockOption: "neeto-editor-fixed-menu-code-block-option",
13632
+ };
13633
+ const LIST_MODIFIER_SELECTORS = {
13634
+ bulletListOption: "neeto-editor-fixed-menu-bullet-list-option",
13635
+ orderedListOption: "neeto-editor-fixed-menu-ordered-list-option",
13636
+ };
13637
+ const FONT_SIZE_SELECTORS = {
13638
+ h1: "neeto-editor-fixed-menu-font-size-option-h1",
13639
+ h2: "neeto-editor-fixed-menu-font-size-option-h2",
13640
+ h3: "neeto-editor-fixed-menu-font-size-option-h3",
13641
+ h4: "neeto-editor-fixed-menu-font-size-option-h4",
13642
+ h5: "neeto-editor-fixed-menu-font-size-option-h5",
13643
+ };
13644
+
13645
+ /* eslint-disable playwright/no-nth-methods */
13646
+ class EditorPage {
13647
+ constructor(page, neetoPlaywrightUtilities) {
13648
+ this.verifyDescriptionEditor = async ({ text, linkUrl = faker.internet.url(), fileName = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
13649
+ await this.page.getByTestId(NEETO_EDITOR_SELECTORS.contentField).fill(text);
13650
+ await this.page
13651
+ .getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown())
13652
+ .click();
13653
+ const fontSize = Object.keys(FONT_SIZE_SELECTORS);
13654
+ for (const font of fontSize) {
13655
+ const fontKey = font;
13656
+ await this.page.getByTestId(FONT_SIZE_SELECTORS[fontKey]).click();
13657
+ await expect(this.page
13658
+ .getByTestId(NEETO_EDITOR_SELECTORS.contentField)
13659
+ .getByRole("heading", { level: Number(font.slice(1)) })).toBeVisible();
13660
+ await this.page
13661
+ .getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown(EXPANDED_FONT_SIZE[fontKey]))
13662
+ .click();
13663
+ }
13664
+ if (await this.paragraphSelector.isVisible()) {
13665
+ await this.paragraphSelector.click();
13666
+ const paragraphRole = DESCRIPTION_EDITOR_TEXTS.paragraphOption;
13667
+ await expect(this.page
13668
+ .getByTestId(NEETO_EDITOR_SELECTORS.contentField)
13669
+ .getByRole(paragraphRole)).toBeVisible();
13670
+ }
13671
+ (await this.fixedMenuArrowSelector.isVisible()) &&
13672
+ (await this.fixedMenuArrowSelector.click());
13673
+ await this.page.getByText(text).click({ clickCount: 3 });
13674
+ const textModifier = Object.keys(TEXT_MODIFIER_SELECTORS);
13675
+ for (const modifier of textModifier) {
13676
+ const modifierKey = modifier;
13677
+ const textModifierRole = TEXT_MODIFIER_ROLES[modifierKey];
13678
+ const textModifierSelector = this.page.getByTestId(TEXT_MODIFIER_SELECTORS[modifierKey]);
13679
+ if (await textModifierSelector.isVisible()) {
13680
+ await textModifierSelector.click();
13681
+ await expect(this.page
13682
+ .getByTestId(NEETO_EDITOR_SELECTORS.contentField)
13683
+ .getByRole(textModifierRole)).toBeVisible();
13684
+ await textModifierSelector.click();
13685
+ }
13686
+ }
13687
+ const textDeskModifier = Object.keys(NEETO_TEXT_MODIFIER_SELECTORS);
13688
+ for (const modifier of textDeskModifier) {
13689
+ const modifierKey = modifier;
13690
+ const textModifierSelector = this.page.getByTestId(NEETO_TEXT_MODIFIER_SELECTORS[modifierKey]);
13691
+ if (await textModifierSelector.isVisible()) {
13692
+ await textModifierSelector.click();
13693
+ await expect(this.page
13694
+ .getByTestId(NEETO_EDITOR_SELECTORS.contentField)
13695
+ .locator(TEXT_MODIFIER_TAGS[modifierKey])).toBeVisible();
13696
+ await textModifierSelector.click();
13697
+ }
13698
+ }
13699
+ const listModifier = Object.keys(LIST_MODIFIER_SELECTORS);
13700
+ for (const modifier of listModifier) {
13701
+ const modifierKey = modifier;
13702
+ const listModifierSelector = this.page.getByTestId(LIST_MODIFIER_SELECTORS[modifierKey]);
13703
+ if (await listModifierSelector.isVisible()) {
13704
+ await listModifierSelector.click();
13705
+ await expect(this.page
13706
+ .getByTestId(NEETO_EDITOR_SELECTORS.contentField)
13707
+ .locator(LIST_MODIFIER_TAGS[modifierKey])).toBeVisible();
13708
+ await listModifierSelector.click();
13709
+ }
13710
+ }
13711
+ if (await this.editorLinkButton.isVisible()) {
13712
+ await this.editorLinkButton.click();
13713
+ await this.page
13714
+ .getByTestId(NEETO_EDITOR_SELECTORS.addLinkUrlInput)
13715
+ .fill(linkUrl);
13716
+ await this.page
13717
+ .getByTestId(NEETO_EDITOR_SELECTORS.addLinkDoneButton)
13718
+ .click();
13719
+ const linkRole = DESCRIPTION_EDITOR_TEXTS.link;
13720
+ await expect(this.page
13721
+ .getByTestId(NEETO_EDITOR_SELECTORS.contentField)
13722
+ .getByRole(linkRole)).toBeVisible();
13723
+ await this.page.getByTestId(NEETO_EDITOR_SELECTORS.unlinkButton).click();
13724
+ }
13725
+ if (await this.editorAttachmentsButton.isVisible()) {
13726
+ const fileUploaderPromise = this.page.waitForEvent("filechooser");
13727
+ await this.editorAttachmentsButton.click();
13728
+ const fileUploader = await fileUploaderPromise;
13729
+ const imagePath = Path.join(__dirname, fileName);
13730
+ await fileUploader.setFiles(imagePath);
13731
+ await this.neetoPlaywrightUtilities.interceptMultipleResponses({
13732
+ responseUrl: ROUTES.attachment,
13733
+ });
13734
+ await this.neetoPlaywrightUtilities.verifySuccessToast();
13735
+ await expect(this.attachmentPreview).toBeVisible();
13736
+ await this.attachmentPreview
13737
+ .getByTestId(COMMON_SELECTORS.dropdownIcon)
13738
+ .click();
13739
+ await this.page
13740
+ .getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreviewDeleteButton)
13741
+ .click();
13742
+ await this.page
13743
+ .getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
13744
+ .click();
13745
+ }
13746
+ await this.neetoPlaywrightUtilities.verifySuccessToast({
13747
+ message: ATTACHMENT_DELETION_TOASTR_MESSAGE,
13748
+ });
13749
+ if (await this.imageUploadOption.isVisible()) {
13750
+ await this.imageUploadOption.click();
13751
+ const fileUploaderPromise = this.page.waitForEvent("filechooser");
13752
+ await this.page
13753
+ .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadButton)
13754
+ .click();
13755
+ const fileUploader = await fileUploaderPromise;
13756
+ const imagePath = Path.join(__dirname, fileName);
13757
+ await fileUploader.setFiles(imagePath);
13758
+ await expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
13759
+ await this.neetoPlaywrightUtilities.verifySuccessToast();
13760
+ await this.imageWrapper
13761
+ .getByTestId(COMMON_SELECTORS.dropdownIcon)
13762
+ .click();
13763
+ await this.imageUploadDeleteButton.click();
13764
+ await expect(this.imageWrapper).toBeHidden({
13765
+ timeout: 15000,
13766
+ });
13767
+ await this.imageUploadOption.click();
13768
+ // TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1048
13769
+ await this.page
13770
+ .getByTestId(COMMON_SELECTORS.tabItem)
13771
+ .getByText(DESCRIPTION_EDITOR_TEXTS.link)
13772
+ .click();
13773
+ await this.page
13774
+ .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkInput)
13775
+ .fill(imageUrl);
13776
+ await this.page
13777
+ .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkSubmitButton)
13778
+ .click();
13779
+ await expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
13780
+ await this.imageWrapper
13781
+ .getByTestId(COMMON_SELECTORS.dropdownIcon)
13782
+ .click();
13783
+ await this.imageUploadDeleteButton.click();
13784
+ await expect(this.imageWrapper).toBeHidden({
13785
+ timeout: 15000,
13786
+ });
13787
+ }
13788
+ if (await this.cannedResponseOption.isVisible()) {
13789
+ await this.cannedResponseOption.click();
13790
+ await expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader)).toContainText(DESCRIPTION_EDITOR_TEXTS.cannedResponseHeader);
13791
+ await this.page
13792
+ .getByTestId(NEETO_EDITOR_SELECTORS.cannedResponseSelectContainer)
13793
+ .fill(this.t("neetoRules.labels.feedback"));
13794
+ await this.page
13795
+ .getByTestId(COMMON_SELECTORS.selectOption(this.t("neetoRules.labels.feedback")))
13796
+ .click();
13797
+ await this.page.getByTestId(NEETO_EDITOR_SELECTORS.applyButton).click();
13798
+ await this.neetoPlaywrightUtilities.verifySuccessToast({
13799
+ message: cannedResponseSuccessMessage,
13800
+ });
13801
+ }
13802
+ if (await this.page
13803
+ .getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedOption)
13804
+ .isVisible()) {
13805
+ await this.videoEmbedOption.click();
13806
+ await this.videoEmbedOption.fill(videoUrl);
13807
+ await this.page
13808
+ .getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedSubmit)
13809
+ .click();
13810
+ await expect(this.videoWrapperSelector).toBeVisible({ timeout: 15000 });
13811
+ await this.videoWrapperSelector
13812
+ .getByTestId(COMMON_SELECTORS.dropdownIcon)
13813
+ .click();
13814
+ await this.imageUploadDeleteButton.click();
13815
+ await expect(this.videoWrapperSelector).toBeHidden({
13816
+ timeout: 15000,
13817
+ });
13818
+ }
13819
+ if (await this.emojiDropdownIcon.isVisible()) {
13820
+ await this.emojiDropdownIcon.click();
13821
+ await this.page
13822
+ .getByRole("region", {
13823
+ name: EMOJI_PICKER_LABEL,
13824
+ })
13825
+ .getByText("👍")
13826
+ .click();
13827
+ await expect(this.page.getByTestId(NEETO_EDITOR_SELECTORS.contentField)).toContainText("👍");
13828
+ }
13829
+ };
13830
+ this.page = page;
13831
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
13832
+ this.t = getI18nInstance().t;
13833
+ this.paragraphSelector = this.page.getByTestId(NEETO_EDITOR_SELECTORS.paragraphOption);
13834
+ this.fixedMenuArrowSelector = this.page.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuArrow);
13835
+ this.editorLinkButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.linkOption);
13836
+ this.attachmentPreview = this.page.getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreview);
13837
+ this.editorAttachmentsButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.editorAttachmentsButton);
13838
+ this.imageWrapper = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageWrapper);
13839
+ // TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1047
13840
+ this.imageUploadDeleteButton = this.page
13841
+ .getByTestId(COMMON_SELECTORS.dropdownContainer)
13842
+ .getByRole("button")
13843
+ .nth(3);
13844
+ this.imageUploadOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadOption);
13845
+ this.cannedResponseOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.cannedResponseOption);
13846
+ this.videoEmbedOption = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedOption);
13847
+ // TODO: Fix the selector after the issue is resolved: https://github.com/bigbinary/neeto-editor/issues/1047
13848
+ this.videoWrapperSelector = this.page.locator(NEETO_EDITOR_SELECTORS.videoWrapper);
13849
+ this.emojiDropdownIcon = this.page
13850
+ .getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
13851
+ .getByTestId(COMMON_SELECTORS.dropdownIcon);
13852
+ }
13853
+ }
13854
+
13535
13855
  class ImageUploader {
13536
13856
  constructor({ page, neetoPlaywrightUtilities, }) {
13537
13857
  this.submitCroppedImage = async () => {
@@ -13977,30 +14297,6 @@ const networkConditions = {
13977
14297
  },
13978
14298
  };
13979
14299
 
13980
- const NEETO_EDITOR_SELECTORS = {
13981
- boldOption: "neeto-editor-fixed-menu-bold-option",
13982
- italicOption: "neeto-editor-fixed-menu-italic-option",
13983
- underlineOption: "neeto-editor-fixed-menu-underline-option",
13984
- strikeOption: "neeto-editor-fixed-menu-strike-option",
13985
- codeBlockOption: "neeto-editor-fixed-menu-code-option",
13986
- highlightOption: "neeto-editor-fixed-menu-highlight-option",
13987
- linkInput: "neeto-editor-fixed-menu-link-option-input",
13988
- linkSubmitButton: "neeto-editor-fixed-menu-link-option-link-button",
13989
- commandList: (index) => `neeto-editor-command-list-item-${index}`,
13990
- imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
13991
- imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
13992
- uploadInput: "neeto-editor-media-uploader-input",
13993
- editorMenuBarWrapper: "neeto-editor-fixed-menu-wrapper",
13994
- undoOption: "neeto-editor-fixed-menu-undo-option",
13995
- redoOption: "neeto-editor-fixed-menu-redo-option",
13996
- imageWrapper: "neeto-editor-image-wrapper",
13997
- contentField: "neeto-editor-content",
13998
- addLinkButton: "neeto-editor-fixed-menu-link-option",
13999
- addLinkTextField: "neeto-editor-add-link-text-input",
14000
- addURLTextField: "neeto-editor-add-link-url-input",
14001
- submitLinkButton: "neeto-editor-add-link",
14002
- };
14003
-
14004
14300
  const MEMBER_SELECTORS = {
14005
14301
  membersTab: "members-nav-tab",
14006
14302
  newButton: "ntm-add-member-button",
@@ -102784,7 +103080,7 @@ class Jimp$1 extends require$$0$4 {
102784
103080
  return throwError.call(this, "cb must be a function", cb);
102785
103081
  }
102786
103082
  const mime = getType(path) || this.getMIME();
102787
- const pathObj = Path.parse(path);
103083
+ const pathObj = Path__default.parse(path);
102788
103084
  if (pathObj.dir) {
102789
103085
  fs__default.mkdirSync(pathObj.dir, {
102790
103086
  recursive: true
@@ -134274,19 +134570,19 @@ var print = (() => ({
134274
134570
  constants: {
134275
134571
  measureText,
134276
134572
  measureTextHeight,
134277
- FONT_SANS_8_BLACK: Path.join(dir, "fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt"),
134278
- FONT_SANS_10_BLACK: Path.join(dir, "fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt"),
134279
- FONT_SANS_12_BLACK: Path.join(dir, "fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt"),
134280
- FONT_SANS_14_BLACK: Path.join(dir, "fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt"),
134281
- FONT_SANS_16_BLACK: Path.join(dir, "fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"),
134282
- FONT_SANS_32_BLACK: Path.join(dir, "fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt"),
134283
- FONT_SANS_64_BLACK: Path.join(dir, "fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt"),
134284
- FONT_SANS_128_BLACK: Path.join(dir, "fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt"),
134285
- FONT_SANS_8_WHITE: Path.join(dir, "fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt"),
134286
- FONT_SANS_16_WHITE: Path.join(dir, "fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt"),
134287
- FONT_SANS_32_WHITE: Path.join(dir, "fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt"),
134288
- FONT_SANS_64_WHITE: Path.join(dir, "fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt"),
134289
- FONT_SANS_128_WHITE: Path.join(dir, "fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt"),
134573
+ FONT_SANS_8_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt"),
134574
+ FONT_SANS_10_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt"),
134575
+ FONT_SANS_12_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt"),
134576
+ FONT_SANS_14_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt"),
134577
+ FONT_SANS_16_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"),
134578
+ FONT_SANS_32_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt"),
134579
+ FONT_SANS_64_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt"),
134580
+ FONT_SANS_128_BLACK: Path__default.join(dir, "fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt"),
134581
+ FONT_SANS_8_WHITE: Path__default.join(dir, "fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt"),
134582
+ FONT_SANS_16_WHITE: Path__default.join(dir, "fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt"),
134583
+ FONT_SANS_32_WHITE: Path__default.join(dir, "fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt"),
134584
+ FONT_SANS_64_WHITE: Path__default.join(dir, "fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt"),
134585
+ FONT_SANS_128_WHITE: Path__default.join(dir, "fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt"),
134290
134586
  /**
134291
134587
  * Loads a bitmap font from a file
134292
134588
  * @param {string} file the file path of a .fnt file
@@ -134313,7 +134609,7 @@ var print = (() => ({
134313
134609
  kernings[firstString] = kernings[firstString] || {};
134314
134610
  kernings[firstString][String.fromCharCode(font.kernings[i].second)] = font.kernings[i].amount;
134315
134611
  }
134316
- loadPages(this, Path.dirname(file), font.pages).then(pages => {
134612
+ loadPages(this, Path__default.dirname(file), font.pages).then(pages => {
134317
134613
  cb(null, {
134318
134614
  chars,
134319
134615
  kernings,
@@ -147163,7 +147459,7 @@ var require$$4 = {
147163
147459
  };
147164
147460
 
147165
147461
  const fs = fs__default;
147166
- const path = Path;
147462
+ const path = Path__default;
147167
147463
  const os = require$$0$3;
147168
147464
  const crypto = require$$3$2;
147169
147465
  const packageJson = require$$4;
@@ -147678,5 +147974,5 @@ const definePlaywrightConfig = (overrides) => {
147678
147974
  });
147679
147975
  };
147680
147976
 
147681
- export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, EMBED_SELECTORS, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, 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, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, USER_AGENTS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, 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 };
147977
+ export { API_ROUTES, ATTACHMENT_DELETION_TOASTR_MESSAGE, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_PICKER_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, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, 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, USER_AGENTS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, 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 };
147682
147978
  //# sourceMappingURL=index.js.map