@bigbinary/neeto-playwright-commons 1.8.21 → 1.8.23

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
@@ -10047,8 +10047,8 @@ const MEMBER_TEXTS = {
10047
10047
  agent: "Agent",
10048
10048
  };
10049
10049
  const INTEGRATIONS_TEXTS = {
10050
- connectHeader: (integration) => `Connect your ${neetoCist.humanize(integration)} account`,
10051
- connectedHeader: (integration) => `You are connected to ${neetoCist.humanize(integration)}`,
10050
+ connectHeader: (integration) => `Connect your ${integration} account`,
10051
+ connectedHeader: (integration) => `You are connected to ${integration}`,
10052
10052
  };
10053
10053
  const SLACK_WEB_TEXTS = {
10054
10054
  signOut: "Sign out",
@@ -10369,9 +10369,11 @@ class IntegrationBase {
10369
10369
  this.integrationCard = this.page.getByTestId(INTEGRATION_SELECTORS.integrationCard(integration));
10370
10370
  this.integrationRouteIndex = integrationRouteIndex || "";
10371
10371
  this.connectHeader =
10372
- connectHeader || INTEGRATIONS_TEXTS.connectHeader(this.integration);
10372
+ connectHeader ||
10373
+ INTEGRATIONS_TEXTS.connectHeader(neetoCist.humanize(this.integration));
10373
10374
  this.connectedHeader =
10374
- connectedHeader || INTEGRATIONS_TEXTS.connectedHeader(this.integration);
10375
+ connectedHeader ||
10376
+ INTEGRATIONS_TEXTS.connectedHeader(neetoCist.humanize(this.integration));
10375
10377
  }
10376
10378
  }
10377
10379
 
@@ -10515,10 +10517,12 @@ const WEBHOOK_SELECTORS = {
10515
10517
  class WebhooksPage {
10516
10518
  constructor({ page, request, neetoPlaywrightUtilities, context, }) {
10517
10519
  this.getWebhookURL = async () => {
10520
+ var _a;
10521
+ const WEBHOOK_URL_REGEX = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/g;
10518
10522
  const webhookSitePage = await this.context.newPage();
10519
10523
  await webhookSitePage.goto(THIRD_PARTY_ROUTES.webhooks.site);
10520
10524
  await webhookSitePage.waitForURL(/.*#!\/\w+/);
10521
- const webhookToken = webhookSitePage.url().split("#!/")[1];
10525
+ const webhookToken = (_a = webhookSitePage.url().match(WEBHOOK_URL_REGEX)) === null || _a === void 0 ? void 0 : _a[0];
10522
10526
  const webhookSiteURL = `${THIRD_PARTY_ROUTES.webhooks.site}${webhookToken}`;
10523
10527
  await webhookSitePage.close();
10524
10528
  return { webhookSiteURL, webhookToken };