@bigbinary/neeto-playwright-commons 1.10.12 → 1.10.13

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 CHANGED
@@ -13835,6 +13835,7 @@ const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
13835
13835
  const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
13836
13836
 
13837
13837
  const NEETO_EDITOR_SELECTORS = {
13838
+ fontSize: optionSelector("font-size"),
13838
13839
  boldOption: optionSelector("bold"),
13839
13840
  italicOption: optionSelector("italic"),
13840
13841
  underlineOption: optionSelector("underline"),
@@ -13858,7 +13859,6 @@ const NEETO_EDITOR_SELECTORS = {
13858
13859
  addLinkTextField: "neeto-editor-add-link-text-input",
13859
13860
  addURLTextField: "neeto-editor-add-link-url-input",
13860
13861
  submitLinkButton: "neeto-editor-add-link",
13861
- fontSizeDropdown: (currentOption) => `${joinHyphenCase(currentOption)}-dropdown-icon`,
13862
13862
  fixedMenuArrow: fixedMenuSelector("arrow"),
13863
13863
  cannedResponseOption: optionSelector("canned-responses"),
13864
13864
  cannedResponseSelectContainer: "select-a-canned-response-select-container",
@@ -13921,10 +13921,9 @@ class EditorPage {
13921
13921
  (await this.moreMenuSelector.click());
13922
13922
  return optionLocator.isVisible();
13923
13923
  };
13924
- this.verifyFontSize = async (defaultFontSizeOption) => {
13925
- await this.editorWrapper
13926
- .getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown(defaultFontSizeOption))
13927
- .click();
13924
+ this.verifyFontSize = async () => {
13925
+ const fontSizeDropdown = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.fontSize);
13926
+ await fontSizeDropdown.click();
13928
13927
  const fontSize = Object.keys(FONT_SIZE_SELECTORS);
13929
13928
  for (const font of fontSize) {
13930
13929
  const fontKey = font;
@@ -13932,9 +13931,7 @@ class EditorPage {
13932
13931
  .getByTestId(FONT_SIZE_SELECTORS[fontKey])
13933
13932
  .click();
13934
13933
  await test$1.expect(this.contentField.getByRole("heading", { level: Number(font.slice(1)) })).toBeVisible();
13935
- await this.editorWrapper
13936
- .getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown(EXPANDED_FONT_SIZE[fontKey]))
13937
- .click();
13934
+ await fontSizeDropdown.click();
13938
13935
  }
13939
13936
  };
13940
13937
  this.verifyTextModifiers = async () => {
@@ -14094,9 +14091,9 @@ class EditorPage {
14094
14091
  await test$1.expect(this.contentField.getByText(dynamicVariable)).toBeVisible();
14095
14092
  }
14096
14093
  };
14097
- this.verifyDescriptionEditor = async ({ text, dynamicVariables, defaultFontSizeOption = "Paragraph", linkUrl = faker.faker.internet.url(), filePath = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
14094
+ this.verifyDescriptionEditor = async ({ text, dynamicVariables, linkUrl = faker.faker.internet.url(), filePath = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
14098
14095
  await this.contentField.fill(text);
14099
- await this.verifyFontSize(defaultFontSizeOption);
14096
+ await this.verifyFontSize();
14100
14097
  if (await this.assertOptionVisibility(this.paragraphSelector)) {
14101
14098
  await this.paragraphSelector.click();
14102
14099
  const paragraphRole = DESCRIPTION_EDITOR_TEXTS.paragraphOption;