@bigbinary/neeto-playwright-commons 1.12.4 → 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"),
@@ -23689,6 +23689,12 @@ const WEBHOOK_SELECTORS = {
23689
23689
  endpointInputField: "endpoint-input-field",
23690
23690
  deliveryResponseCode: "delivery-response-code",
23691
23691
  deliveryRequestPayload: "delivery-request-payload",
23692
+ addSecretKey: "add-secret-key",
23693
+ newWebhookHeader: "add-new-webhook-pane-header",
23694
+ endpointInputError: "endpoint-input-error",
23695
+ eventsSelectError: "events-select-error",
23696
+ regenerateSecret: "regenerate-secret",
23697
+ deleteSecret: "delete-secret",
23692
23698
  };
23693
23699
 
23694
23700
  class WebhooksPage {
@@ -23709,9 +23715,15 @@ class WebhooksPage {
23709
23715
  await this.page
23710
23716
  .getByTestId(WEBHOOK_SELECTORS.endpointInputField)
23711
23717
  .fill(webhookSiteURL);
23712
- const addWebhook = this.neetoPlaywrightUtilities.interceptMultipleResponses({ responseUrl: ROUTES.webhooks, times: 2 });
23713
- await this.page.getByTestId(COMMON_SELECTORS.saveChangesButton).click();
23714
- await addWebhook;
23718
+ await Promise.all([
23719
+ this.page.getByTestId(COMMON_SELECTORS.saveChangesButton).click(),
23720
+ this.neetoPlaywrightUtilities.verifyToast({
23721
+ message: this.t("resource.add", {
23722
+ entity: "webhook",
23723
+ count: 1,
23724
+ }),
23725
+ }),
23726
+ ]);
23715
23727
  await test$1.expect(this.page.getByRole("row", { name: webhookSiteURL })).toBeVisible();
23716
23728
  };
23717
23729
  this.verifyLatestWebhookResponse = async ({ callback = () => { }, webhookToken, parseFullResponseContent = false, ...otherParams }) => {
@@ -24192,13 +24204,14 @@ class EditorPage {
24192
24204
  await this.page.keyboard.press("Escape");
24193
24205
  };
24194
24206
  this.verifyDynamicVariables = async (dynamicVariables) => {
24195
- for (const dynamicVariable of dynamicVariables) {
24207
+ for (const { key, value } of dynamicVariables) {
24196
24208
  await this.dynamicVariablesButton.click();
24197
24209
  await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.dropdownContainer)).toBeVisible();
24198
24210
  await this.page
24199
- .getByTestId(NEETO_EDITOR_SELECTORS.dynamicVariableSelector(dynamicVariable))
24211
+ .getByTestId(NEETO_EDITOR_SELECTORS.dynamicVariableSelector(key))
24200
24212
  .click();
24201
- 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();
24202
24215
  }
24203
24216
  };
24204
24217
  this.buttonsAndVerifications = {