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,104 @@
|
|
|
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
|
+
function isUserId(value) {
|
|
56
|
+
return /^005[a-zA-Z0-9]{12,15}$/.test(value);
|
|
57
|
+
}
|
|
58
|
+
export class LoginAsUser extends BrowserforcePlugin {
|
|
59
|
+
async resolveUserId(userAliasOrName) {
|
|
60
|
+
if (isUserId(userAliasOrName)) {
|
|
61
|
+
return userAliasOrName;
|
|
62
|
+
}
|
|
63
|
+
const escaped = userAliasOrName.replace(/'/g, "''");
|
|
64
|
+
const query = `SELECT Id FROM User WHERE Username = '${escaped}' OR Alias = '${escaped}' LIMIT 1`;
|
|
65
|
+
const result = await this.browserforce.connection.query(query);
|
|
66
|
+
if (!result.records || result.records.length === 0) {
|
|
67
|
+
throw new Error(`User not found with alias or username: ${userAliasOrName}`);
|
|
68
|
+
}
|
|
69
|
+
return result.records[0].Id;
|
|
70
|
+
}
|
|
71
|
+
async retrieve() {
|
|
72
|
+
return { userAliasOrName: '' };
|
|
73
|
+
}
|
|
74
|
+
async apply(config) {
|
|
75
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
76
|
+
try {
|
|
77
|
+
if (!config?.userAliasOrName) {
|
|
78
|
+
throw new Error('userAliasOrName is required');
|
|
79
|
+
}
|
|
80
|
+
const orgId = this.browserforce.connection.getAuthInfoFields().orgId;
|
|
81
|
+
const userId = await this.resolveUserId(config.userAliasOrName);
|
|
82
|
+
const urlPath = `/servlet/servlet.su?oid=${orgId}&suorgadminid=${userId}&retURL=${encodeURIComponent(`/005?isUserEntityOverride=1&retURL=/home/home.jsp`)}&targetURL=${encodeURIComponent(`/home/home.jsp`)}`;
|
|
83
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(urlPath), true);
|
|
84
|
+
await Promise.race([
|
|
85
|
+
page.waitForURL((url) => !url.pathname.startsWith(`/servlet`)),
|
|
86
|
+
page
|
|
87
|
+
.locator('span', { hasText: /^Logged in as/ })
|
|
88
|
+
.first()
|
|
89
|
+
.waitFor({ state: 'attached' }),
|
|
90
|
+
waitForPageErrors(page),
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
catch (e_1) {
|
|
94
|
+
env_1.error = e_1;
|
|
95
|
+
env_1.hasError = true;
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
const result_1 = __disposeResources(env_1);
|
|
99
|
+
if (result_1)
|
|
100
|
+
await result_1;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/login-as-user/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAA0B,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAMrD,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC;AAMD,MAAM,OAAO,WAAY,SAAQ,kBAAkB;IACzC,KAAK,CAAC,aAAa,CAAC,eAAuB;QACjD,IAAI,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;YAC9B,OAAO,eAAe,CAAC;QACzB,CAAC;QAED,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACpD,MAAM,KAAK,GAAG,yCAAyC,OAAO,iBAAiB,OAAO,WAAW,CAAC;QAClG,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAa,KAAK,CAAC,CAAC;QAE3E,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnD,MAAM,IAAI,KAAK,CAAC,0CAA0C,eAAe,EAAE,CAAC,CAAC;QAC/E,CAAC;QAED,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;;;YAC/B,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;YACjD,CAAC;YAED,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,KAAK,CAAC;YACrE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YAEhE,MAAM,OAAO,GAAsB,2BAA2B,KAAK,iBAAiB,MAAM,WAAW,kBAAkB,CAAC,mDAAmD,CAAC,cAAc,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACjO,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAA,CAAC;YAC7D,MAAM,OAAO,CAAC,IAAI,CAAC;gBACjB,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;gBAC9D,IAAI;qBACD,OAAO,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;qBAC7C,KAAK,EAAE;qBACP,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;gBACjC,iBAAiB,CAAC,IAAI,CAAC;aACxB,CAAC,CAAC;;;;;;;;;;;KACJ;CACF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
const LOGOUT_URL = `/secur/logout.jsp`;
|
|
55
|
+
export class LogoutLoginAsUser extends BrowserforcePlugin {
|
|
56
|
+
async retrieve() {
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
async apply() {
|
|
60
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
61
|
+
try {
|
|
62
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(LOGOUT_URL), true);
|
|
63
|
+
await page.waitForLoadState('load');
|
|
64
|
+
}
|
|
65
|
+
catch (e_1) {
|
|
66
|
+
env_1.error = e_1;
|
|
67
|
+
env_1.hasError = true;
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
const result_1 = __disposeResources(env_1);
|
|
71
|
+
if (result_1)
|
|
72
|
+
await result_1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/logout-login-as-user/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,UAAU,GAAsB,mBAAwC,CAAC;AAI/E,MAAM,OAAO,iBAAkB,SAAQ,kBAAkB;IAChD,KAAK,CAAC,QAAQ;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,KAAK,CAAC,KAAK;;;YAChB,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAA+B,CAAC,OAAA,CAAC;YACrF,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;;;;;;;;;;;KACrC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
|
+
type Config = {
|
|
3
|
+
enableStatusBasedCapacityModel?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class OmniChannelSettings extends BrowserforcePlugin {
|
|
6
|
+
retrieve(definition?: Config): Promise<Config>;
|
|
7
|
+
apply(config: Config): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import { OmniChannelSettings } from './index.js';
|
|
3
|
+
describe(OmniChannelSettings.name, function () {
|
|
4
|
+
this.timeout('10m');
|
|
5
|
+
let plugin;
|
|
6
|
+
before(() => {
|
|
7
|
+
plugin = new OmniChannelSettings(global.browserforce);
|
|
8
|
+
});
|
|
9
|
+
const configEnableStatusBasedCapacityModel = {
|
|
10
|
+
enableStatusBasedCapacityModel: true,
|
|
11
|
+
};
|
|
12
|
+
const configDisableStatusBasedCapacityModel = {
|
|
13
|
+
enableStatusBasedCapacityModel: false,
|
|
14
|
+
};
|
|
15
|
+
it('should enable status based capacity model', async () => {
|
|
16
|
+
await plugin.run(configEnableStatusBasedCapacityModel);
|
|
17
|
+
});
|
|
18
|
+
it('should verify status based capacity model is enabled', async () => {
|
|
19
|
+
const res = await plugin.retrieve();
|
|
20
|
+
assert.deepStrictEqual(res, configEnableStatusBasedCapacityModel);
|
|
21
|
+
});
|
|
22
|
+
it('should disable status based capacity model', async () => {
|
|
23
|
+
await plugin.run(configDisableStatusBasedCapacityModel);
|
|
24
|
+
});
|
|
25
|
+
it('should verify status based capacity model is disabled', async () => {
|
|
26
|
+
const res = await plugin.retrieve();
|
|
27
|
+
assert.deepStrictEqual(res, configDisableStatusBasedCapacityModel);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=index.e2e-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/omni-channel-settings/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,QAAQ,CAAC,mBAAmB,CAAC,IAAI,EAAE;IACjC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,IAAI,MAA2B,CAAC;IAChC,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,MAAM,oCAAoC,GAAG;QAC3C,8BAA8B,EAAE,IAAI;KACrC,CAAC;IACF,MAAM,qCAAqC,GAAG;QAC5C,8BAA8B,EAAE,KAAK;KACtC,CAAC;IAEF,EAAE,CAAC,2CAA2C,EAAE,KAAK,IAAI,EAAE;QACzD,MAAM,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;QACpE,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,oCAAoC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;QACrE,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,qCAAqC,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
const BASE_PATH = '/omnichannel/settings.apexp';
|
|
55
|
+
const SAVE_BUTTON_SELECTOR = 'input[id$=":save"]';
|
|
56
|
+
const STATUS_CAPACITY_TOGGLE_SELECTOR = 'input[id$=":toggleOmniStatusCapModelPref"]';
|
|
57
|
+
export class OmniChannelSettings extends BrowserforcePlugin {
|
|
58
|
+
async retrieve(definition) {
|
|
59
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
60
|
+
try {
|
|
61
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
62
|
+
const enableStatusBasedCapacityModel = await page.locator(STATUS_CAPACITY_TOGGLE_SELECTOR).isChecked();
|
|
63
|
+
return { enableStatusBasedCapacityModel };
|
|
64
|
+
}
|
|
65
|
+
catch (e_1) {
|
|
66
|
+
env_1.error = e_1;
|
|
67
|
+
env_1.hasError = true;
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
const result_1 = __disposeResources(env_1);
|
|
71
|
+
if (result_1)
|
|
72
|
+
await result_1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async apply(config) {
|
|
76
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
77
|
+
try {
|
|
78
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
|
|
79
|
+
await page.locator(STATUS_CAPACITY_TOGGLE_SELECTOR).click();
|
|
80
|
+
await page.locator(SAVE_BUTTON_SELECTOR).click();
|
|
81
|
+
// omnichannel/settings.apexp
|
|
82
|
+
// ->
|
|
83
|
+
// omnichannel/settings.apexp?setupid=OmniChannelSettings
|
|
84
|
+
await page.waitForURL((url) => url.searchParams.has('setupid', 'OmniChannelSettings'));
|
|
85
|
+
}
|
|
86
|
+
catch (e_2) {
|
|
87
|
+
env_2.error = e_2;
|
|
88
|
+
env_2.hasError = true;
|
|
89
|
+
}
|
|
90
|
+
finally {
|
|
91
|
+
const result_2 = __disposeResources(env_2);
|
|
92
|
+
if (result_2)
|
|
93
|
+
await result_2;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/omni-channel-settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,6BAA6B,CAAC;AAEhD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAClD,MAAM,+BAA+B,GAAG,4CAA4C,CAAC;AAMrF,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IAClD,KAAK,CAAC,QAAQ,CAAC,UAAmB;;;YACvC,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM,8BAA8B,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC,SAAS,EAAE,CAAC;YACvG,OAAO,EAAE,8BAA8B,EAAE,CAAC;;;;;;;;;;;KAC3C;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;;;YAC/B,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC,KAAK,EAAE,CAAC;YAC5D,MAAM,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,CAAC;YACjD,6BAA6B;YAC7B,KAAK;YACL,yDAAyD;YACzD,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC;;;;;;;;;;;KACxF;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
|
+
type Config = {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class OpportunitySplits extends BrowserforcePlugin {
|
|
6
|
+
retrieve(definition?: Config): Promise<Config>;
|
|
7
|
+
apply(config: Config): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { OpportunitySplits } from './index.js';
|
|
6
|
+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
7
|
+
describe(OpportunitySplits.name, function () {
|
|
8
|
+
this.timeout('15m');
|
|
9
|
+
this.slow('1m');
|
|
10
|
+
let plugin;
|
|
11
|
+
before(() => {
|
|
12
|
+
plugin = new OpportunitySplits(global.browserforce);
|
|
13
|
+
});
|
|
14
|
+
const configEnabled = {
|
|
15
|
+
enabled: true,
|
|
16
|
+
};
|
|
17
|
+
const configDisabled = {
|
|
18
|
+
enabled: false,
|
|
19
|
+
};
|
|
20
|
+
it('should enable Opportunity Teams as prerequisite', () => {
|
|
21
|
+
const sourceDeployCmd = child.spawnSync('sf', [
|
|
22
|
+
'project',
|
|
23
|
+
'deploy',
|
|
24
|
+
'start',
|
|
25
|
+
'-d',
|
|
26
|
+
path.join(__dirname, 'sfdx-source'),
|
|
27
|
+
'--json',
|
|
28
|
+
]);
|
|
29
|
+
assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
|
|
30
|
+
});
|
|
31
|
+
it('should enable', async () => {
|
|
32
|
+
await plugin.run(configEnabled);
|
|
33
|
+
});
|
|
34
|
+
it('should be enabled', async () => {
|
|
35
|
+
const state = await plugin.retrieve();
|
|
36
|
+
assert.deepStrictEqual(state, configEnabled);
|
|
37
|
+
});
|
|
38
|
+
it('should disable', async () => {
|
|
39
|
+
await plugin.apply(configDisabled);
|
|
40
|
+
});
|
|
41
|
+
it('should be disabled', async () => {
|
|
42
|
+
const state = await plugin.retrieve();
|
|
43
|
+
assert.deepStrictEqual(state, configDisabled);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=index.e2e-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/opportunity-splits/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,QAAQ,CAAC,iBAAiB,CAAC,IAAI,EAAE;IAC/B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,IAAI,MAAyB,CAAC;IAC9B,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG;QACpB,OAAO,EAAE,IAAI;KACd,CAAC;IACF,MAAM,cAAc,GAAG;QACrB,OAAO,EAAE,KAAK;KACf,CAAC;IACF,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,eAAe,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE;YAC5C,SAAS;YACT,QAAQ;YACR,OAAO;YACP,IAAI;YACJ,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC;YACnC,QAAQ;SACT,CAAC,CAAC;QACH,MAAM,CAAC,eAAe,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;QAC7B,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,mBAAmB,EAAE,KAAK,IAAI,EAAE;QACjC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;QACtC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;QACtC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
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 { OverviewPage } from './pages/overview.js';
|
|
55
|
+
import { SetupPage } from './pages/setup.js';
|
|
56
|
+
export class OpportunitySplits extends BrowserforcePlugin {
|
|
57
|
+
async retrieve(definition) {
|
|
58
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
59
|
+
try {
|
|
60
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(OverviewPage.PATH), true);
|
|
61
|
+
const overviewPage = new OverviewPage(page);
|
|
62
|
+
const response = {
|
|
63
|
+
enabled: await overviewPage.isEnabled(),
|
|
64
|
+
};
|
|
65
|
+
return response;
|
|
66
|
+
}
|
|
67
|
+
catch (e_1) {
|
|
68
|
+
env_1.error = e_1;
|
|
69
|
+
env_1.hasError = true;
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
const result_1 = __disposeResources(env_1);
|
|
73
|
+
if (result_1)
|
|
74
|
+
await result_1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async apply(config) {
|
|
78
|
+
if (config.enabled) {
|
|
79
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
80
|
+
try {
|
|
81
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(SetupPage.PATH), true);
|
|
82
|
+
const setupPage = new SetupPage(page);
|
|
83
|
+
const layoutSelectionPage = await setupPage.enable();
|
|
84
|
+
const overviewPage = await layoutSelectionPage.choose();
|
|
85
|
+
await overviewPage.waitUntilCompleted();
|
|
86
|
+
}
|
|
87
|
+
catch (e_2) {
|
|
88
|
+
env_2.error = e_2;
|
|
89
|
+
env_2.hasError = true;
|
|
90
|
+
}
|
|
91
|
+
finally {
|
|
92
|
+
const result_2 = __disposeResources(env_2);
|
|
93
|
+
if (result_2)
|
|
94
|
+
await result_2;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
const env_3 = { stack: [], error: void 0, hasError: false };
|
|
99
|
+
try {
|
|
100
|
+
const page = __addDisposableResource(env_3, await this.browserforce.openPage(OverviewPage.PATH), true);
|
|
101
|
+
const overviewPage = new OverviewPage(page);
|
|
102
|
+
await overviewPage.disable();
|
|
103
|
+
await overviewPage.waitUntilCompleted();
|
|
104
|
+
}
|
|
105
|
+
catch (e_3) {
|
|
106
|
+
env_3.error = e_3;
|
|
107
|
+
env_3.hasError = true;
|
|
108
|
+
}
|
|
109
|
+
finally {
|
|
110
|
+
const result_3 = __disposeResources(env_3);
|
|
111
|
+
if (result_3)
|
|
112
|
+
await result_3;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/opportunity-splits/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,MAAM,OAAO,iBAAkB,SAAQ,kBAAkB;IAChD,KAAK,CAAC,QAAQ,CAAC,UAAmB;;;YACvC,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,OAAA,CAAC;YACvE,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,QAAQ,GAAG;gBACf,OAAO,EAAE,MAAM,YAAY,CAAC,SAAS,EAAE;aACxC,CAAC;YACF,OAAO,QAAQ,CAAC;;;;;;;;;;;KACjB;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;QAC/B,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;;;gBACnB,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,OAAA,CAAC;gBACpE,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;gBACtC,MAAM,mBAAmB,GAAG,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC;gBACrD,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAC,MAAM,EAAE,CAAC;gBACxD,MAAM,YAAY,CAAC,kBAAkB,EAAE,CAAC;;;;;;;;;;;SACzC;aAAM,CAAC;;;gBACN,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,OAAA,CAAC;gBACvE,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;gBAC5C,MAAM,YAAY,CAAC,OAAO,EAAE,CAAC;gBAC7B,MAAM,YAAY,CAAC,kBAAkB,EAAE,CAAC;;;;;;;;;;;SACzC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OverviewPage } from './overview.js';
|
|
2
|
+
const SAVE_BUTTON = 'input[id$=":save"]';
|
|
3
|
+
export class LayoutSelectionPage {
|
|
4
|
+
static PATH = 'opp/opportunitySplitSetupLayout.apexp?setupid=OpportunitySplitSetup';
|
|
5
|
+
page;
|
|
6
|
+
constructor(page) {
|
|
7
|
+
this.page = page;
|
|
8
|
+
}
|
|
9
|
+
async choose() {
|
|
10
|
+
await this.page.locator(SAVE_BUTTON).click();
|
|
11
|
+
await this.page.waitForURL((url) => url.pathname === '/opp/opportunitySplitSetupOverview.apexp');
|
|
12
|
+
return new OverviewPage(this.page);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=layout-selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-selection.js","sourceRoot":"","sources":["../../../../src/plugins/opportunity-splits/pages/layout-selection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAEzC,MAAM,OAAO,mBAAmB;IAC9B,MAAM,CAAC,IAAI,GAAG,qEAAqE,CAAC;IAC5E,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC;QAC7C,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,0CAA0C,CAAC,CAAC;QACjG,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Page } from 'playwright';
|
|
2
|
+
import type { SalesforceUrlPath } from '../../../browserforce.js';
|
|
3
|
+
export declare class OverviewPage {
|
|
4
|
+
static PATH: SalesforceUrlPath;
|
|
5
|
+
private page;
|
|
6
|
+
constructor(page: Page);
|
|
7
|
+
isEnabled(): Promise<boolean>;
|
|
8
|
+
waitUntilCompleted(): Promise<void>;
|
|
9
|
+
isInProgress(): Promise<boolean>;
|
|
10
|
+
disable(): Promise<OverviewPage>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const IN_PROGRESS = '#enablingInProgress, #disablingInProgress';
|
|
2
|
+
const COMPLETED = '#prefSettingSucceeded';
|
|
3
|
+
const DISABLE_LINK = 'div[id*=":disable_form:"] a';
|
|
4
|
+
const DISABLE_CONFIRM_CHECKBOX = 'input#dis_confirm';
|
|
5
|
+
const DISABLE_CONFIRM_BUTTON = 'input#splitsDisableConfirmDialog_overlayConfirmButton';
|
|
6
|
+
export class OverviewPage {
|
|
7
|
+
static PATH = '/opp/opportunitySplitSetupOverview.apexp?setupid=OpportunitySplitSetup';
|
|
8
|
+
page;
|
|
9
|
+
constructor(page) {
|
|
10
|
+
this.page = page;
|
|
11
|
+
}
|
|
12
|
+
async isEnabled() {
|
|
13
|
+
await this.waitUntilCompleted();
|
|
14
|
+
return this.page.url().includes(OverviewPage.PATH) && (await this.page.locator(DISABLE_LINK).count()) > 0;
|
|
15
|
+
}
|
|
16
|
+
async waitUntilCompleted() {
|
|
17
|
+
if (await this.isInProgress()) {
|
|
18
|
+
await this.page.locator(COMPLETED).waitFor({ timeout: 10 * 60 * 1000 }); // 10 minutes
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async isInProgress() {
|
|
22
|
+
return (await this.page.locator(IN_PROGRESS).count()) > 0;
|
|
23
|
+
}
|
|
24
|
+
async disable() {
|
|
25
|
+
await this.page.locator(DISABLE_LINK).click();
|
|
26
|
+
await this.page.locator(DISABLE_CONFIRM_CHECKBOX).click();
|
|
27
|
+
await this.page.locator(DISABLE_CONFIRM_BUTTON).click();
|
|
28
|
+
await this.page.waitForURL((url) => url.pathname === '/opp/opportunitySplitSetupLanding.apexp');
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=overview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview.js","sourceRoot":"","sources":["../../../../src/plugins/opportunity-splits/pages/overview.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,GAAG,2CAA2C,CAAC;AAChE,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAC1C,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AACrD,MAAM,sBAAsB,GAAG,uDAAuD,CAAC;AAEvF,MAAM,OAAO,YAAY;IACvB,MAAM,CAAC,IAAI,GAAsB,wEAAwE,CAAC;IAClG,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,SAAS;QACpB,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5G,CAAC;IAEM,KAAK,CAAC,kBAAkB;QAC7B,IAAI,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;YAC9B,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa;QACxF,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,YAAY;QACvB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,CAAC;QAC9C,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,KAAK,EAAE,CAAC;QAC1D,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,KAAK,EAAE,CAAC;QACxD,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,yCAAyC,CAAC,CAAC;QAChG,OAAO,IAAI,CAAC;IACd,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Page } from 'playwright';
|
|
2
|
+
import { LayoutSelectionPage } from './layout-selection.js';
|
|
3
|
+
import type { SalesforceUrlPath } from '../../../browserforce.js';
|
|
4
|
+
export declare class SetupPage {
|
|
5
|
+
static PATH: SalesforceUrlPath;
|
|
6
|
+
private page;
|
|
7
|
+
constructor(page: Page);
|
|
8
|
+
enable(): Promise<LayoutSelectionPage>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LayoutSelectionPage } from './layout-selection.js';
|
|
2
|
+
const SAVE_BUTTON = 'input[id$=":form:SaveButton"]';
|
|
3
|
+
const MODAL_CONFIRM_BUTTON = 'input[id="splitsMassOperationConfirmDialog_overlayConfirmButton"]';
|
|
4
|
+
export class SetupPage {
|
|
5
|
+
static PATH = '/opp/opportunitySplitSetupEdit.apexp?setupid=OpportunitySplitSetup';
|
|
6
|
+
page;
|
|
7
|
+
constructor(page) {
|
|
8
|
+
this.page = page;
|
|
9
|
+
}
|
|
10
|
+
async enable() {
|
|
11
|
+
await this.page.locator(SAVE_BUTTON).click();
|
|
12
|
+
await this.page.locator(MODAL_CONFIRM_BUTTON).click();
|
|
13
|
+
await this.page.waitForURL((url) => url.pathname === '/opp/opportunitySplitSetupLayout.apexp');
|
|
14
|
+
return new LayoutSelectionPage(this.page);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=setup.js.map
|