@bigbinary/neeto-playwright-commons 1.12.5 → 1.12.6

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
@@ -20818,7 +20818,7 @@ const NEETO_EDITOR_SELECTORS = {
20818
20818
  imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
20819
20819
  dynamicVariablesButton: "dynamic-variables-button",
20820
20820
  emojiContainer: "neeto-editor-emoji-picker",
20821
- dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${neetoCist.hyphenate(variable)}`,
20821
+ dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${variable}`,
20822
20822
  };
20823
20823
  const NEETO_TEXT_MODIFIER_SELECTORS = {
20824
20824
  strike: optionSelector("strike"),
@@ -24204,13 +24204,14 @@ class EditorPage {
24204
24204
  await this.page.keyboard.press("Escape");
24205
24205
  };
24206
24206
  this.verifyDynamicVariables = async (dynamicVariables) => {
24207
- for (const dynamicVariable of dynamicVariables) {
24207
+ for (const { key, value } of dynamicVariables) {
24208
24208
  await this.dynamicVariablesButton.click();
24209
24209
  await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.dropdownContainer)).toBeVisible();
24210
24210
  await this.page
24211
- .getByTestId(NEETO_EDITOR_SELECTORS.dynamicVariableSelector(dynamicVariable))
24211
+ .getByTestId(NEETO_EDITOR_SELECTORS.dynamicVariableSelector(key))
24212
24212
  .click();
24213
- await test$1.expect(this.contentField.getByText(dynamicVariable)).toBeVisible();
24213
+ const formattedValue = value.length > 25 ? `${value.substring(0, 25)}...` : value;
24214
+ await test$1.expect(this.contentField.getByText(formattedValue)).toBeVisible();
24214
24215
  }
24215
24216
  };
24216
24217
  this.buttonsAndVerifications = {