@bigbinary/neeto-playwright-commons 1.8.21 → 1.8.22
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 +3 -1
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -10515,10 +10515,12 @@ const WEBHOOK_SELECTORS = {
|
|
|
10515
10515
|
class WebhooksPage {
|
|
10516
10516
|
constructor({ page, request, neetoPlaywrightUtilities, context, }) {
|
|
10517
10517
|
this.getWebhookURL = async () => {
|
|
10518
|
+
var _a;
|
|
10519
|
+
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
10520
|
const webhookSitePage = await this.context.newPage();
|
|
10519
10521
|
await webhookSitePage.goto(THIRD_PARTY_ROUTES.webhooks.site);
|
|
10520
10522
|
await webhookSitePage.waitForURL(/.*#!\/\w+/);
|
|
10521
|
-
const webhookToken = webhookSitePage.url().
|
|
10523
|
+
const webhookToken = (_a = webhookSitePage.url().match(WEBHOOK_URL_REGEX)) === null || _a === void 0 ? void 0 : _a[0];
|
|
10522
10524
|
const webhookSiteURL = `${THIRD_PARTY_ROUTES.webhooks.site}${webhookToken}`;
|
|
10523
10525
|
await webhookSitePage.close();
|
|
10524
10526
|
return { webhookSiteURL, webhookToken };
|