@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 +9 -5
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +10 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -206,7 +206,7 @@ declare class WebhooksPage {
|
|
|
206
206
|
constructor({ page, request, neetoPlaywrightUtilities, context, }: WebhooksPageParams);
|
|
207
207
|
getWebhookURL: () => Promise<{
|
|
208
208
|
webhookSiteURL: string;
|
|
209
|
-
webhookToken: string;
|
|
209
|
+
webhookToken: string | undefined;
|
|
210
210
|
}>;
|
|
211
211
|
addWebhook: ({ webhookSiteURL }: {
|
|
212
212
|
webhookSiteURL: string;
|
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import require$$0$4 from 'path';
|
|
|
12
12
|
import require$$0$5 from 'stream';
|
|
13
13
|
import require$$0$6 from 'events';
|
|
14
14
|
import { getI18nInstance, initI18n } from 'playwright-i18next-fixture';
|
|
15
|
-
import {
|
|
15
|
+
import { isNotEmpty, humanize } from '@bigbinary/neeto-cist';
|
|
16
16
|
import require$$3 from 'crypto';
|
|
17
17
|
|
|
18
18
|
const ENVIRONMENT = {
|
|
@@ -10011,8 +10011,8 @@ const MEMBER_TEXTS = {
|
|
|
10011
10011
|
agent: "Agent",
|
|
10012
10012
|
};
|
|
10013
10013
|
const INTEGRATIONS_TEXTS = {
|
|
10014
|
-
connectHeader: (integration) => `Connect your ${
|
|
10015
|
-
connectedHeader: (integration) => `You are connected to ${
|
|
10014
|
+
connectHeader: (integration) => `Connect your ${integration} account`,
|
|
10015
|
+
connectedHeader: (integration) => `You are connected to ${integration}`,
|
|
10016
10016
|
};
|
|
10017
10017
|
const SLACK_WEB_TEXTS = {
|
|
10018
10018
|
signOut: "Sign out",
|
|
@@ -10333,9 +10333,11 @@ class IntegrationBase {
|
|
|
10333
10333
|
this.integrationCard = this.page.getByTestId(INTEGRATION_SELECTORS.integrationCard(integration));
|
|
10334
10334
|
this.integrationRouteIndex = integrationRouteIndex || "";
|
|
10335
10335
|
this.connectHeader =
|
|
10336
|
-
connectHeader ||
|
|
10336
|
+
connectHeader ||
|
|
10337
|
+
INTEGRATIONS_TEXTS.connectHeader(humanize(this.integration));
|
|
10337
10338
|
this.connectedHeader =
|
|
10338
|
-
connectedHeader ||
|
|
10339
|
+
connectedHeader ||
|
|
10340
|
+
INTEGRATIONS_TEXTS.connectedHeader(humanize(this.integration));
|
|
10339
10341
|
}
|
|
10340
10342
|
}
|
|
10341
10343
|
|
|
@@ -10479,10 +10481,12 @@ const WEBHOOK_SELECTORS = {
|
|
|
10479
10481
|
class WebhooksPage {
|
|
10480
10482
|
constructor({ page, request, neetoPlaywrightUtilities, context, }) {
|
|
10481
10483
|
this.getWebhookURL = async () => {
|
|
10484
|
+
var _a;
|
|
10485
|
+
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;
|
|
10482
10486
|
const webhookSitePage = await this.context.newPage();
|
|
10483
10487
|
await webhookSitePage.goto(THIRD_PARTY_ROUTES.webhooks.site);
|
|
10484
10488
|
await webhookSitePage.waitForURL(/.*#!\/\w+/);
|
|
10485
|
-
const webhookToken = webhookSitePage.url().
|
|
10489
|
+
const webhookToken = (_a = webhookSitePage.url().match(WEBHOOK_URL_REGEX)) === null || _a === void 0 ? void 0 : _a[0];
|
|
10486
10490
|
const webhookSiteURL = `${THIRD_PARTY_ROUTES.webhooks.site}${webhookToken}`;
|
|
10487
10491
|
await webhookSitePage.close();
|
|
10488
10492
|
return { webhookSiteURL, webhookToken };
|