sfdx-browserforce-plugin 5.2.0-next.5 → 6.0.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -87
- package/lib/browserforce-command.d.ts +14 -3
- package/lib/browserforce-command.js +117 -17
- package/lib/browserforce-command.js.map +1 -1
- package/lib/browserforce.d.ts +14 -12
- package/lib/browserforce.js +98 -100
- package/lib/browserforce.js.map +1 -1
- package/lib/commands/browserforce/apply.js +17 -12
- package/lib/commands/browserforce/apply.js.map +1 -1
- package/lib/commands/browserforce/playwright.js +9 -3
- package/lib/commands/browserforce/playwright.js.map +1 -1
- package/lib/config-parser.js.map +1 -1
- package/lib/pages/login.d.ts +2 -2
- package/lib/pages/login.js +5 -15
- package/lib/pages/login.js.map +1 -1
- package/lib/plugin.d.ts +0 -2
- package/lib/plugin.js +0 -2
- package/lib/plugin.js.map +1 -1
- package/lib/plugins/activity-settings/index.e2e-spec.js +1 -1
- package/lib/plugins/activity-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/activity-settings/index.js +92 -21
- package/lib/plugins/activity-settings/index.js.map +1 -1
- package/lib/plugins/company-information/index.e2e-spec.js +1 -1
- package/lib/plugins/company-information/index.e2e-spec.js.map +1 -1
- package/lib/plugins/company-information/index.js +100 -31
- package/lib/plugins/company-information/index.js.map +1 -1
- package/lib/plugins/customer-portal/available-custom-objects/index.js +161 -73
- package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -1
- package/lib/plugins/customer-portal/available-custom-objects/index.test.js +1 -1
- package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +1 -1
- package/lib/plugins/customer-portal/enabled/index.js +76 -13
- package/lib/plugins/customer-portal/enabled/index.js.map +1 -1
- package/lib/plugins/customer-portal/enabled/index.test.js +1 -1
- package/lib/plugins/customer-portal/enabled/index.test.js.map +1 -1
- package/lib/plugins/customer-portal/index.e2e-spec.js +12 -19
- package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -1
- package/lib/plugins/customer-portal/index.js +3 -4
- package/lib/plugins/customer-portal/index.js.map +1 -1
- package/lib/plugins/customer-portal/index.test.js +1 -1
- package/lib/plugins/customer-portal/index.test.js.map +1 -1
- package/lib/plugins/customer-portal/portals/index.js +186 -110
- package/lib/plugins/customer-portal/portals/index.js.map +1 -1
- package/lib/plugins/customer-portal/portals/index.test.js +1 -1
- package/lib/plugins/customer-portal/portals/index.test.js.map +1 -1
- package/lib/plugins/density-settings/index.e2e-spec.js +1 -1
- package/lib/plugins/density-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/density-settings/index.js +91 -22
- package/lib/plugins/density-settings/index.js.map +1 -1
- package/lib/plugins/email-deliverability/index.e2e-spec.js +1 -1
- package/lib/plugins/email-deliverability/index.e2e-spec.js.map +1 -1
- package/lib/plugins/email-deliverability/index.js +93 -22
- package/lib/plugins/email-deliverability/index.js.map +1 -1
- package/lib/plugins/high-velocity-sales-settings/index.d.ts +1 -1
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js +1 -1
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/high-velocity-sales-settings/index.js +71 -8
- package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -1
- package/lib/plugins/high-velocity-sales-settings/page.d.ts +2 -1
- package/lib/plugins/high-velocity-sales-settings/page.js +2 -6
- package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -1
- package/lib/plugins/history-tracking/index.e2e-spec.js +3 -4
- package/lib/plugins/history-tracking/index.e2e-spec.js.map +1 -1
- package/lib/plugins/history-tracking/index.js +156 -94
- package/lib/plugins/history-tracking/index.js.map +1 -1
- package/lib/plugins/home-page-layouts/index.e2e-spec.js +1 -1
- package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +1 -1
- package/lib/plugins/home-page-layouts/index.js +121 -57
- package/lib/plugins/home-page-layouts/index.js.map +1 -1
- package/lib/plugins/home-page-layouts/index.test.js +1 -1
- package/lib/plugins/home-page-layouts/index.test.js.map +1 -1
- package/lib/plugins/index.d.ts +1 -1
- package/lib/plugins/index.js +1 -1
- package/lib/plugins/index.js.map +1 -1
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +1 -1
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/lightning-experience-settings/index.js +90 -27
- package/lib/plugins/lightning-experience-settings/index.js.map +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/index.js +84 -6
- package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +2 -1
- package/lib/plugins/linkedin-sales-navigator-settings/page.js +2 -7
- package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -1
- package/lib/plugins/omni-channel-settings/index.e2e-spec.js +1 -1
- package/lib/plugins/omni-channel-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/omni-channel-settings/index.js +87 -14
- package/lib/plugins/omni-channel-settings/index.js.map +1 -1
- package/lib/plugins/opportunity-splits/index.e2e-spec.js +1 -1
- package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +1 -1
- package/lib/plugins/opportunity-splits/index.js +103 -18
- package/lib/plugins/opportunity-splits/index.js.map +1 -1
- package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +1 -1
- package/lib/plugins/opportunity-splits/pages/overview.d.ts +2 -1
- package/lib/plugins/opportunity-splits/pages/overview.js +2 -3
- package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -1
- package/lib/plugins/opportunity-splits/pages/setup.d.ts +2 -1
- package/lib/plugins/opportunity-splits/pages/setup.js +1 -1
- package/lib/plugins/opportunity-splits/pages/setup.js.map +1 -1
- package/lib/plugins/permission-sets/index.e2e-spec.js +1 -1
- package/lib/plugins/permission-sets/index.e2e-spec.js.map +1 -1
- package/lib/plugins/permission-sets/index.js.map +1 -1
- package/lib/plugins/permission-sets/service-presence-status/index.js +106 -53
- package/lib/plugins/permission-sets/service-presence-status/index.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/index.js +91 -14
- package/lib/plugins/picklists/field-dependencies/index.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/index.test.js +1 -1
- package/lib/plugins/picklists/field-dependencies/index.test.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/pages.d.ts +3 -2
- package/lib/plugins/picklists/field-dependencies/pages.js +5 -14
- package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -1
- package/lib/plugins/picklists/index.d.ts +1 -1
- package/lib/plugins/picklists/index.e2e-spec.js +36 -14
- package/lib/plugins/picklists/index.e2e-spec.js.map +1 -1
- package/lib/plugins/picklists/index.js +136 -68
- package/lib/plugins/picklists/index.js.map +1 -1
- package/lib/plugins/picklists/pages.js +13 -28
- package/lib/plugins/picklists/pages.js.map +1 -1
- package/lib/plugins/picklists/standard-value-set.js +2 -2
- package/lib/plugins/picklists/standard-value-set.js.map +1 -1
- package/lib/plugins/record-types/index.e2e-spec.js +2 -3
- package/lib/plugins/record-types/index.e2e-spec.js.map +1 -1
- package/lib/plugins/record-types/index.js +81 -20
- package/lib/plugins/record-types/index.js.map +1 -1
- package/lib/plugins/record-types/pages.js +1 -5
- package/lib/plugins/record-types/pages.js.map +1 -1
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js +2 -2
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +1 -1
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js +99 -35
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -1
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +100 -37
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -1
- package/lib/plugins/reports-and-dashboards/index.js +1 -1
- package/lib/plugins/reports-and-dashboards/index.js.map +1 -1
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js +1 -1
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js.map +1 -1
- package/lib/plugins/salesforce-cpq-config/index.js +213 -167
- package/lib/plugins/salesforce-cpq-config/index.js.map +1 -1
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js +1 -2
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -1
- package/lib/plugins/salesforce-to-salesforce/index.js +93 -23
- package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -1
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js +2 -3
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js.map +1 -1
- package/lib/plugins/security/authentication-configuration/index.js +122 -50
- package/lib/plugins/security/authentication-configuration/index.js.map +1 -1
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js +4 -25
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js.map +1 -1
- package/lib/plugins/security/certificate-and-key-management/index.js +141 -65
- package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -1
- package/lib/plugins/security/certificate-and-key-management/index.test.js +1 -1
- package/lib/plugins/security/certificate-and-key-management/index.test.js.map +1 -1
- package/lib/plugins/security/index.js +1 -2
- package/lib/plugins/security/index.js.map +1 -1
- package/lib/plugins/service-channels/capacity/index.js +145 -112
- package/lib/plugins/service-channels/capacity/index.js.map +1 -1
- package/lib/plugins/service-channels/index.e2e-spec.js +5 -6
- package/lib/plugins/service-channels/index.e2e-spec.js.map +1 -1
- package/lib/plugins/service-channels/index.js +1 -2
- package/lib/plugins/service-channels/index.js.map +1 -1
- package/lib/plugins/slack/index.e2e-spec.js +1 -1
- package/lib/plugins/slack/index.e2e-spec.js.map +1 -1
- package/lib/plugins/slack/index.js +97 -28
- package/lib/plugins/slack/index.js.map +1 -1
- package/lib/plugins/user-access-policies/index.e2e-spec.js +3 -5
- package/lib/plugins/user-access-policies/index.e2e-spec.js.map +1 -1
- package/lib/plugins/user-access-policies/index.js +95 -26
- package/lib/plugins/user-access-policies/index.js.map +1 -1
- package/lib/plugins/user-access-policies/page.d.ts +2 -1
- package/lib/plugins/user-access-policies/page.js +1 -7
- package/lib/plugins/user-access-policies/page.js.map +1 -1
- package/lib/plugins/utils.js +2 -7
- package/lib/plugins/utils.js.map +1 -1
- package/oclif.manifest.json +67 -71
- package/package.json +10 -8
- package/lib/commands/browserforce/plan.d.ts +0 -10
- package/lib/commands/browserforce/plan.js +0 -56
- package/lib/commands/browserforce/plan.js.map +0 -1
|
@@ -1,6 +1,58 @@
|
|
|
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
|
+
});
|
|
1
53
|
import { waitForPageErrors } from '../../browserforce.js';
|
|
2
54
|
import { BrowserforcePlugin } from '../../plugin.js';
|
|
3
|
-
const BASE_PATH =
|
|
55
|
+
const BASE_PATH = `/ui/setup/layout/FieldHistoryTracking?pEntity={APINAME}&retURL=${encodeURIComponent('/setup/forcecomHomepage.apexp')}`;
|
|
4
56
|
const ENABLE_HISTORY_SELECTOR = 'input[type="checkbox"][id="enable"]';
|
|
5
57
|
const ENABLE_FIELD_HISTORY_SELECTOR = 'input[id="{APINAME}_fht"]';
|
|
6
58
|
const SAVE_BUTTON_SELECTOR = 'input[type="submit"][name="save"]';
|
|
@@ -12,52 +64,59 @@ export class HistoryTracking extends BrowserforcePlugin {
|
|
|
12
64
|
const tableEnumOrIdByObjectApiName = await this.getTableEnumOrIdByObjectApiName(definition);
|
|
13
65
|
// Now we can iterate over all history tracking configurations in the definition
|
|
14
66
|
for (const historyTrackingConfig of definition) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.isChecked();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
67
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
68
|
+
try {
|
|
69
|
+
const historyTrackingResult = { ...historyTrackingConfig };
|
|
70
|
+
// Open the object history tracking setup page
|
|
71
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH.replace('{APINAME}', tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName))), true);
|
|
72
|
+
// Retrieve the object history tracking
|
|
73
|
+
// If this is a custom object, this checkbox does not exist, so skip
|
|
74
|
+
if (!historyTrackingConfig.objectApiName.includes('__c')) {
|
|
75
|
+
historyTrackingResult.enableHistoryTracking = await page.locator(ENABLE_HISTORY_SELECTOR).isChecked();
|
|
76
|
+
}
|
|
77
|
+
// If we have no field history tracking, there is nothing more to do
|
|
78
|
+
if (!historyTrackingConfig.fieldHistoryTracking) {
|
|
79
|
+
historyTrackingConfigs.push(historyTrackingResult);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const fieldHistoryTrackingConfigs = [];
|
|
83
|
+
// If the object history tracking is false, then we already know all field history tracking is false
|
|
84
|
+
// Only so long as this is a standard object
|
|
85
|
+
if (!historyTrackingResult.enableHistoryTracking && !historyTrackingConfig.objectApiName.includes('__c')) {
|
|
86
|
+
for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
|
|
87
|
+
fieldHistoryTrackingConfigs.push({
|
|
88
|
+
...fieldHistoryTracking,
|
|
89
|
+
enableHistoryTracking: false,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
historyTrackingResult.fieldHistoryTracking = fieldHistoryTrackingConfigs;
|
|
93
|
+
historyTrackingConfigs.push(historyTrackingResult);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
// We need to determine the correct html selector for each field that is configured
|
|
97
|
+
// This is because custom fields are identified using their CustomField.Id value
|
|
98
|
+
const fieldSelectorByFieldApiName = await this.getFieldSelectorByFieldApiName(tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName), historyTrackingConfig.fieldHistoryTracking);
|
|
99
|
+
// We can now retrieve the field history settings for the fields specified for the object
|
|
35
100
|
for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
101
|
+
const fieldHistoryTrackingResult = { ...fieldHistoryTracking };
|
|
102
|
+
const fieldApiName = fieldSelectorByFieldApiName.get(fieldHistoryTracking.fieldApiName);
|
|
103
|
+
fieldHistoryTrackingResult.enableHistoryTracking = await page
|
|
104
|
+
.locator(ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName))
|
|
105
|
+
.isChecked();
|
|
106
|
+
fieldHistoryTrackingConfigs.push(fieldHistoryTrackingResult);
|
|
40
107
|
}
|
|
41
|
-
historyTrackingResult.fieldHistoryTracking =
|
|
42
|
-
fieldHistoryTrackingConfigs;
|
|
108
|
+
historyTrackingResult.fieldHistoryTracking = fieldHistoryTrackingConfigs;
|
|
43
109
|
historyTrackingConfigs.push(historyTrackingResult);
|
|
44
|
-
continue;
|
|
45
110
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.locator(ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName))
|
|
55
|
-
.isChecked();
|
|
56
|
-
fieldHistoryTrackingConfigs.push(fieldHistoryTrackingResult);
|
|
111
|
+
catch (e_1) {
|
|
112
|
+
env_1.error = e_1;
|
|
113
|
+
env_1.hasError = true;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
const result_1 = __disposeResources(env_1);
|
|
117
|
+
if (result_1)
|
|
118
|
+
await result_1;
|
|
57
119
|
}
|
|
58
|
-
historyTrackingResult.fieldHistoryTracking = fieldHistoryTrackingConfigs;
|
|
59
|
-
historyTrackingConfigs.push(historyTrackingResult);
|
|
60
|
-
await page.close();
|
|
61
120
|
}
|
|
62
121
|
return historyTrackingConfigs;
|
|
63
122
|
}
|
|
@@ -67,49 +126,54 @@ export class HistoryTracking extends BrowserforcePlugin {
|
|
|
67
126
|
const tableEnumOrIdByObjectApiName = await this.getTableEnumOrIdByObjectApiName(plan);
|
|
68
127
|
// Now we can iterate over all history tracking configurations in the plan
|
|
69
128
|
for (const historyTrackingConfig of plan) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.isChecked();
|
|
78
|
-
|
|
79
|
-
// Click the checkbox
|
|
80
|
-
await page.locator(ENABLE_HISTORY_SELECTOR).click();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (historyTrackingConfig.fieldHistoryTracking) {
|
|
84
|
-
// We need to determine the correct html selector for each field that is configured
|
|
85
|
-
// This is because custom fields are identified using their CustomField.Id value
|
|
86
|
-
const fieldSelectorByFieldApiName = await this.getFieldSelectorByFieldApiName(tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName), historyTrackingConfig.fieldHistoryTracking);
|
|
87
|
-
// We can now retrieve the field history settings for the fields specified for the object
|
|
88
|
-
for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
|
|
89
|
-
const fieldApiName = fieldSelectorByFieldApiName.get(fieldHistoryTracking.fieldApiName);
|
|
90
|
-
const fieldSelector = ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName);
|
|
91
|
-
const fieldHistoryTrackingEnabled = await page
|
|
92
|
-
.locator(fieldSelector)
|
|
93
|
-
.isChecked();
|
|
94
|
-
if (fieldHistoryTracking.enableHistoryTracking !==
|
|
95
|
-
fieldHistoryTrackingEnabled) {
|
|
129
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
130
|
+
try {
|
|
131
|
+
// Open the object history tracking setup page
|
|
132
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH.replace('{APINAME}', tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName))), true);
|
|
133
|
+
// Retrieve the object history tracking
|
|
134
|
+
// If this is a custom object, this checkbox does not exist, so skip
|
|
135
|
+
if (!historyTrackingConfig.objectApiName.includes('__c')) {
|
|
136
|
+
const historyTrackingEnabled = await page.locator(ENABLE_HISTORY_SELECTOR).isChecked();
|
|
137
|
+
if (historyTrackingConfig.enableHistoryTracking !== historyTrackingEnabled) {
|
|
96
138
|
// Click the checkbox
|
|
97
|
-
await page.locator(
|
|
139
|
+
await page.locator(ENABLE_HISTORY_SELECTOR).click();
|
|
98
140
|
}
|
|
99
141
|
}
|
|
142
|
+
if (historyTrackingConfig.fieldHistoryTracking) {
|
|
143
|
+
// We need to determine the correct html selector for each field that is configured
|
|
144
|
+
// This is because custom fields are identified using their CustomField.Id value
|
|
145
|
+
const fieldSelectorByFieldApiName = await this.getFieldSelectorByFieldApiName(tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName), historyTrackingConfig.fieldHistoryTracking);
|
|
146
|
+
// We can now retrieve the field history settings for the fields specified for the object
|
|
147
|
+
for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
|
|
148
|
+
const fieldApiName = fieldSelectorByFieldApiName.get(fieldHistoryTracking.fieldApiName);
|
|
149
|
+
const fieldSelector = ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName);
|
|
150
|
+
const fieldHistoryTrackingEnabled = await page.locator(fieldSelector).isChecked();
|
|
151
|
+
if (fieldHistoryTracking.enableHistoryTracking !== fieldHistoryTrackingEnabled) {
|
|
152
|
+
// Click the checkbox
|
|
153
|
+
await page.locator(fieldSelector).click();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
// Save the settings
|
|
158
|
+
await page
|
|
159
|
+
.locator(SAVE_BUTTON_SELECTOR)
|
|
160
|
+
.filter({ visible: true }) // there are three save buttons [not visible, top row, bottom row]
|
|
161
|
+
.first()
|
|
162
|
+
.click();
|
|
163
|
+
await Promise.race([
|
|
164
|
+
page.waitForURL((url) => url.pathname.startsWith('/setup/forcecomHomepage.apexp')),
|
|
165
|
+
waitForPageErrors(page),
|
|
166
|
+
]);
|
|
167
|
+
}
|
|
168
|
+
catch (e_2) {
|
|
169
|
+
env_2.error = e_2;
|
|
170
|
+
env_2.hasError = true;
|
|
171
|
+
}
|
|
172
|
+
finally {
|
|
173
|
+
const result_2 = __disposeResources(env_2);
|
|
174
|
+
if (result_2)
|
|
175
|
+
await result_2;
|
|
100
176
|
}
|
|
101
|
-
// Save the settings
|
|
102
|
-
await page
|
|
103
|
-
.locator(SAVE_BUTTON_SELECTOR)
|
|
104
|
-
.filter({ visible: true }) // there are three save buttons [not visible, top row, bottom row]
|
|
105
|
-
.first()
|
|
106
|
-
.click();
|
|
107
|
-
await Promise.race([
|
|
108
|
-
page.waitForURL((url) => url.pathname !== `/ui/setup/layout/FieldHistoryTracking`),
|
|
109
|
-
waitForPageErrors(page),
|
|
110
|
-
]);
|
|
111
|
-
// Close the page
|
|
112
|
-
await page.close();
|
|
113
177
|
}
|
|
114
178
|
}
|
|
115
179
|
async getFieldSelectorByFieldApiName(tableEnumOrId, fieldHistoryTrackingConfigs) {
|
|
@@ -118,8 +182,7 @@ export class HistoryTracking extends BrowserforcePlugin {
|
|
|
118
182
|
const personAccountFieldApiNames = [];
|
|
119
183
|
for (const fieldHistoryTrackingConfig of fieldHistoryTrackingConfigs) {
|
|
120
184
|
// If this is a person account field, we must do special handling for this
|
|
121
|
-
if (tableEnumOrId === 'Account' &&
|
|
122
|
-
fieldHistoryTrackingConfig.fieldApiName.includes('__pc')) {
|
|
185
|
+
if (tableEnumOrId === 'Account' && fieldHistoryTrackingConfig.fieldApiName.includes('__pc')) {
|
|
123
186
|
personAccountFieldApiNames.push(`'${fieldHistoryTrackingConfig.fieldApiName.replace('__pc', '')}'`);
|
|
124
187
|
continue;
|
|
125
188
|
}
|
|
@@ -131,22 +194,21 @@ export class HistoryTracking extends BrowserforcePlugin {
|
|
|
131
194
|
// Otherwise, if this is a standard field, the Selector is the Field API Name
|
|
132
195
|
fieldSelectorByFieldApiName.set(fieldHistoryTrackingConfig.fieldApiName, fieldHistoryTrackingConfig.fieldApiName);
|
|
133
196
|
}
|
|
134
|
-
if (customFieldApiNames.length === 0 &&
|
|
135
|
-
personAccountFieldApiNames.length === 0) {
|
|
197
|
+
if (customFieldApiNames.length === 0 && personAccountFieldApiNames.length === 0) {
|
|
136
198
|
return fieldSelectorByFieldApiName;
|
|
137
199
|
}
|
|
138
200
|
if (personAccountFieldApiNames.length > 0) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
201
|
+
// NOTE: Unfortunately this includes deleted records
|
|
202
|
+
// WORKAROUND: ORDER BY CreatedDate
|
|
203
|
+
const personAccountFieldsQuery = await this.browserforce.connection.tooling.query(`SELECT Id, DeveloperName FROM CustomField WHERE DeveloperName IN (${personAccountFieldApiNames.join(',')}) AND TableEnumOrId = 'Contact' ORDER By CreatedDate ASC`);
|
|
142
204
|
for (const personAccountField of personAccountFieldsQuery.records) {
|
|
143
205
|
fieldSelectorByFieldApiName.set(`${personAccountField.DeveloperName}__pc`, personAccountField.Id.substring(0, 15));
|
|
144
206
|
}
|
|
145
207
|
}
|
|
146
208
|
if (customFieldApiNames.length > 0) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
209
|
+
// NOTE: Unfortunately this includes deleted records
|
|
210
|
+
// WORKAROUND: ORDER BY CreatedDate
|
|
211
|
+
const customFieldsQuery = await this.browserforce.connection.tooling.query(`SELECT Id, DeveloperName FROM CustomField WHERE DeveloperName IN (${customFieldApiNames.join(',')}) AND TableEnumOrId = '${tableEnumOrId}' ORDER By CreatedDate ASC`);
|
|
150
212
|
for (const customField of customFieldsQuery.records) {
|
|
151
213
|
fieldSelectorByFieldApiName.set(`${customField.DeveloperName}__c`, customField.Id.substring(0, 15));
|
|
152
214
|
}
|
|
@@ -168,9 +230,9 @@ export class HistoryTracking extends BrowserforcePlugin {
|
|
|
168
230
|
if (customObjectApiNames.length === 0) {
|
|
169
231
|
return tableEnumOrIdByObjectApiName;
|
|
170
232
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
233
|
+
// NOTE: Unfortunately this includes deleted records
|
|
234
|
+
// WORKAROUND: ORDER BY CreatedDate
|
|
235
|
+
const customObjectsQuery = await this.browserforce.connection.tooling.query(`SELECT Id, DeveloperName FROM CustomObject WHERE DeveloperName IN (${customObjectApiNames.join(',')}) ORDER BY CreatedDate ASC`);
|
|
174
236
|
for (const customObject of customObjectsQuery.records) {
|
|
175
237
|
tableEnumOrIdByObjectApiName.set(`${customObject.DeveloperName}__c`, customObject.Id);
|
|
176
238
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/history-tracking/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/history-tracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAsB,kEAAkE,kBAAkB,CAAC,+BAA+B,CAAC,EAAE,CAAC;AAE7J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
|
@@ -3,7 +3,7 @@ import { HomePageLayouts } from './index.js';
|
|
|
3
3
|
describe(HomePageLayouts.name, function () {
|
|
4
4
|
let plugin;
|
|
5
5
|
before(() => {
|
|
6
|
-
plugin = new HomePageLayouts(global.
|
|
6
|
+
plugin = new HomePageLayouts(global.browserforce);
|
|
7
7
|
});
|
|
8
8
|
const configPageDefault = {
|
|
9
9
|
homePageLayoutAssignments: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE;IAC7B,IAAI,MAAuB,CAAC;IAC5B,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE;IAC7B,IAAI,MAAuB,CAAC;IAC5B,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG;QACxB,yBAAyB,EAAE;YACzB;gBACE,OAAO,EAAE,eAAe;gBACxB,MAAM,EAAE,EAAE;aACX;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,MAAM,EAAE,EAAE;aACX;SACF;KACF,CAAC;IACF,MAAM,gBAAgB,GAAG;QACvB,yBAAyB,EAAE;YACzB;gBACE,OAAO,EAAE,eAAe;gBACxB,MAAM,EAAE,YAAY;aACrB;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,MAAM,EAAE,YAAY;aACrB;SACF;KACF,CAAC;IACF,EAAE,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,MAAM,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAChD,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC/C,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,24 +1,85 @@
|
|
|
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
|
+
});
|
|
1
53
|
import { waitForPageErrors } from '../../browserforce.js';
|
|
2
54
|
import { BrowserforcePlugin } from '../../plugin.js';
|
|
3
|
-
const BASE_PATH =
|
|
55
|
+
const BASE_PATH = `/setup/ui/assignhomelayoutedit.jsp?retURL=${encodeURIComponent('/setup/forcecomHomepage.apexp')}`;
|
|
4
56
|
const BASE_SELECTOR = 'table.detailList';
|
|
5
57
|
const SAVE_BUTTON_SELECTOR = 'input[name="save"]';
|
|
6
58
|
export class HomePageLayouts extends BrowserforcePlugin {
|
|
7
59
|
async retrieve() {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.locator('table.detailList tbody tr td
|
|
13
|
-
.allTextContents()).map((layout) => (layout === 'Home Page Default' ? '' : layout)); // value is "default" instead of an id
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
60
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
61
|
+
try {
|
|
62
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
63
|
+
await page.locator(BASE_SELECTOR).waitFor();
|
|
64
|
+
const profiles = (await page.locator('table.detailList tbody tr td label').allTextContents()).map((label) => label.replace(/^\*/, '')); // removing * from assistiveText
|
|
65
|
+
const layouts = (await page.locator('table.detailList tbody tr td select option:checked').allTextContents()).map((layout) => (layout === 'Home Page Default' ? '' : layout)); // value is "default" instead of an id
|
|
66
|
+
const homePageLayoutAssignments = profiles.map((profile, i) => ({
|
|
67
|
+
profile,
|
|
68
|
+
layout: layouts[i],
|
|
69
|
+
}));
|
|
70
|
+
return {
|
|
71
|
+
homePageLayoutAssignments,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
catch (e_1) {
|
|
75
|
+
env_1.error = e_1;
|
|
76
|
+
env_1.hasError = true;
|
|
77
|
+
}
|
|
78
|
+
finally {
|
|
79
|
+
const result_1 = __disposeResources(env_1);
|
|
80
|
+
if (result_1)
|
|
81
|
+
await result_1;
|
|
82
|
+
}
|
|
22
83
|
}
|
|
23
84
|
diff(source, target) {
|
|
24
85
|
target.homePageLayoutAssignments.sort(compareAssignment);
|
|
@@ -29,50 +90,53 @@ export class HomePageLayouts extends BrowserforcePlugin {
|
|
|
29
90
|
return super.diff(source, target);
|
|
30
91
|
}
|
|
31
92
|
async apply(config) {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.tooling.query(`SELECT Id, Name FROM Profile WHERE Name IN (${profilesList})`);
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
93
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
94
|
+
try {
|
|
95
|
+
const profilesList = config.homePageLayoutAssignments
|
|
96
|
+
.map((assignment) => {
|
|
97
|
+
return `'${assignment.profile}'`;
|
|
98
|
+
})
|
|
99
|
+
.join(',');
|
|
100
|
+
const layoutsList = config.homePageLayoutAssignments
|
|
101
|
+
.map((assignment) => {
|
|
102
|
+
return `'${assignment.layout}'`;
|
|
103
|
+
})
|
|
104
|
+
.join(',');
|
|
105
|
+
const profiles = await this.browserforce.connection.tooling.query(`SELECT Id, Name FROM Profile WHERE Name IN (${profilesList})`);
|
|
106
|
+
const homePageLayouts = await this.browserforce.connection.tooling.query(`SELECT Id, Name FROM HomePageLayout WHERE Name IN (${layoutsList})`);
|
|
107
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
|
|
108
|
+
await page.locator(BASE_SELECTOR).waitFor();
|
|
109
|
+
for (const assignment of config.homePageLayoutAssignments) {
|
|
110
|
+
const homePageLayoutName = assignment.layout;
|
|
111
|
+
const profile = profiles.records.find((p) => p.Name === assignment.profile);
|
|
112
|
+
if (!profile) {
|
|
113
|
+
throw new Error(`could not find profile '${assignment.profile}'`);
|
|
114
|
+
}
|
|
115
|
+
let homePageLayout = homePageLayouts.records.find((l) => l.Name === homePageLayoutName);
|
|
116
|
+
if (homePageLayoutName === '') {
|
|
117
|
+
homePageLayout = { Id: 'default', Name: 'default' };
|
|
118
|
+
}
|
|
119
|
+
if (homePageLayout === undefined) {
|
|
120
|
+
throw new Error(`Could not find home page layout "${homePageLayoutName}" in list of home page layouts: ${homePageLayouts.records.map((l) => l.Name)}`);
|
|
121
|
+
}
|
|
122
|
+
const profileSelector = `select[id='${profile.Id.substring(0, 15)}']`;
|
|
123
|
+
await page.locator(profileSelector).selectOption(homePageLayout.Id.substring(0, 15));
|
|
60
124
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
125
|
+
await page.locator(SAVE_BUTTON_SELECTOR).first().click();
|
|
126
|
+
await Promise.race([
|
|
127
|
+
page.waitForURL((url) => url.pathname === '/setup/forcecomHomepage.apexp'),
|
|
128
|
+
waitForPageErrors(page),
|
|
129
|
+
]);
|
|
130
|
+
}
|
|
131
|
+
catch (e_2) {
|
|
132
|
+
env_2.error = e_2;
|
|
133
|
+
env_2.hasError = true;
|
|
134
|
+
}
|
|
135
|
+
finally {
|
|
136
|
+
const result_2 = __disposeResources(env_2);
|
|
137
|
+
if (result_2)
|
|
138
|
+
await result_2;
|
|
69
139
|
}
|
|
70
|
-
await page.locator(SAVE_BUTTON_SELECTOR).first().click();
|
|
71
|
-
await Promise.race([
|
|
72
|
-
page.waitForURL((url) => url.pathname !== `/${BASE_PATH}`),
|
|
73
|
-
waitForPageErrors(page),
|
|
74
|
-
]);
|
|
75
|
-
await page.close();
|
|
76
140
|
}
|
|
77
141
|
}
|
|
78
142
|
function compareAssignment(a, b) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAsB,6CAA6C,kBAAkB,CAAC,+BAA+B,CAAC,EAAE,CAAC;AAExI,MAAM,aAAa,GAAG,kBAAkB,CAAC;AACzC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAmBlD,MAAM,OAAO,eAAgB,SAAQ,kBAAkB;IAC9C,KAAK,CAAC,QAAQ;;;YACnB,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,CAAC;YAE5C,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAC1G,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CACzB,CAAC,CAAC,gCAAgC;YAEnC,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,oDAAoD,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,GAAG,CAC9G,CAAC,MAAM,EAAE,EAA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C,OAAO,CAAC,GAAG,CAClH,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CACd,EAAE,CACJ,CAAC;gBACJ,CAAC;gBACD,MAAM,eAAe,GAAG,cAAc,OAAO,CAAC,EAAG,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;gBACvE,MAAM,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,EAAG,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YACxF,CAAC;YAED,MAAM,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC;YACzD,MAAM,OAAO,CAAC,IAAI,CAAC;gBACjB,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,+BAA+B,CAAC;gBAC1E,iBAAiB,CAAC,IAAI,CAAC;aACxB,CAAC,CAAC;;;;;;;;;;;KACJ;CACF;AAED,SAAS,iBAAiB,CAAC,CAA2B,EAAE,CAA2B;IACjF,OAAO,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AACvG,CAAC"}
|
|
@@ -92,7 +92,7 @@ const tests = [
|
|
|
92
92
|
];
|
|
93
93
|
describe('HomePageLayouts', () => {
|
|
94
94
|
describe('diff()', () => {
|
|
95
|
-
const p = new HomePageLayouts(global.
|
|
95
|
+
const p = new HomePageLayouts(global.browserforce);
|
|
96
96
|
for (const t of tests) {
|
|
97
97
|
it(t.description, () => {
|
|
98
98
|
const actual = p.diff(t.source, t.target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,KAAK,GAAG;IACZ;QACE,WAAW,EAAE,yBAAyB;QACtC,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,QAAQ,EAAE,SAAS;KACpB;IACD;QACE,WAAW,EAAE,sCAAsC;QACnD,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,UAAU;oBACnB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,QAAQ,EAAE,SAAS;KACpB;IACD;QACE,WAAW,EAAE,4BAA4B;QACzC,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,QAAQ,EAAE,SAAS;KACpB;CACF,CAAC;AAEF,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,MAAM,CAAC,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,KAAK,GAAG;IACZ;QACE,WAAW,EAAE,yBAAyB;QACtC,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,QAAQ,EAAE,SAAS;KACpB;IACD;QACE,WAAW,EAAE,sCAAsC;QACnD,MAAM,EAAE;YACN,yBAAyB,EAAE;gBACzB;oBACE,OAAO,EAAE,UAAU;oBACnB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,eAAe;oBACxB,MAAM,EAAE,EAAE;iBACX;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,MA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