@bigbinary/neeto-playwright-commons 2.2.5 → 3.0.0

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/README.md CHANGED
@@ -130,6 +130,7 @@ import { COMMON_SELECTORS } from "@bigbinary/neeto-playwright-common";
130
130
  - [Routes](./docs/routes.md)
131
131
  - [Custom commands](./docs/custom-commands.md)
132
132
  - [MailerUtils](./docs/utils/mailer-utils.md)
133
+ - [EmailDeliveryUtils](./docs/utils/email-delivery-utils.md)
133
134
  - [NeetoAuthServer](./docs/utils/neeto-auth-server.md)
134
135
  - [Util functions](./docs/utils)
135
136
  - [POMs](./docs/poms)
@@ -0,0 +1,28 @@
1
+ export * from "./common";
2
+ export * from "./configure";
3
+ export * from "./editor";
4
+ export * from "./embed";
5
+ export * from "./filters";
6
+ export * from "./helpCenter";
7
+ export * from "./imageUploader";
8
+ export * from "./login";
9
+ export * from "./members";
10
+ export * from "./profileSection";
11
+ export * from "./roles";
12
+ export * from "./signup";
13
+ export * from "./tab";
14
+ export * from "./tags";
15
+ export * from "./widgets";
16
+ export * from "./integrations/common";
17
+ export * from "./integrations/google";
18
+ export * from "./integrations/slack";
19
+ export * from "./integrations/webhooks";
20
+ export * from "./integrations/zapier";
21
+ export * from "./integrations/twilio";
22
+ export * from "./table";
23
+ export * from "./themes";
24
+ export * from "./adminPanel";
25
+ export * from "./datePicker";
26
+ export * from "./onboarding";
27
+ export * from "./seo";
28
+ export * from "./integrations/microsoft";
@@ -0,0 +1,29 @@
1
+ export * from "./common";
2
+ export * from "./configure";
3
+ export * from "./editor";
4
+ export * from "./embed";
5
+ export * from "./filters";
6
+ export * from "./helpCenter";
7
+ export * from "./imageUploader";
8
+ export * from "./login";
9
+ export * from "./members";
10
+ export * from "./profileSection";
11
+ export * from "./roles";
12
+ export * from "./signup";
13
+ export * from "./tab";
14
+ export * from "./tags";
15
+ export * from "./widgets";
16
+ export * from "./integrations/common";
17
+ export * from "./integrations/google";
18
+ export * from "./integrations/slack";
19
+ export * from "./integrations/webhooks";
20
+ export * from "./integrations/zapier";
21
+ export * from "./integrations/twilio";
22
+ export * from "./table";
23
+ export * from "./themes";
24
+ export * from "./adminPanel";
25
+ export * from "./datePicker";
26
+ export * from "./onboarding";
27
+ export * from "./seo";
28
+ export * from "./integrations/microsoft";
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/selectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { CustomFixture, commands } from "./commands";
2
+ import { generateStagingData } from "./stagingData";
3
+ import stealthTest from "./stealth";
4
+ import { i18nFixture } from "./translations";
5
+ export { i18nFixture, generateStagingData, CustomFixture, commands, stealthTest, };
@@ -0,0 +1,6 @@
1
+ import { commands } from "./commands";
2
+ import { generateStagingData } from "./stagingData";
3
+ import stealthTest from "./stealth";
4
+ import { i18nFixture } from "./translations";
5
+ export { i18nFixture, generateStagingData, commands, stealthTest, };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fixtures/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,WAAW,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EACL,WAAW,EACX,mBAAmB,EAEnB,QAAQ,EACR,WAAW,GACZ,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { ApiKeysApi } from "@apis/apiKeys";
2
+ import { CustomDomainApi } from "@apis/customDomain";
3
+ import { IpRestrictionsApi } from "@apis/ipRestrictions";
4
+ import { MemberApis } from "@apis/members";
5
+ import { NeetoEmailDeliveryApi } from "@apis/neetoEmailDelivery";
6
+ import { RailsEmailApiClient } from "@apis/railsEmailApi";
7
+ import { RoleApis } from "@apis/roles";
8
+ import { SecurityApi } from "@apis/security";
9
+ import { TagsApi } from "@apis/tags";
10
+ import { ThankYouApi } from "@apis/thankYou";
11
+ import { NeetoTowerApi } from "@apis/thirdParty/neetoTower";
12
+ import { SlackApi } from "@apis/thirdParty/slack";
13
+ import { WebhookSiteApi } from "@apis/thirdParty/webhookSite";
14
+ import { TwilioApi } from "@apis/twilio";
15
+ import { i18nFixture, generateStagingData, CustomFixture, commands, stealthTest } from "@fixtures";
16
+ import ThankYouPage from "@poms/configure/thankYou";
17
+ import EmbedBase from "@poms/embedBase";
18
+ import HelpAndProfilePage from "@poms/helpAndProfile";
19
+ import GooglePage from "@poms/integrations/google";
20
+ import IntegrationBase from "@poms/integrations/integrationBase";
21
+ import MicrosoftPage from "@poms/integrations/microsoft";
22
+ import SlackPage from "@poms/integrations/slack";
23
+ import WebhooksPage from "@poms/integrations/webhooks";
24
+ import ZapierPage from "@poms/integrations/zapier";
25
+ import Member from "@poms/members";
26
+ import EditorPage from "@poms/neeto/editor";
27
+ import ImageUploader from "@poms/neeto/imageUploader";
28
+ import TeamMembers from "@poms/neeto/teamMembers";
29
+ import OrganizationPage from "@poms/organizations";
30
+ import ApiKeysPage from "@poms/settings/apiKeys";
31
+ import AuditLogsPage from "@poms/settings/auditLogs";
32
+ import CustomDomainPage from "@poms/settings/customDomain";
33
+ import IPRestrictionsPage from "@poms/settings/ipRestrictions";
34
+ import RolesPage from "@poms/settings/roles";
35
+ import SidebarSection from "@poms/sidebar";
36
+ import TagsPage from "@poms/tags";
37
+ import CustomCommands from "@utils/commands";
38
+ import { EmailDeliveryUtils } from "@utils/emailDeliveryUtils";
39
+ import MailerUtils from "@utils/mailerUtils";
40
+ import { RailsEmailUtils } from "@utils/railsEmailUtils";
41
+ export * from "@constants/common";
42
+ export * from "@constants/userAgents";
43
+ export * from "@routes";
44
+ export * from "@constants/networkConditions";
45
+ export * from "@constants/fileFormats";
46
+ export * from "@constants/members";
47
+ export * from "@constants/auditLogs";
48
+ export * from "@constants/keyboardShortcuts";
49
+ export * from "@texts";
50
+ export * from "@constants/editorTexts";
51
+ export * from "@constants/phoneNumberFormats";
52
+ export * from "@selectors";
53
+ export * from "@utils/authentication";
54
+ export * from "@utils/common";
55
+ export * from "@utils/login";
56
+ export * from "@utils/organization";
57
+ export * from "@utils/table";
58
+ export * from "@utils/qrcode";
59
+ export * from "@utils/totp";
60
+ export * from "@utils/throttle";
61
+ export * from "@utils/embed";
62
+ export * from "@utils/filters";
63
+ export * from "@utils/imageUploader";
64
+ export * from "@utils/currencyFormat";
65
+ export * from "@utils/isGithubIssueOpen";
66
+ export * from "@utils/themes";
67
+ export * from "@utils/interactionUtils";
68
+ export * from "@utils/fileUtils";
69
+ export * from "@utils/phoneNumbers";
70
+ export { warmup } from "@utils/warmup";
71
+ export { default as NeetoAuthServer } from "@utils/neetoAuthServer";
72
+ export * from "./initializer";
73
+ export type { EmailDeliveryProvider, EmailDeliveryConnectParams, EmailDeliveryVerifyEmailParams, EmailDeliveryVerifiedEmail, EmailDeliveryVerifyEmailResponse, } from "@apis/neetoEmailDelivery";
74
+ export { CustomCommands, CustomFixture, commands, generateStagingData, i18nFixture, stealthTest, WebhooksPage, HelpAndProfilePage, OrganizationPage, MailerUtils, IntegrationBase, SlackPage, ZapierPage, EmbedBase, SidebarSection, TagsPage, ImageUploader, EditorPage, TeamMembers, ThankYouPage, GooglePage, Member, AuditLogsPage, RolesPage, ApiKeysPage, CustomDomainPage, MemberApis, RoleApis, TagsApi, SecurityApi, ThankYouApi, TwilioApi, NeetoTowerApi, SlackApi, ApiKeysApi, CustomDomainApi, IpRestrictionsApi, IPRestrictionsPage, MicrosoftPage, RailsEmailApiClient, RailsEmailUtils, WebhookSiteApi, NeetoEmailDeliveryApi, EmailDeliveryUtils, };
@@ -0,0 +1,80 @@
1
+ import { ApiKeysApi } from "@apis/apiKeys";
2
+ import { CustomDomainApi } from "@apis/customDomain";
3
+ import { IpRestrictionsApi } from "@apis/ipRestrictions";
4
+ import { MemberApis } from "@apis/members";
5
+ import { NeetoEmailDeliveryApi } from "@apis/neetoEmailDelivery";
6
+ import { RailsEmailApiClient } from "@apis/railsEmailApi";
7
+ import { RoleApis } from "@apis/roles";
8
+ import { SecurityApi } from "@apis/security";
9
+ import { TagsApi } from "@apis/tags";
10
+ import { ThankYouApi } from "@apis/thankYou";
11
+ import { NeetoTowerApi } from "@apis/thirdParty/neetoTower";
12
+ import { SlackApi } from "@apis/thirdParty/slack";
13
+ import { WebhookSiteApi } from "@apis/thirdParty/webhookSite";
14
+ import { TwilioApi } from "@apis/twilio";
15
+ import { i18nFixture, generateStagingData, commands, stealthTest, } from "@fixtures";
16
+ import ThankYouPage from "@poms/configure/thankYou";
17
+ import EmbedBase from "@poms/embedBase";
18
+ import HelpAndProfilePage from "@poms/helpAndProfile";
19
+ import GooglePage from "@poms/integrations/google";
20
+ import IntegrationBase from "@poms/integrations/integrationBase";
21
+ import MicrosoftPage from "@poms/integrations/microsoft";
22
+ import SlackPage from "@poms/integrations/slack";
23
+ import WebhooksPage from "@poms/integrations/webhooks";
24
+ import ZapierPage from "@poms/integrations/zapier";
25
+ import Member from "@poms/members";
26
+ import EditorPage from "@poms/neeto/editor";
27
+ import ImageUploader from "@poms/neeto/imageUploader";
28
+ import TeamMembers from "@poms/neeto/teamMembers";
29
+ import OrganizationPage from "@poms/organizations";
30
+ import ApiKeysPage from "@poms/settings/apiKeys";
31
+ import AuditLogsPage from "@poms/settings/auditLogs";
32
+ import CustomDomainPage from "@poms/settings/customDomain";
33
+ import IPRestrictionsPage from "@poms/settings/ipRestrictions";
34
+ import RolesPage from "@poms/settings/roles";
35
+ import SidebarSection from "@poms/sidebar";
36
+ import TagsPage from "@poms/tags";
37
+ import CustomCommands from "@utils/commands";
38
+ import { EmailDeliveryUtils } from "@utils/emailDeliveryUtils";
39
+ import MailerUtils from "@utils/mailerUtils";
40
+ import { RailsEmailUtils } from "@utils/railsEmailUtils";
41
+ // exporting constants
42
+ export * from "@constants/common";
43
+ export * from "@constants/userAgents";
44
+ export * from "@routes";
45
+ export * from "@constants/networkConditions";
46
+ export * from "@constants/fileFormats";
47
+ export * from "@constants/members";
48
+ export * from "@constants/auditLogs";
49
+ export * from "@constants/keyboardShortcuts";
50
+ // exporting texts
51
+ export * from "@texts";
52
+ export * from "@constants/editorTexts";
53
+ export * from "@constants/phoneNumberFormats";
54
+ //exporting selectors
55
+ export * from "@selectors";
56
+ // exporting utils
57
+ export * from "@utils/authentication";
58
+ export * from "@utils/common";
59
+ export * from "@utils/login";
60
+ export * from "@utils/organization";
61
+ export * from "@utils/table";
62
+ export * from "@utils/qrcode";
63
+ export * from "@utils/totp";
64
+ export * from "@utils/throttle";
65
+ export * from "@utils/embed";
66
+ export * from "@utils/filters";
67
+ export * from "@utils/imageUploader";
68
+ export * from "@utils/currencyFormat";
69
+ export * from "@utils/isGithubIssueOpen";
70
+ export * from "@utils/themes";
71
+ export * from "@utils/interactionUtils";
72
+ export * from "@utils/fileUtils";
73
+ export * from "@utils/phoneNumbers";
74
+ export { warmup } from "@utils/warmup";
75
+ export { default as NeetoAuthServer } from "@utils/neetoAuthServer";
76
+ // exporting initializer
77
+ export * from "./initializer";
78
+ // exporting fixtures
79
+ export { CustomCommands, commands, generateStagingData, i18nFixture, stealthTest, WebhooksPage, HelpAndProfilePage, OrganizationPage, MailerUtils, IntegrationBase, SlackPage, ZapierPage, EmbedBase, SidebarSection, TagsPage, ImageUploader, EditorPage, TeamMembers, ThankYouPage, GooglePage, Member, AuditLogsPage, RolesPage, ApiKeysPage, CustomDomainPage, MemberApis, RoleApis, TagsApi, SecurityApi, ThankYouApi, TwilioApi, NeetoTowerApi, SlackApi, ApiKeysApi, CustomDomainApi, IpRestrictionsApi, IPRestrictionsPage, MicrosoftPage, RailsEmailApiClient, RailsEmailUtils, WebhookSiteApi, NeetoEmailDeliveryApi, EmailDeliveryUtils, };
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAA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eAAe,EACf,SAAS,EACT,UAAU,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,EACN,aAAa,EACb,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,OAAO,EACP,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,QAAQ,EACR,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,kBAAkB,GACnB,CAAC"}
package/index.cjs.js CHANGED
@@ -19,9 +19,9 @@ var require$$1$3 = require('node:stream');
19
19
  var require$$0$8 = require('crypto');
20
20
  var require$$1$4 = require('zlib');
21
21
  var require$$0$9 = require('assert');
22
- var require$$0$a = require('tty');
22
+ var require$$1$5 = require('tty');
23
23
  var stealth$1 = require('puppeteer-extra-plugin-stealth');
24
- var require$$1$5 = require('events');
24
+ var require$$1$6 = require('events');
25
25
  var customParseFormat = require('dayjs/plugin/customParseFormat');
26
26
  var timezone = require('dayjs/plugin/timezone');
27
27
  var utc = require('dayjs/plugin/utc');
@@ -247,6 +247,25 @@ class MemberApis {
247
247
  });
248
248
  }
249
249
 
250
+ const NEETO_EMAIL_DELIVERY_TESTING_BASE_URL = "/neeto_email_delivery/api/v1/testing";
251
+ class NeetoEmailDeliveryApi {
252
+ neetoPlaywrightUtilities;
253
+ constructor(neetoPlaywrightUtilities) {
254
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
255
+ }
256
+ connect = (payload) => this.neetoPlaywrightUtilities.apiRequest({
257
+ method: "post",
258
+ url: `${NEETO_EMAIL_DELIVERY_TESTING_BASE_URL}/connect`,
259
+ body: {
260
+ connect: neetoCist.keysToSnakeCase(payload),
261
+ },
262
+ });
263
+ verifyEmail = (params) => this.neetoPlaywrightUtilities.apiRequest({
264
+ url: `${NEETO_EMAIL_DELIVERY_TESTING_BASE_URL}/verify_email`,
265
+ params: neetoCist.keysToSnakeCase(params),
266
+ });
267
+ }
268
+
250
269
  class RailsEmailApiClient {
251
270
  port = process.env.RAILS_SERVER_PORT;
252
271
  subdomain = process.env.SUBDOMAIN ?? "spinkart";
@@ -396,6 +415,7 @@ const ENVIRONMENT = {
396
415
  const EXAMPLE_URL = "https://example.com";
397
416
  const IS_STAGING_ENV = process.env.TEST_ENV === ENVIRONMENT.staging;
398
417
  const IS_DEV_ENV = process.env.TEST_ENV === ENVIRONMENT.development;
418
+ const IS_CI = neetoCist.isPresent(process.env.NEETO_CI_JOB_ID);
399
419
  const DEFAULT_WEBHOOKS_RESPONSE_TEXT = JSON.stringify({ success: true });
400
420
  const STORAGE_STATE = "./e2e/auth/user.json";
401
421
  const GLOBAL_TRANSLATIONS_PATTERN = "../node_modules/@bigbinary/**/translations/en.json";
@@ -5114,8 +5134,8 @@ const skipTest = {
5114
5134
  forNonNightlyRun: () => {
5115
5135
  const currentBranch = execCommand("git rev-parse --abbrev-ref HEAD");
5116
5136
  const isNightlyRun = currentBranch === "main" &&
5117
- process.env.TEST_ENV === ENVIRONMENT.staging &&
5118
- !!process.env.NEETO_CI_JOB_ID;
5137
+ IS_STAGING_ENV &&
5138
+ IS_CI;
5119
5139
  return test.skip(ramda.not(isNightlyRun), "Run test only in playwright-nightly");
5120
5140
  },
5121
5141
  ifNotWithinAllowedNightlyHours: ({ reason, allowedNightlyRunHours = [0, 6, 12, 18], }) => {
@@ -5394,6 +5414,7 @@ const HELP_CENTER_SELECTORS = {
5394
5414
  };
5395
5415
 
5396
5416
  const NEETO_IMAGE_UPLOADER_SELECTORS = {
5417
+ libraryImageCard: "library-image-card",
5397
5418
  imageUploaderWrapper: "image-uploader-wrapper",
5398
5419
  browseText: "neeto-image-uploader-browse-text",
5399
5420
  fileInput: "neeto-image-uploader-file-input",
@@ -107240,7 +107261,7 @@ const STATIC_ASSET_PATTERN = /\.(js|css|woff2?|ttf|eot|png|svg|ico|gif|webp)(\?.
107240
107261
  const assetCache = new Map();
107241
107262
  const commands = {
107242
107263
  context: async ({ context }, use) => {
107243
- if (IS_DEV_ENV) {
107264
+ if (IS_DEV_ENV && IS_CI) {
107244
107265
  await context.route(STATIC_ASSET_PATTERN, async (route) => {
107245
107266
  const url = route.request().url();
107246
107267
  const hit = assetCache.get(url);
@@ -108037,12 +108058,12 @@ var hasRequiredHasFlag;
108037
108058
  function requireHasFlag () {
108038
108059
  if (hasRequiredHasFlag) return hasFlag;
108039
108060
  hasRequiredHasFlag = 1;
108040
- hasFlag = (flag, argv) => {
108041
- argv = argv || process.argv;
108061
+
108062
+ hasFlag = (flag, argv = process.argv) => {
108042
108063
  const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
108043
- const pos = argv.indexOf(prefix + flag);
108044
- const terminatorPos = argv.indexOf('--');
108045
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
108064
+ const position = argv.indexOf(prefix + flag);
108065
+ const terminatorPosition = argv.indexOf('--');
108066
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
108046
108067
  };
108047
108068
  return hasFlag;
108048
108069
  }
@@ -108054,23 +108075,32 @@ function requireSupportsColor () {
108054
108075
  if (hasRequiredSupportsColor) return supportsColor_1;
108055
108076
  hasRequiredSupportsColor = 1;
108056
108077
  const os = require$$0$4;
108078
+ const tty = require$$1$5;
108057
108079
  const hasFlag = requireHasFlag();
108058
108080
 
108059
- const env = process.env;
108081
+ const {env} = process;
108060
108082
 
108061
108083
  let forceColor;
108062
108084
  if (hasFlag('no-color') ||
108063
108085
  hasFlag('no-colors') ||
108064
- hasFlag('color=false')) {
108065
- forceColor = false;
108086
+ hasFlag('color=false') ||
108087
+ hasFlag('color=never')) {
108088
+ forceColor = 0;
108066
108089
  } else if (hasFlag('color') ||
108067
108090
  hasFlag('colors') ||
108068
108091
  hasFlag('color=true') ||
108069
108092
  hasFlag('color=always')) {
108070
- forceColor = true;
108093
+ forceColor = 1;
108071
108094
  }
108095
+
108072
108096
  if ('FORCE_COLOR' in env) {
108073
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
108097
+ if (env.FORCE_COLOR === 'true') {
108098
+ forceColor = 1;
108099
+ } else if (env.FORCE_COLOR === 'false') {
108100
+ forceColor = 0;
108101
+ } else {
108102
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
108103
+ }
108074
108104
  }
108075
108105
 
108076
108106
  function translateLevel(level) {
@@ -108086,8 +108116,8 @@ function requireSupportsColor () {
108086
108116
  };
108087
108117
  }
108088
108118
 
108089
- function supportsColor(stream) {
108090
- if (forceColor === false) {
108119
+ function supportsColor(haveStream, streamIsTTY) {
108120
+ if (forceColor === 0) {
108091
108121
  return 0;
108092
108122
  }
108093
108123
 
@@ -108101,22 +108131,21 @@ function requireSupportsColor () {
108101
108131
  return 2;
108102
108132
  }
108103
108133
 
108104
- if (stream && !stream.isTTY && forceColor !== true) {
108134
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
108105
108135
  return 0;
108106
108136
  }
108107
108137
 
108108
- const min = forceColor ? 1 : 0;
108138
+ const min = forceColor || 0;
108139
+
108140
+ if (env.TERM === 'dumb') {
108141
+ return min;
108142
+ }
108109
108143
 
108110
108144
  if (process.platform === 'win32') {
108111
- // Node.js 7.5.0 is the first version of Node.js to include a patch to
108112
- // libuv that enables 256 color output on Windows. Anything earlier and it
108113
- // won't work. However, here we target Node.js 8 at minimum as it is an LTS
108114
- // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
108115
- // release that supports 256 colors. Windows 10 build 14931 is the first release
108116
- // that supports 16m/TrueColor.
108145
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
108146
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
108117
108147
  const osRelease = os.release().split('.');
108118
108148
  if (
108119
- Number(process.versions.node.split('.')[0]) >= 8 &&
108120
108149
  Number(osRelease[0]) >= 10 &&
108121
108150
  Number(osRelease[2]) >= 10586
108122
108151
  ) {
@@ -108127,7 +108156,7 @@ function requireSupportsColor () {
108127
108156
  }
108128
108157
 
108129
108158
  if ('CI' in env) {
108130
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
108159
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
108131
108160
  return 1;
108132
108161
  }
108133
108162
 
@@ -108166,22 +108195,18 @@ function requireSupportsColor () {
108166
108195
  return 1;
108167
108196
  }
108168
108197
 
108169
- if (env.TERM === 'dumb') {
108170
- return min;
108171
- }
108172
-
108173
108198
  return min;
108174
108199
  }
108175
108200
 
108176
108201
  function getSupportLevel(stream) {
108177
- const level = supportsColor(stream);
108202
+ const level = supportsColor(stream, stream && stream.isTTY);
108178
108203
  return translateLevel(level);
108179
108204
  }
108180
108205
 
108181
108206
  supportsColor_1 = {
108182
108207
  supportsColor: getSupportLevel,
108183
- stdout: getSupportLevel(process.stdout),
108184
- stderr: getSupportLevel(process.stderr)
108208
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
108209
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
108185
108210
  };
108186
108211
  return supportsColor_1;
108187
108212
  }
@@ -108196,7 +108221,7 @@ function requireNode () {
108196
108221
  if (hasRequiredNode) return node.exports;
108197
108222
  hasRequiredNode = 1;
108198
108223
  (function (module, exports$1) {
108199
- const tty = require$$0$a;
108224
+ const tty = require$$1$5;
108200
108225
  const util = require$$0$3;
108201
108226
 
108202
108227
  /**
@@ -115532,7 +115557,7 @@ function requireAsync$3 () {
115532
115557
  if (hasRequiredAsync$3) return async$2;
115533
115558
  hasRequiredAsync$3 = 1;
115534
115559
  Object.defineProperty(async$2, "__esModule", { value: true });
115535
- const events_1 = require$$1$5;
115560
+ const events_1 = require$$1$6;
115536
115561
  const fsScandir = requireOut$2();
115537
115562
  const fastq = requireQueue();
115538
115563
  const common = requireCommon();
@@ -120993,9 +121018,6 @@ class CustomDomainPage {
120993
121018
  ]);
120994
121019
  await this.neetoPlaywrightUtilities.waitForPageLoad();
120995
121020
  await validateButton.click();
120996
- await test.expect
120997
- .soft(this.page.getByTestId(COMMON_SELECTORS.calloutElement))
120998
- .toBeVisible({ timeout: 15_000 });
120999
121021
  let isCertificateLimitExceeded = false;
121000
121022
  await test.expect(async () => {
121001
121023
  isCertificateLimitExceeded = await this.isCertificateLimitExceeded();
@@ -121461,6 +121483,70 @@ class TagsPage {
121461
121483
  };
121462
121484
  }
121463
121485
 
121486
+ const REFRESH_TOKEN_ENV_KEYS = {
121487
+ gmail: "EMAIL_DELIVERY_GMAIL_REFRESH_TOKEN",
121488
+ outlook: "EMAIL_DELIVERY_OUTLOOK_REFRESH_TOKEN",
121489
+ };
121490
+ const FROM_EMAIL_ENV_KEYS = {
121491
+ gmail: "EMAIL_DELIVERY_CONNECTED_GMAIL",
121492
+ outlook: "EMAIL_DELIVERY_CONNECTED_OUTLOOK",
121493
+ };
121494
+ class EmailDeliveryUtils {
121495
+ neetoPlaywrightUtilities;
121496
+ emailDeliveryApi;
121497
+ constructor(neetoPlaywrightUtilities) {
121498
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
121499
+ this.emailDeliveryApi = new NeetoEmailDeliveryApi(neetoPlaywrightUtilities);
121500
+ }
121501
+ connectViaRequest = async ({ provider }) => {
121502
+ const refreshTokenEnvKey = REFRESH_TOKEN_ENV_KEYS[provider];
121503
+ const refreshToken = process.env[refreshTokenEnvKey];
121504
+ if (ramda.isNil(refreshToken)) {
121505
+ throw new Error(`ENV variable ${refreshTokenEnvKey} is not properly configured`);
121506
+ }
121507
+ const response = await this.emailDeliveryApi.connect({
121508
+ emailProvider: provider,
121509
+ refreshToken,
121510
+ });
121511
+ test.expect(response?.ok()).toBeTruthy();
121512
+ return response;
121513
+ };
121514
+ verifyEmailViaRequest = async ({ subject, to, partialBody, from }, { provider, timeout = 30 * 1000, shouldThrowErrorOnTimeout = true, }) => {
121515
+ const fromEmail = from ?? process.env[FROM_EMAIL_ENV_KEYS[provider]];
121516
+ if (ramda.isNil(fromEmail)) {
121517
+ throw new Error(`ENV variable ${FROM_EMAIL_ENV_KEYS[provider]} is not properly configured`);
121518
+ }
121519
+ const verifyParams = {
121520
+ emailProvider: provider,
121521
+ subject,
121522
+ to,
121523
+ from: fromEmail,
121524
+ body: partialBody,
121525
+ };
121526
+ let lastResult = null;
121527
+ const fetchEmail = async () => {
121528
+ const response = await this.emailDeliveryApi.verifyEmail(verifyParams);
121529
+ if (!response?.ok()) {
121530
+ lastResult = null;
121531
+ return;
121532
+ }
121533
+ lastResult = (await response.json());
121534
+ };
121535
+ const email = (await this.neetoPlaywrightUtilities.executeRecursively({
121536
+ condition: async () => {
121537
+ await fetchEmail();
121538
+ return Boolean(lastResult?.exists);
121539
+ },
121540
+ callback: async () => lastResult?.exists ? (lastResult.email ?? null) : null,
121541
+ timeout,
121542
+ }));
121543
+ if (!email && shouldThrowErrorOnTimeout) {
121544
+ throw new Error(`Timed out waiting for ${provider} email matching subject "${subject}"`);
121545
+ }
121546
+ return email;
121547
+ };
121548
+ }
121549
+
121464
121550
  const USER_AGENTS = {
121465
121551
  windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
121466
121552
  mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
@@ -125808,7 +125894,6 @@ const playdashProductionHealthConfig = {
125808
125894
  ciBuildId: process.env.NEETO_CI_JOB_ID,
125809
125895
  tags: process.env.TAG,
125810
125896
  };
125811
- const isCI = neetoCist.isPresent(process.env.NEETO_CI_JOB_ID);
125812
125897
  const railsPort = process.env.RAILS_SERVER_PORT;
125813
125898
  const vitePort = process.env.VITE_PORT;
125814
125899
  const PROJECT_NAMES = {
@@ -125872,18 +125957,18 @@ const definePlaywrightConfig = (overrides) => {
125872
125957
  return test.defineConfig({
125873
125958
  testDir: "./e2e/tests",
125874
125959
  fullyParallel: true,
125875
- forbidOnly: isCI,
125876
- retries: isCI ? 1 : 0,
125960
+ forbidOnly: IS_CI,
125961
+ retries: IS_CI ? 1 : 0,
125877
125962
  timeout: 5 * 60 * 1000,
125878
- workers: isCI ? 6 : 5,
125879
- reporter: isCI ? reporter : [["line"]],
125963
+ workers: IS_CI ? 6 : 5,
125964
+ reporter: IS_CI ? reporter : [["line"]],
125880
125965
  ...(specPatterns && { testMatch: specPatterns }),
125881
125966
  ...(IS_DEV_ENV && {
125882
125967
  webServer: [
125883
125968
  {
125884
125969
  command: `bundle exec puma -b tcp://0.0.0.0:${railsPort} -C config/puma.rb`,
125885
125970
  url: `http://spinkart.lvh.me:${railsPort}`,
125886
- reuseExistingServer: !isCI,
125971
+ reuseExistingServer: !IS_CI,
125887
125972
  timeout: 5 * 60 * 1000,
125888
125973
  cwd: "..",
125889
125974
  env: { ...process.env, PORT: railsPort ?? "" },
@@ -125891,7 +125976,7 @@ const definePlaywrightConfig = (overrides) => {
125891
125976
  {
125892
125977
  command: "yarn dev --host",
125893
125978
  url: `http://127.0.0.1:${vitePort}/@vite/client`,
125894
- reuseExistingServer: !isCI,
125979
+ reuseExistingServer: !IS_CI,
125895
125980
  timeout: 2 * 60 * 1000,
125896
125981
  cwd: "..",
125897
125982
  },
@@ -126025,6 +126110,7 @@ exports.EXAMPLE_URL = EXAMPLE_URL;
126025
126110
  exports.EXPANDED_FONT_SIZE = EXPANDED_FONT_SIZE;
126026
126111
  exports.EXPORT_FILE_TYPES = EXPORT_FILE_TYPES;
126027
126112
  exports.EditorPage = EditorPage;
126113
+ exports.EmailDeliveryUtils = EmailDeliveryUtils;
126028
126114
  exports.EmbedBase = EmbedBase;
126029
126115
  exports.FILE_FORMATS = FILE_FORMATS;
126030
126116
  exports.FONT_SIZE_SELECTORS = FONT_SIZE_SELECTORS;
@@ -126042,6 +126128,7 @@ exports.INTEGRATIONS_TEXTS = INTEGRATIONS_TEXTS;
126042
126128
  exports.INTEGRATION_SELECTORS = INTEGRATION_SELECTORS;
126043
126129
  exports.IPRestrictionsPage = IPRestrictionsPage;
126044
126130
  exports.IP_RESTRICTIONS_SELECTORS = IP_RESTRICTIONS_SELECTORS;
126131
+ exports.IS_CI = IS_CI;
126045
126132
  exports.IS_DEV_ENV = IS_DEV_ENV;
126046
126133
  exports.IS_STAGING_ENV = IS_STAGING_ENV;
126047
126134
  exports.ImageUploader = ImageUploader;
@@ -126070,6 +126157,7 @@ exports.NEETO_ROUTES = NEETO_ROUTES;
126070
126157
  exports.NEETO_SEO_SELECTORS = NEETO_SEO_SELECTORS;
126071
126158
  exports.NEETO_TEXT_MODIFIER_SELECTORS = NEETO_TEXT_MODIFIER_SELECTORS;
126072
126159
  exports.NeetoAuthServer = NeetoAuthServer;
126160
+ exports.NeetoEmailDeliveryApi = NeetoEmailDeliveryApi;
126073
126161
  exports.NeetoTowerApi = NeetoTowerApi;
126074
126162
  exports.ONBOARDING_SELECTORS = ONBOARDING_SELECTORS;
126075
126163
  exports.ORGANIZATION_TEXTS = ORGANIZATION_TEXTS;