sf-browserforce 1.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/LICENSE +21 -0
- package/README.md +266 -0
- package/bin/run +9 -0
- package/bin/run.cmd +3 -0
- package/lib/browserforce-command.d.ts +27 -0
- package/lib/browserforce-command.js +162 -0
- package/lib/browserforce-command.js.map +1 -0
- package/lib/browserforce.d.ts +27 -0
- package/lib/browserforce.js +163 -0
- package/lib/browserforce.js.map +1 -0
- package/lib/commands/browserforce/apply.d.ts +10 -0
- package/lib/commands/browserforce/apply.js +83 -0
- package/lib/commands/browserforce/apply.js.map +1 -0
- package/lib/commands/browserforce/playwright.d.ts +9 -0
- package/lib/commands/browserforce/playwright.js +53 -0
- package/lib/commands/browserforce/playwright.js.map +1 -0
- package/lib/config-parser.d.ts +16 -0
- package/lib/config-parser.js +24 -0
- package/lib/config-parser.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/jsforce-utils.d.ts +5 -0
- package/lib/jsforce-utils.js +14 -0
- package/lib/jsforce-utils.js.map +1 -0
- package/lib/pages/login.d.ts +7 -0
- package/lib/pages/login.js +17 -0
- package/lib/pages/login.js.map +1 -0
- package/lib/plugin.d.ts +15 -0
- package/lib/plugin.js +28 -0
- package/lib/plugin.js.map +1 -0
- package/lib/plugins/activity-settings/index.d.ts +9 -0
- package/lib/plugins/activity-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/activity-settings/index.e2e-spec.js +36 -0
- package/lib/plugins/activity-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/activity-settings/index.js +102 -0
- package/lib/plugins/activity-settings/index.js.map +1 -0
- package/lib/plugins/auth-providers/index.d.ts +13 -0
- package/lib/plugins/auth-providers/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/auth-providers/index.e2e-spec.js +78 -0
- package/lib/plugins/auth-providers/index.e2e-spec.js.map +1 -0
- package/lib/plugins/auth-providers/index.js +135 -0
- package/lib/plugins/auth-providers/index.js.map +1 -0
- package/lib/plugins/company-information/index.d.ts +8 -0
- package/lib/plugins/company-information/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/company-information/index.e2e-spec.js +37 -0
- package/lib/plugins/company-information/index.e2e-spec.js.map +1 -0
- package/lib/plugins/company-information/index.js +114 -0
- package/lib/plugins/company-information/index.js.map +1 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.d.ts +14 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.js +203 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.test.js +39 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +1 -0
- package/lib/plugins/customer-portal/enabled/index.d.ts +6 -0
- package/lib/plugins/customer-portal/enabled/index.js +89 -0
- package/lib/plugins/customer-portal/enabled/index.js.map +1 -0
- package/lib/plugins/customer-portal/enabled/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/enabled/index.test.js +34 -0
- package/lib/plugins/customer-portal/enabled/index.test.js.map +1 -0
- package/lib/plugins/customer-portal/index.d.ts +15 -0
- package/lib/plugins/customer-portal/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/customer-portal/index.e2e-spec.js +188 -0
- package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -0
- package/lib/plugins/customer-portal/index.js +58 -0
- package/lib/plugins/customer-portal/index.js.map +1 -0
- package/lib/plugins/customer-portal/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/index.test.js +84 -0
- package/lib/plugins/customer-portal/index.test.js.map +1 -0
- package/lib/plugins/customer-portal/portals/index.d.ts +25 -0
- package/lib/plugins/customer-portal/portals/index.js +254 -0
- package/lib/plugins/customer-portal/portals/index.js.map +1 -0
- package/lib/plugins/customer-portal/portals/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/portals/index.test.js +140 -0
- package/lib/plugins/customer-portal/portals/index.test.js.map +1 -0
- package/lib/plugins/density-settings/index.d.ts +10 -0
- package/lib/plugins/density-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/density-settings/index.e2e-spec.js +39 -0
- package/lib/plugins/density-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/density-settings/index.js +101 -0
- package/lib/plugins/density-settings/index.js.map +1 -0
- package/lib/plugins/deprecated.d.ts +4 -0
- package/lib/plugins/deprecated.js +28 -0
- package/lib/plugins/deprecated.js.map +1 -0
- package/lib/plugins/email-deliverability/index.d.ts +9 -0
- package/lib/plugins/email-deliverability/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/email-deliverability/index.e2e-spec.js +55 -0
- package/lib/plugins/email-deliverability/index.e2e-spec.js.map +1 -0
- package/lib/plugins/email-deliverability/index.js +109 -0
- package/lib/plugins/email-deliverability/index.js.map +1 -0
- package/lib/plugins/high-velocity-sales-settings/index.d.ts +10 -0
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js +29 -0
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/high-velocity-sales-settings/index.js +105 -0
- package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -0
- package/lib/plugins/high-velocity-sales-settings/page.d.ts +8 -0
- package/lib/plugins/high-velocity-sales-settings/page.js +27 -0
- package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -0
- package/lib/plugins/history-tracking/index.d.ts +19 -0
- package/lib/plugins/history-tracking/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/history-tracking/index.e2e-spec.js +128 -0
- package/lib/plugins/history-tracking/index.e2e-spec.js.map +1 -0
- package/lib/plugins/history-tracking/index.js +272 -0
- package/lib/plugins/history-tracking/index.js.map +1 -0
- package/lib/plugins/home-page-layouts/index.d.ts +14 -0
- package/lib/plugins/home-page-layouts/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/home-page-layouts/index.e2e-spec.js +47 -0
- package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +1 -0
- package/lib/plugins/home-page-layouts/index.js +145 -0
- package/lib/plugins/home-page-layouts/index.js.map +1 -0
- package/lib/plugins/home-page-layouts/index.test.d.ts +1 -0
- package/lib/plugins/home-page-layouts/index.test.js +104 -0
- package/lib/plugins/home-page-layouts/index.test.js.map +1 -0
- package/lib/plugins/index.d.ts +28 -0
- package/lib/plugins/index.js +29 -0
- package/lib/plugins/index.js.map +1 -0
- package/lib/plugins/lightning-experience-settings/index.d.ts +17 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +48 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/lightning-experience-settings/index.js +149 -0
- package/lib/plugins/lightning-experience-settings/index.js.map +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.d.ts +8 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js +29 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.js +93 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +9 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.js +35 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -0
- package/lib/plugins/login-as-user/index.d.ts +9 -0
- package/lib/plugins/login-as-user/index.js +104 -0
- package/lib/plugins/login-as-user/index.js.map +1 -0
- package/lib/plugins/logout-login-as-user/index.d.ts +6 -0
- package/lib/plugins/logout-login-as-user/index.js +76 -0
- package/lib/plugins/logout-login-as-user/index.js.map +1 -0
- package/lib/plugins/omni-channel-settings/index.d.ts +9 -0
- package/lib/plugins/omni-channel-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/omni-channel-settings/index.e2e-spec.js +30 -0
- package/lib/plugins/omni-channel-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/omni-channel-settings/index.js +97 -0
- package/lib/plugins/omni-channel-settings/index.js.map +1 -0
- package/lib/plugins/opportunity-splits/index.d.ts +9 -0
- package/lib/plugins/opportunity-splits/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/opportunity-splits/index.e2e-spec.js +46 -0
- package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +1 -0
- package/lib/plugins/opportunity-splits/index.js +117 -0
- package/lib/plugins/opportunity-splits/index.js.map +1 -0
- package/lib/plugins/opportunity-splits/pages/layout-selection.d.ts +8 -0
- package/lib/plugins/opportunity-splits/pages/layout-selection.js +15 -0
- package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +1 -0
- package/lib/plugins/opportunity-splits/pages/overview.d.ts +11 -0
- package/lib/plugins/opportunity-splits/pages/overview.js +32 -0
- package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -0
- package/lib/plugins/opportunity-splits/pages/setup.d.ts +9 -0
- package/lib/plugins/opportunity-splits/pages/setup.js +17 -0
- package/lib/plugins/opportunity-splits/pages/setup.js.map +1 -0
- package/lib/plugins/permission-sets/index.d.ts +10 -0
- package/lib/plugins/permission-sets/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/permission-sets/index.e2e-spec.js +47 -0
- package/lib/plugins/permission-sets/index.e2e-spec.js.map +1 -0
- package/lib/plugins/permission-sets/index.js +22 -0
- package/lib/plugins/permission-sets/index.js.map +1 -0
- package/lib/plugins/permission-sets/service-presence-status/index.d.ts +10 -0
- package/lib/plugins/permission-sets/service-presence-status/index.js +124 -0
- package/lib/plugins/permission-sets/service-presence-status/index.js.map +1 -0
- package/lib/plugins/picklists/field-dependencies/index.d.ts +11 -0
- package/lib/plugins/picklists/field-dependencies/index.js +133 -0
- package/lib/plugins/picklists/field-dependencies/index.js.map +1 -0
- package/lib/plugins/picklists/field-dependencies/index.test.d.ts +1 -0
- package/lib/plugins/picklists/field-dependencies/index.test.js +64 -0
- package/lib/plugins/picklists/field-dependencies/index.test.js.map +1 -0
- package/lib/plugins/picklists/field-dependencies/pages.d.ts +15 -0
- package/lib/plugins/picklists/field-dependencies/pages.js +50 -0
- package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -0
- package/lib/plugins/picklists/index.d.ts +23 -0
- package/lib/plugins/picklists/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/picklists/index.e2e-spec.js +128 -0
- package/lib/plugins/picklists/index.e2e-spec.js.map +1 -0
- package/lib/plugins/picklists/index.js +229 -0
- package/lib/plugins/picklists/index.js.map +1 -0
- package/lib/plugins/picklists/pages.d.ts +45 -0
- package/lib/plugins/picklists/pages.js +185 -0
- package/lib/plugins/picklists/pages.js.map +1 -0
- package/lib/plugins/picklists/standard-value-set.d.ts +1 -0
- package/lib/plugins/picklists/standard-value-set.js +80 -0
- package/lib/plugins/picklists/standard-value-set.js.map +1 -0
- package/lib/plugins/record-types/index.d.ts +14 -0
- package/lib/plugins/record-types/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/record-types/index.e2e-spec.js +76 -0
- package/lib/plugins/record-types/index.e2e-spec.js.map +1 -0
- package/lib/plugins/record-types/index.js +133 -0
- package/lib/plugins/record-types/index.js.map +1 -0
- package/lib/plugins/record-types/pages.d.ts +14 -0
- package/lib/plugins/record-types/pages.js +50 -0
- package/lib/plugins/record-types/pages.js.map +1 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.d.ts +11 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js +30 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +1 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js +120 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.d.ts +8 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js +3 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +116 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/index.d.ts +11 -0
- package/lib/plugins/reports-and-dashboards/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/reports-and-dashboards/index.e2e-spec.js +3 -0
- package/lib/plugins/reports-and-dashboards/index.e2e-spec.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/index.js +29 -0
- package/lib/plugins/reports-and-dashboards/index.js.map +1 -0
- package/lib/plugins/salesforce-cpq-config/formConfig.d.ts +17 -0
- package/lib/plugins/salesforce-cpq-config/formConfig.js +649 -0
- package/lib/plugins/salesforce-cpq-config/formConfig.js.map +1 -0
- package/lib/plugins/salesforce-cpq-config/index.d.ts +7 -0
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js +37 -0
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js.map +1 -0
- package/lib/plugins/salesforce-cpq-config/index.js +261 -0
- package/lib/plugins/salesforce-cpq-config/index.js.map +1 -0
- package/lib/plugins/salesforce-to-salesforce/index.d.ts +9 -0
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js +34 -0
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -0
- package/lib/plugins/salesforce-to-salesforce/index.js +107 -0
- package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -0
- package/lib/plugins/scheduled-batches/index.d.ts +10 -0
- package/lib/plugins/scheduled-batches/index.js +145 -0
- package/lib/plugins/scheduled-batches/index.js.map +1 -0
- package/lib/plugins/scheduled-batches/page.d.ts +19 -0
- package/lib/plugins/scheduled-batches/page.js +39 -0
- package/lib/plugins/scheduled-batches/page.js.map +1 -0
- package/lib/plugins/security/authentication-configuration/index.d.ts +15 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js +129 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js.map +1 -0
- package/lib/plugins/security/authentication-configuration/index.js +200 -0
- package/lib/plugins/security/authentication-configuration/index.js.map +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.d.ts +23 -0
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js +59 -0
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js.map +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.js +233 -0
- package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.test.d.ts +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.test.js +61 -0
- package/lib/plugins/security/certificate-and-key-management/index.test.js.map +1 -0
- package/lib/plugins/security/index.d.ts +13 -0
- package/lib/plugins/security/index.js +41 -0
- package/lib/plugins/security/index.js.map +1 -0
- package/lib/plugins/service-channels/capacity/index.d.ts +18 -0
- package/lib/plugins/service-channels/capacity/index.js +194 -0
- package/lib/plugins/service-channels/capacity/index.js.map +1 -0
- package/lib/plugins/service-channels/index.d.ts +12 -0
- package/lib/plugins/service-channels/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/service-channels/index.e2e-spec.js +67 -0
- package/lib/plugins/service-channels/index.e2e-spec.js.map +1 -0
- package/lib/plugins/service-channels/index.js +37 -0
- package/lib/plugins/service-channels/index.js.map +1 -0
- package/lib/plugins/slack/index.d.ts +9 -0
- package/lib/plugins/slack/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/slack/index.e2e-spec.js +47 -0
- package/lib/plugins/slack/index.e2e-spec.js.map +1 -0
- package/lib/plugins/slack/index.js +111 -0
- package/lib/plugins/slack/index.js.map +1 -0
- package/lib/plugins/user-access-policies/index.d.ts +19 -0
- package/lib/plugins/user-access-policies/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/user-access-policies/index.e2e-spec.js +61 -0
- package/lib/plugins/user-access-policies/index.e2e-spec.js.map +1 -0
- package/lib/plugins/user-access-policies/index.js +176 -0
- package/lib/plugins/user-access-policies/index.js.map +1 -0
- package/lib/plugins/user-access-policies/page.d.ts +30 -0
- package/lib/plugins/user-access-policies/page.js +114 -0
- package/lib/plugins/user-access-policies/page.js.map +1 -0
- package/lib/plugins/utils.d.ts +13 -0
- package/lib/plugins/utils.js +159 -0
- package/lib/plugins/utils.js.map +1 -0
- package/oclif.manifest.json +177 -0
- package/package.json +65 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
53
|
+
import { BrowserforcePlugin } from '../../../plugin.js';
|
|
54
|
+
import { semanticallyCleanObject } from '../../utils.js';
|
|
55
|
+
const SAVE_BUTTON_SELECTOR = 'input[name="save"]';
|
|
56
|
+
const CUSTOM_OBJECT_AVAILABLE_FOR_CUSTOMER_PORTAL_SELECTOR = '#options_9';
|
|
57
|
+
export class CustomerPortalAvailableCustomObjects extends BrowserforcePlugin {
|
|
58
|
+
async retrieve(definition) {
|
|
59
|
+
const response = [];
|
|
60
|
+
if (definition) {
|
|
61
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
62
|
+
try {
|
|
63
|
+
const availableCustomObjectList = definition
|
|
64
|
+
.map((customObject) => {
|
|
65
|
+
return `'${customObject.name}'`;
|
|
66
|
+
})
|
|
67
|
+
.join(',');
|
|
68
|
+
const customObjects = await this.browserforce.connection.tooling.query(`SELECT Id, DeveloperName, NamespacePrefix FROM CustomObject WHERE DeveloperName IN (${availableCustomObjectList}) ORDER BY CreatedDate DESC`, { scanAll: false });
|
|
69
|
+
// Note: Unfortunately scanAll=false has no impact and returns deleted CustomObjects.
|
|
70
|
+
// Workaround: Order by CreatedDate DESC to get the latest CustomObject first.
|
|
71
|
+
for (const record of customObjects?.records) {
|
|
72
|
+
if (record.NamespacePrefix === null) {
|
|
73
|
+
record.NamespacePrefix = undefined;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage('/'), true);
|
|
77
|
+
// new URLs for LEX: https://help.salesforce.com/articleView?id=FAQ-for-the-New-URL-Format-for-Lightning-Experience-and-the-Salesforce-Mobile-App&type=1
|
|
78
|
+
const isLEX = page.url().includes('/one/one.app') || page.url().includes('/lightning/');
|
|
79
|
+
const getObjectPageUrl = function (customObject, isLexUi = true) {
|
|
80
|
+
const classicUiPath = `/${customObject._id}/e`;
|
|
81
|
+
if (isLexUi) {
|
|
82
|
+
return `/lightning/setup/ObjectManager/${customObject._id}/edit?nodeId=ObjectManager&address=${encodeURIComponent(classicUiPath)}`;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
return classicUiPath;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
for (const availableCustomObject of definition) {
|
|
89
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
90
|
+
try {
|
|
91
|
+
const customObject = customObjects.records.find((co) => {
|
|
92
|
+
return (co.DeveloperName === availableCustomObject.name &&
|
|
93
|
+
co.NamespacePrefix === availableCustomObject.namespacePrefix);
|
|
94
|
+
});
|
|
95
|
+
if (!customObject) {
|
|
96
|
+
throw new Error(`Could not find CustomObject: {DeveloperName: ${availableCustomObject.name}, NamespacePrefix: ${availableCustomObject.namespacePrefix}`);
|
|
97
|
+
}
|
|
98
|
+
const result = {
|
|
99
|
+
_id: customObject.Id,
|
|
100
|
+
name: customObject.DeveloperName,
|
|
101
|
+
namespacePrefix: customObject.NamespacePrefix,
|
|
102
|
+
};
|
|
103
|
+
const pageUrl = getObjectPageUrl(result, isLEX);
|
|
104
|
+
const editPage = __addDisposableResource(env_2, await this.browserforce.openPage(pageUrl), true);
|
|
105
|
+
const frameOrPage = await this.browserforce.waitForSelectorInFrameOrPage(editPage, CUSTOM_OBJECT_AVAILABLE_FOR_CUSTOMER_PORTAL_SELECTOR);
|
|
106
|
+
response.push({
|
|
107
|
+
...result,
|
|
108
|
+
available: await frameOrPage.locator(CUSTOM_OBJECT_AVAILABLE_FOR_CUSTOMER_PORTAL_SELECTOR).isChecked(),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
catch (e_1) {
|
|
112
|
+
env_2.error = e_1;
|
|
113
|
+
env_2.hasError = true;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
const result_1 = __disposeResources(env_2);
|
|
117
|
+
if (result_1)
|
|
118
|
+
await result_1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch (e_2) {
|
|
123
|
+
env_1.error = e_2;
|
|
124
|
+
env_1.hasError = true;
|
|
125
|
+
}
|
|
126
|
+
finally {
|
|
127
|
+
const result_2 = __disposeResources(env_1);
|
|
128
|
+
if (result_2)
|
|
129
|
+
await result_2;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return response;
|
|
133
|
+
}
|
|
134
|
+
diff(state, definition) {
|
|
135
|
+
const response = [];
|
|
136
|
+
if (state && definition) {
|
|
137
|
+
for (const availableCustomObject of definition) {
|
|
138
|
+
const oldCustomObject = state.find((customObject) => {
|
|
139
|
+
return (customObject.name === availableCustomObject.name &&
|
|
140
|
+
customObject.namespacePrefix === availableCustomObject.namespacePrefix);
|
|
141
|
+
});
|
|
142
|
+
if (!oldCustomObject) {
|
|
143
|
+
throw new Error(`Could not find CustomObject "${availableCustomObject.name}"`);
|
|
144
|
+
}
|
|
145
|
+
// copy id of existing object to new object to be retained and used
|
|
146
|
+
availableCustomObject._id = oldCustomObject._id;
|
|
147
|
+
const diff = semanticallyCleanObject(super.diff(oldCustomObject, availableCustomObject), '_id');
|
|
148
|
+
if (diff?.available !== undefined) {
|
|
149
|
+
response.push(diff);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return response.length ? response : undefined;
|
|
154
|
+
}
|
|
155
|
+
async apply(plan) {
|
|
156
|
+
if (plan && plan.length) {
|
|
157
|
+
const env_3 = { stack: [], error: void 0, hasError: false };
|
|
158
|
+
try {
|
|
159
|
+
const page = __addDisposableResource(env_3, await this.browserforce.openPage('/'), true);
|
|
160
|
+
// new URLs for LEX: https://help.salesforce.com/articleView?id=FAQ-for-the-New-URL-Format-for-Lightning-Experience-and-the-Salesforce-Mobile-App&type=1
|
|
161
|
+
const isLEX = page.url().includes('/one/one.app') || page.url().includes('/lightning/');
|
|
162
|
+
const getObjectPageUrl = function (customObject, isLexUi = true) {
|
|
163
|
+
const classicUiPath = `/${customObject._id}/e?options_9=${customObject.available ? 1 : 0}&retURL=/${customObject._id}`;
|
|
164
|
+
if (isLexUi) {
|
|
165
|
+
return `/lightning/setup/ObjectManager/${customObject._id}/edit?nodeId=ObjectManager&address=${encodeURIComponent(classicUiPath)}`;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
return classicUiPath;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
for (const customObject of plan) {
|
|
172
|
+
const env_4 = { stack: [], error: void 0, hasError: false };
|
|
173
|
+
try {
|
|
174
|
+
const pageUrl = getObjectPageUrl(customObject, isLEX);
|
|
175
|
+
const editPage = __addDisposableResource(env_4, await this.browserforce.openPage(pageUrl), true);
|
|
176
|
+
const frameOrPage = await this.browserforce.waitForSelectorInFrameOrPage(editPage, SAVE_BUTTON_SELECTOR);
|
|
177
|
+
await frameOrPage.locator(SAVE_BUTTON_SELECTOR).first().click();
|
|
178
|
+
await editPage.getByRole('heading', { name: 'Details' }).waitFor();
|
|
179
|
+
}
|
|
180
|
+
catch (e_3) {
|
|
181
|
+
env_4.error = e_3;
|
|
182
|
+
env_4.hasError = true;
|
|
183
|
+
}
|
|
184
|
+
finally {
|
|
185
|
+
const result_3 = __disposeResources(env_4);
|
|
186
|
+
if (result_3)
|
|
187
|
+
await result_3;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
catch (e_4) {
|
|
192
|
+
env_3.error = e_4;
|
|
193
|
+
env_3.hasError = true;
|
|
194
|
+
}
|
|
195
|
+
finally {
|
|
196
|
+
const result_4 = __disposeResources(env_3);
|
|
197
|
+
if (result_4)
|
|
198
|
+
await result_4;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/customer-portal/available-custom-objects/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAClD,MAAM,oDAAoD,GAAG,YAAY,CAAC;AAgB1E,MAAM,OAAO,oCAAqC,SAAQ,kBAAkB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AAO,GAAG,IAAI;oBAEd,MAAM,aAAa,GAAsB,IAAI,YAAY,CAAC,GAAG,gBAC3D,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC/B,YAAY,YAAY,CAAC,GAAG,EAAE,CAAC;oBAC/B,IAAI,OAAO,EAAE,CAAC;wBACZ,OAAO,kCACL,YAAY,CAAC,GACf,sCAAsC,kBAAkB,CAAC,aAAa,CAAC,EAAE,CAAC;oBAC5E,CAAC;yBAAM,CAAC;wBACN,OAAO,aAAa,CAAC;oBACvB,CAAC;gBACH,CAAC,CAAC;gBAEF,KAAK,MAAM,YAAY,IAAI,IAAI,EAAE,CAAC;;;wBAChC,MAAM,OAAO,GAAG,gBAAgB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;wBACtD,MAAY,QAAQ,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAA,CAAC;wBACjE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;wBACzG,MAAM,WAAW,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC;wBAChE,MAAM,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;;;;;;;;;;;iBACpE;;;;;;;;;;;SACF;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import { CustomerPortalAvailableCustomObjects } from './index.js';
|
|
3
|
+
const tests = [
|
|
4
|
+
{
|
|
5
|
+
description: 'should only return necessary fields',
|
|
6
|
+
source: [
|
|
7
|
+
{
|
|
8
|
+
_id: 'p1',
|
|
9
|
+
name: 'Dummy',
|
|
10
|
+
available: false,
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
target: [
|
|
14
|
+
{
|
|
15
|
+
name: 'Dummy',
|
|
16
|
+
available: true,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
expected: [
|
|
20
|
+
{
|
|
21
|
+
_id: 'p1',
|
|
22
|
+
name: 'Dummy',
|
|
23
|
+
available: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
describe('CustomerPortalAvailableCustomObjects', () => {
|
|
29
|
+
describe('diff()', () => {
|
|
30
|
+
const p = new CustomerPortalAvailableCustomObjects(global.browserforce);
|
|
31
|
+
for (const t of tests) {
|
|
32
|
+
it(t.description, () => {
|
|
33
|
+
const actual = p.diff(t.source, t.target);
|
|
34
|
+
assert.deepStrictEqual(actual, t.expected);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/plugins/customer-portal/available-custom-objects/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAe,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAQ/E,MAAM,KAAK,GAAQ;IACjB;QACE,WAAW,EAAE,qCAAqC;QAClD,MAAM,EAAE;YACN;gBACE,GAAG,EAAE,IAAI;gBACT,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,KAAK;aACjB;SACF;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,IAAI;aAChB;SACF;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,IAAI;gBACT,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,IAAI;aAChB;SACQ;KACZ;CACF,CAAC;AAEF,QAAQ,CAAC,sCAAsC,EAAE,GAAG,EAAE;IACpD,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,MAAM,CAAC,GAAG,IAAI,oCAAoC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACxE,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE;gBACrB,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;gBAC1C,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
53
|
+
import { waitForPageErrors } from '../../../browserforce.js';
|
|
54
|
+
import { BrowserforcePlugin } from '../../../plugin.js';
|
|
55
|
+
const BASE_PATH = '/_ui/core/portal/CustomerSuccessPortalSetup/e';
|
|
56
|
+
const SAVE_BUTTON = 'input[name="save"]';
|
|
57
|
+
const ENABLE_CHECKBOX = 'input[type="checkbox"][id="penabled"]';
|
|
58
|
+
export class CustomerPortalEnable extends BrowserforcePlugin {
|
|
59
|
+
async retrieve() {
|
|
60
|
+
const orgSettings = await this.browserforce.connection.metadata.read('OrgSettings', 'Org');
|
|
61
|
+
return orgSettings.enableCustomerSuccessPortal ?? false;
|
|
62
|
+
}
|
|
63
|
+
async apply(plan) {
|
|
64
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
65
|
+
try {
|
|
66
|
+
if (plan === false) {
|
|
67
|
+
throw new Error('`enabled` cannot be disabled once enabled');
|
|
68
|
+
}
|
|
69
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
70
|
+
await page.locator(ENABLE_CHECKBOX).setChecked(true);
|
|
71
|
+
await page.locator(SAVE_BUTTON).first().click();
|
|
72
|
+
await Promise.race([
|
|
73
|
+
page.waitForURL((url) => url.pathname === '/ui/setup/portal/RoleConversionWizardSplashPage' ||
|
|
74
|
+
url.pathname === '/_ui/core/portal/RoleInternalConvertWizard'),
|
|
75
|
+
waitForPageErrors(page),
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
catch (e_1) {
|
|
79
|
+
env_1.error = e_1;
|
|
80
|
+
env_1.hasError = true;
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
const result_1 = __disposeResources(env_1);
|
|
84
|
+
if (result_1)
|
|
85
|
+
await result_1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/customer-portal/enabled/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,SAAS,GAAG,+CAA+C,CAAC;AAElE,MAAM,WAAW,GAAG,oBAAoB,CAAC;AACzC,MAAM,eAAe,GAAG,uCAAuC,CAAC;AAIhE,MAAM,OAAO,oBAAqB,SAAQ,kBAAkB;IACnD,KAAK,CAAC,QAAQ;QACnB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAC3F,OAAO,WAAW,CAAC,2BAA2B,IAAI,KAAK,CAAC;IAC1D,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,IAAY;;;YAC7B,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;YAC/D,CAAC;YACD,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACrD,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC;YAChD,MAAM,OAAO,CAAC,IAAI,CAAC;gBACjB,IAAI,CAAC,UAAU,CACb,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,QAAQ,KAAK,iDAAiD;oBAClE,GAAG,CAAC,QAAQ,KAAK,4CAA4C,CAChE;gBACD,iBAAiB,CAAC,IAAI,CAAC;aACxB,CAAC,CAAC;;;;;;;;;;;KACJ;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import { CustomerPortalEnable as CustomerPortalEnabled } from './index.js';
|
|
3
|
+
const tests = [
|
|
4
|
+
{
|
|
5
|
+
description: 'should ignore a non-existent target flag',
|
|
6
|
+
source: true,
|
|
7
|
+
target: undefined,
|
|
8
|
+
expected: undefined,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
description: 'should ignore a matching target flag',
|
|
12
|
+
source: true,
|
|
13
|
+
target: true,
|
|
14
|
+
expected: undefined,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
description: 'should detect a changed flag',
|
|
18
|
+
source: false,
|
|
19
|
+
target: true,
|
|
20
|
+
expected: true,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
describe('CustomerPortalEnabled', () => {
|
|
24
|
+
describe('diff()', () => {
|
|
25
|
+
const p = new CustomerPortalEnabled(global.browserforce);
|
|
26
|
+
for (const t of tests) {
|
|
27
|
+
it(t.description, () => {
|
|
28
|
+
const actual = p.diff(t.source, t.target);
|
|
29
|
+
assert.deepStrictEqual(actual, t.expected);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/plugins/customer-portal/enabled/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAS3E,MAAM,KAAK,GAAQ;IACjB;QACE,WAAW,EAAE,0CAA0C;QACvD,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,SAAS;KACpB;IACD;QACE,WAAW,EAAE,sCAAsC;QACnD,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,SAAS;KACpB;IACD;QACE,WAAW,EAAE,8BAA8B;QAC3C,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,MAAM,CAAC,GAAG,IAAI,qBAAqB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACzD,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE;gBACrB,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;gBAC1C,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
|
+
import { Config as CustomerPortalAvailableCustomObjectsConfig } from './available-custom-objects/index.js';
|
|
3
|
+
import { Config as CustomerPortalEnableConfig } from './enabled/index.js';
|
|
4
|
+
import { Config as CustomerPortalSetupConfig } from './portals/index.js';
|
|
5
|
+
type Config = {
|
|
6
|
+
enabled?: CustomerPortalEnableConfig;
|
|
7
|
+
portals?: CustomerPortalSetupConfig;
|
|
8
|
+
availableCustomObjects?: CustomerPortalAvailableCustomObjectsConfig;
|
|
9
|
+
};
|
|
10
|
+
export declare class CustomerPortal extends BrowserforcePlugin {
|
|
11
|
+
retrieve(definition: Config): Promise<Config>;
|
|
12
|
+
diff(state: Config, definition: Config): Config | undefined;
|
|
13
|
+
apply(config: Config): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import * as child from 'child_process';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import * as path from 'path';
|
|
5
|
+
import { CustomerPortalAvailableCustomObjects } from './available-custom-objects/index.js';
|
|
6
|
+
import { CustomerPortalEnable } from './enabled/index.js';
|
|
7
|
+
import { CustomerPortalSetup } from './portals/index.js';
|
|
8
|
+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
9
|
+
describe('CustomerPortal', () => {
|
|
10
|
+
describe(CustomerPortalEnable.name, function () {
|
|
11
|
+
let plugin;
|
|
12
|
+
before(() => {
|
|
13
|
+
plugin = new CustomerPortalEnable(global.browserforce);
|
|
14
|
+
});
|
|
15
|
+
it('should enable', async () => {
|
|
16
|
+
await plugin.run(true);
|
|
17
|
+
});
|
|
18
|
+
it('should be enabled', async () => {
|
|
19
|
+
const res = await plugin.retrieve();
|
|
20
|
+
assert.deepStrictEqual(res, true);
|
|
21
|
+
});
|
|
22
|
+
it('should fail to disable', async () => {
|
|
23
|
+
let err;
|
|
24
|
+
try {
|
|
25
|
+
await plugin.run(false);
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
err = e;
|
|
29
|
+
}
|
|
30
|
+
assert.throws(() => {
|
|
31
|
+
throw err;
|
|
32
|
+
}, /cannot be disabled/);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
describe(CustomerPortalSetup.name, function () {
|
|
36
|
+
let plugin;
|
|
37
|
+
before(() => {
|
|
38
|
+
plugin = new CustomerPortalSetup(global.browserforce);
|
|
39
|
+
});
|
|
40
|
+
const configSetPortalAdmin = [
|
|
41
|
+
{
|
|
42
|
+
name: 'Customer Portal',
|
|
43
|
+
adminUser: 'User User',
|
|
44
|
+
isSelfRegistrationActivated: true,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
const configSetupPortal = [
|
|
48
|
+
{
|
|
49
|
+
name: 'Foo Portal',
|
|
50
|
+
oldName: 'Customer Portal',
|
|
51
|
+
description: 'Foo Portal',
|
|
52
|
+
adminUser: 'User User',
|
|
53
|
+
isSelfRegistrationActivated: true,
|
|
54
|
+
selfRegUserDefaultLicense: 'Customer Portal Manager Custom',
|
|
55
|
+
selfRegUserDefaultRole: 'User',
|
|
56
|
+
selfRegUserDefaultProfile: 'Customer Portal Manager Custom',
|
|
57
|
+
portalProfileMemberships: [
|
|
58
|
+
{
|
|
59
|
+
name: 'Customer Portal Manager Standard',
|
|
60
|
+
active: false,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Dummy',
|
|
64
|
+
active: true,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
const configRevertPortal = [
|
|
70
|
+
{
|
|
71
|
+
name: 'Customer Portal',
|
|
72
|
+
oldName: 'Foo Portal',
|
|
73
|
+
description: 'Customer Portal',
|
|
74
|
+
isSelfRegistrationActivated: false,
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
const dir = path.resolve(path.join(__dirname, 'portals'));
|
|
78
|
+
it('should fail to set portal admin user without permset', async () => {
|
|
79
|
+
let err;
|
|
80
|
+
try {
|
|
81
|
+
await plugin.run(configSetPortalAdmin);
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
err = e;
|
|
85
|
+
}
|
|
86
|
+
assert.throws(() => {
|
|
87
|
+
throw err;
|
|
88
|
+
}, /This user has insufficient permissions to be a portal administrator/);
|
|
89
|
+
});
|
|
90
|
+
it('should set up user for portal', async () => {
|
|
91
|
+
const sourceDeployCmd = child.spawnSync('sf', [
|
|
92
|
+
'project',
|
|
93
|
+
'deploy',
|
|
94
|
+
'start',
|
|
95
|
+
'-d',
|
|
96
|
+
path.join(dir, 'sfdx-source'),
|
|
97
|
+
'--json',
|
|
98
|
+
]);
|
|
99
|
+
assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
|
|
100
|
+
const permSetAssignCmd = child.spawnSync('sf', ['org', 'assign', 'permset', '-n', 'Customer_Portal_Admin']);
|
|
101
|
+
assert.deepStrictEqual(permSetAssignCmd.status, 0, permSetAssignCmd.output.toString());
|
|
102
|
+
});
|
|
103
|
+
it('should set up portal', async () => {
|
|
104
|
+
await plugin.run(configSetupPortal);
|
|
105
|
+
});
|
|
106
|
+
it('portal should be set up', async () => {
|
|
107
|
+
const res = await plugin.run(configSetupPortal);
|
|
108
|
+
assert.deepStrictEqual(res, { message: 'no action necessary' });
|
|
109
|
+
});
|
|
110
|
+
it('should revert back', async () => {
|
|
111
|
+
await plugin.run(configRevertPortal);
|
|
112
|
+
});
|
|
113
|
+
it('should be reverted back', async () => {
|
|
114
|
+
const res = await plugin.run(configRevertPortal);
|
|
115
|
+
assert.deepStrictEqual(res, { message: 'no action necessary' });
|
|
116
|
+
});
|
|
117
|
+
it('should cleanup', async () => {
|
|
118
|
+
await global.browserforce.connection.metadata.delete('Profile', ['Dummy']);
|
|
119
|
+
const result = await global.browserforce.connection.query("SELECT Id FROM PermissionSetAssignment WHERE PermissionSet.Name='Customer_Portal_Admin'");
|
|
120
|
+
if (result.records.length) {
|
|
121
|
+
await global.browserforce.connection.delete('PermissionSetAssignment', result.records.map((rec) => rec.Id));
|
|
122
|
+
}
|
|
123
|
+
await global.browserforce.connection.metadata.delete('PermissionSet', ['Customer_Portal_Admin']);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
describe(CustomerPortalAvailableCustomObjects.name, function () {
|
|
127
|
+
let plugin;
|
|
128
|
+
before(() => {
|
|
129
|
+
plugin = new CustomerPortalAvailableCustomObjects(global.browserforce);
|
|
130
|
+
});
|
|
131
|
+
const configAvailableCustomObjects = [
|
|
132
|
+
{
|
|
133
|
+
name: 'Dummy',
|
|
134
|
+
available: true,
|
|
135
|
+
},
|
|
136
|
+
];
|
|
137
|
+
const configNonAvailableCustomObjects = [
|
|
138
|
+
{
|
|
139
|
+
name: 'DummyXYZ',
|
|
140
|
+
available: true,
|
|
141
|
+
},
|
|
142
|
+
];
|
|
143
|
+
const configUnavailableCustomObjects = [
|
|
144
|
+
{
|
|
145
|
+
name: 'Dummy',
|
|
146
|
+
available: false,
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
const dir = path.resolve(path.join(__dirname, 'available-custom-objects'));
|
|
150
|
+
it('should fail to make non-existent custom objects available for customer portal', async () => {
|
|
151
|
+
let err;
|
|
152
|
+
try {
|
|
153
|
+
await plugin.run(configNonAvailableCustomObjects);
|
|
154
|
+
}
|
|
155
|
+
catch (e) {
|
|
156
|
+
err = e;
|
|
157
|
+
}
|
|
158
|
+
assert.throws(() => {
|
|
159
|
+
throw err;
|
|
160
|
+
}, /Could not find CustomObject/);
|
|
161
|
+
});
|
|
162
|
+
it('should deploy custom object', () => {
|
|
163
|
+
const sourceDeployCmd = child.spawnSync('sf', [
|
|
164
|
+
'project',
|
|
165
|
+
'deploy',
|
|
166
|
+
'start',
|
|
167
|
+
'-d',
|
|
168
|
+
path.join(dir, 'sfdx-source'),
|
|
169
|
+
'--json',
|
|
170
|
+
]);
|
|
171
|
+
assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
|
|
172
|
+
});
|
|
173
|
+
it('should make custom objects available for customer portal', async () => {
|
|
174
|
+
await plugin.run(configAvailableCustomObjects);
|
|
175
|
+
});
|
|
176
|
+
it('should have applied checkbox available for customer portal', async () => {
|
|
177
|
+
const res = await plugin.run(configAvailableCustomObjects);
|
|
178
|
+
assert.deepStrictEqual(res, { message: 'no action necessary' });
|
|
179
|
+
});
|
|
180
|
+
it('should make custom objects unavailable for customer portal', async () => {
|
|
181
|
+
await plugin.run(configUnavailableCustomObjects);
|
|
182
|
+
});
|
|
183
|
+
it('should remove the CustomObject', async () => {
|
|
184
|
+
await global.browserforce.connection.metadata.delete('CustomObject', ['Dummy__c']);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
//# sourceMappingURL=index.e2e-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/customer-portal/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,eAAe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