@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.d.ts CHANGED
@@ -1428,7 +1428,6 @@ declare class ZapierPage extends IntegrationBase {
1428
1428
  interface VerifyDescriptionEditorParams {
1429
1429
  text: string;
1430
1430
  dynamicVariables?: string[];
1431
- defaultFontSizeOption?: string;
1432
1431
  linkUrl?: string;
1433
1432
  filePath?: string;
1434
1433
  imageUrl?: string;
@@ -1500,7 +1499,6 @@ declare class EditorPage {
1500
1499
  verifyDescriptionEditor: ({
1501
1500
  text,
1502
1501
  dynamicVariables,
1503
- defaultFontSizeOption,
1504
1502
  linkUrl,
1505
1503
  filePath,
1506
1504
  imageUrl,
@@ -3088,6 +3086,7 @@ declare const COMMON_SELECTORS: {
3088
3086
  *
3089
3087
  */
3090
3088
  declare const NEETO_EDITOR_SELECTORS: {
3089
+ fontSize: string;
3091
3090
  boldOption: string;
3092
3091
  italicOption: string;
3093
3092
  underlineOption: string;
@@ -3111,7 +3110,6 @@ declare const NEETO_EDITOR_SELECTORS: {
3111
3110
  addLinkTextField: string;
3112
3111
  addURLTextField: string;
3113
3112
  submitLinkButton: string;
3114
- fontSizeDropdown: (currentOption: string) => string;
3115
3113
  fixedMenuArrow: string;
3116
3114
  cannedResponseOption: string;
3117
3115
  cannedResponseSelectContainer: string;
package/index.js CHANGED
@@ -13788,6 +13788,7 @@ const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
13788
13788
  const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
13789
13789
 
13790
13790
  const NEETO_EDITOR_SELECTORS = {
13791
+ fontSize: optionSelector("font-size"),
13791
13792
  boldOption: optionSelector("bold"),
13792
13793
  italicOption: optionSelector("italic"),
13793
13794
  underlineOption: optionSelector("underline"),
@@ -13811,7 +13812,6 @@ const NEETO_EDITOR_SELECTORS = {
13811
13812
  addLinkTextField: "neeto-editor-add-link-text-input",
13812
13813
  addURLTextField: "neeto-editor-add-link-url-input",
13813
13814
  submitLinkButton: "neeto-editor-add-link",
13814
- fontSizeDropdown: (currentOption) => `${joinHyphenCase(currentOption)}-dropdown-icon`,
13815
13815
  fixedMenuArrow: fixedMenuSelector("arrow"),
13816
13816
  cannedResponseOption: optionSelector("canned-responses"),
13817
13817
  cannedResponseSelectContainer: "select-a-canned-response-select-container",
@@ -13874,10 +13874,9 @@ class EditorPage {
13874
13874
  (await this.moreMenuSelector.click());
13875
13875
  return optionLocator.isVisible();
13876
13876
  };
13877
- this.verifyFontSize = async (defaultFontSizeOption) => {
13878
- await this.editorWrapper
13879
- .getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown(defaultFontSizeOption))
13880
- .click();
13877
+ this.verifyFontSize = async () => {
13878
+ const fontSizeDropdown = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.fontSize);
13879
+ await fontSizeDropdown.click();
13881
13880
  const fontSize = Object.keys(FONT_SIZE_SELECTORS);
13882
13881
  for (const font of fontSize) {
13883
13882
  const fontKey = font;
@@ -13885,9 +13884,7 @@ class EditorPage {
13885
13884
  .getByTestId(FONT_SIZE_SELECTORS[fontKey])
13886
13885
  .click();
13887
13886
  await expect(this.contentField.getByRole("heading", { level: Number(font.slice(1)) })).toBeVisible();
13888
- await this.editorWrapper
13889
- .getByTestId(NEETO_EDITOR_SELECTORS.fontSizeDropdown(EXPANDED_FONT_SIZE[fontKey]))
13890
- .click();
13887
+ await fontSizeDropdown.click();
13891
13888
  }
13892
13889
  };
13893
13890
  this.verifyTextModifiers = async () => {
@@ -14047,9 +14044,9 @@ class EditorPage {
14047
14044
  await expect(this.contentField.getByText(dynamicVariable)).toBeVisible();
14048
14045
  }
14049
14046
  };
14050
- this.verifyDescriptionEditor = async ({ text, dynamicVariables, defaultFontSizeOption = "Paragraph", linkUrl = faker.internet.url(), filePath = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
14047
+ this.verifyDescriptionEditor = async ({ text, dynamicVariables, linkUrl = faker.internet.url(), filePath = "../../../e2e/assets/images/BigBinary.png", imageUrl = "https://picsum.photos/200/300", videoUrl = "https://youtu.be/jNQXAC9IVRw", cannedResponseSuccessMessage, }) => {
14051
14048
  await this.contentField.fill(text);
14052
- await this.verifyFontSize(defaultFontSizeOption);
14049
+ await this.verifyFontSize();
14053
14050
  if (await this.assertOptionVisibility(this.paragraphSelector)) {
14054
14051
  await this.paragraphSelector.click();
14055
14052
  const paragraphRole = DESCRIPTION_EDITOR_TEXTS.paragraphOption;