sfdx-browserforce-plugin 5.1.1 → 5.2.0-next.1
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 +54 -16
- package/lib/browserforce-command.d.ts +15 -0
- package/lib/browserforce-command.js +61 -0
- package/lib/browserforce-command.js.map +1 -0
- package/lib/browserforce.d.ts +29 -0
- package/lib/browserforce.js +194 -0
- package/lib/browserforce.js.map +1 -0
- package/lib/commands/browserforce/apply.d.ts +10 -0
- package/lib/commands/browserforce/apply.js +54 -0
- package/lib/commands/browserforce/apply.js.map +1 -0
- package/lib/commands/browserforce/plan.d.ts +10 -0
- package/lib/commands/browserforce/plan.js +56 -0
- package/lib/commands/browserforce/plan.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 +8 -0
- package/lib/pages/login.js +39 -0
- package/lib/pages/login.js.map +1 -0
- package/lib/plugin.d.ts +17 -0
- package/lib/plugin.js +30 -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 +34 -0
- package/lib/plugins/activity-settings/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 +60 -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 +114 -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 +26 -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 +202 -0
- package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -0
- package/lib/plugins/customer-portal/index.js +59 -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 +216 -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 +54 -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 +42 -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 +42 -0
- package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -0
- package/lib/plugins/high-velocity-sales-settings/page.d.ts +7 -0
- package/lib/plugins/high-velocity-sales-settings/page.js +28 -0
- package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -0
- package/lib/plugins/history-tracking/index.d.ts +17 -0
- package/lib/plugins/history-tracking/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/history-tracking/index.e2e-spec.js +106 -0
- package/lib/plugins/history-tracking/index.e2e-spec.js.map +1 -0
- package/lib/plugins/history-tracking/index.js +176 -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 +94 -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 +24 -0
- package/lib/plugins/index.js +25 -0
- package/lib/plugins/index.js.map +1 -0
- package/lib/plugins/lightning-experience-settings/index.d.ts +18 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +40 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/lightning-experience-settings/index.js +101 -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 +15 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +10 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.js +42 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.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 +21 -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 +32 -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 +10 -0
- package/lib/plugins/opportunity-splits/pages/overview.js +33 -0
- package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -0
- package/lib/plugins/opportunity-splits/pages/setup.d.ts +8 -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 +67 -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 +56 -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 +14 -0
- package/lib/plugins/picklists/field-dependencies/pages.js +49 -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 +100 -0
- package/lib/plugins/picklists/index.e2e-spec.js.map +1 -0
- package/lib/plugins/picklists/index.js +153 -0
- package/lib/plugins/picklists/index.js.map +1 -0
- package/lib/plugins/picklists/pages.d.ts +41 -0
- package/lib/plugins/picklists/pages.js +166 -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 +13 -0
- package/lib/plugins/record-types/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/record-types/index.e2e-spec.js +73 -0
- package/lib/plugins/record-types/index.e2e-spec.js.map +1 -0
- package/lib/plugins/record-types/index.js +70 -0
- package/lib/plugins/record-types/index.js.map +1 -0
- package/lib/plugins/record-types/pages.d.ts +15 -0
- package/lib/plugins/record-types/pages.js +56 -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 +29 -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 +62 -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 +55 -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 +214 -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 +35 -0
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -0
- package/lib/plugins/salesforce-to-salesforce/index.js +36 -0
- package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -0
- package/lib/plugins/security/authentication-configuration/index.d.ts +11 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js +101 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js.map +1 -0
- package/lib/plugins/security/authentication-configuration/index.js +67 -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 +63 -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 +154 -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 +42 -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 +162 -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 +61 -0
- package/lib/plugins/service-channels/index.e2e-spec.js.map +1 -0
- package/lib/plugins/service-channels/index.js +38 -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 +46 -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 +63 -0
- package/lib/plugins/user-access-policies/index.e2e-spec.js.map +1 -0
- package/lib/plugins/user-access-policies/index.js +107 -0
- package/lib/plugins/user-access-policies/index.js.map +1 -0
- package/lib/plugins/user-access-policies/page.d.ts +29 -0
- package/lib/plugins/user-access-policies/page.js +115 -0
- package/lib/plugins/user-access-policies/page.js.map +1 -0
- package/lib/plugins/utils.d.ts +3 -0
- package/lib/plugins/utils.js +47 -0
- package/lib/plugins/utils.js.map +1 -0
- package/oclif.manifest.json +153 -0
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Page } from 'playwright';
|
|
2
|
+
export declare class RecordTypePage {
|
|
3
|
+
private page;
|
|
4
|
+
constructor(page: Page);
|
|
5
|
+
clickDeleteAction(recordTypeId: string): Promise<RecordTypeDeletePage>;
|
|
6
|
+
}
|
|
7
|
+
export declare class RecordTypeDeletePage {
|
|
8
|
+
protected page: any;
|
|
9
|
+
protected saveButton: string;
|
|
10
|
+
constructor(page: Page);
|
|
11
|
+
replace(newRecordTypeId?: string): Promise<void>;
|
|
12
|
+
save(): Promise<void>;
|
|
13
|
+
throwOnMissingSaveButton(): Promise<void>;
|
|
14
|
+
throwPageErrors(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export class RecordTypePage {
|
|
2
|
+
page;
|
|
3
|
+
constructor(page) {
|
|
4
|
+
this.page = page;
|
|
5
|
+
}
|
|
6
|
+
async clickDeleteAction(recordTypeId) {
|
|
7
|
+
const xpath = `//a[contains(@href, "setup/ui/recordtypedelete.jsp?id=${recordTypeId.slice(0, 15)}")]`;
|
|
8
|
+
await this.page.locator(`xpath=${xpath}`).first().click();
|
|
9
|
+
await this.page.waitForLoadState('networkidle');
|
|
10
|
+
return new RecordTypeDeletePage(this.page);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class RecordTypeDeletePage {
|
|
14
|
+
page;
|
|
15
|
+
saveButton = 'input[name="save"]';
|
|
16
|
+
constructor(page) {
|
|
17
|
+
this.page = page;
|
|
18
|
+
}
|
|
19
|
+
async replace(newRecordTypeId) {
|
|
20
|
+
await this.throwOnMissingSaveButton();
|
|
21
|
+
const NEW_VALUE_SELECTOR = 'select#p2';
|
|
22
|
+
if (newRecordTypeId) {
|
|
23
|
+
await this.page
|
|
24
|
+
.locator(NEW_VALUE_SELECTOR)
|
|
25
|
+
.selectOption(newRecordTypeId.slice(0, 15));
|
|
26
|
+
}
|
|
27
|
+
await this.save();
|
|
28
|
+
}
|
|
29
|
+
async save() {
|
|
30
|
+
await this.page.locator(this.saveButton).click();
|
|
31
|
+
await this.page.waitForLoadState('load');
|
|
32
|
+
await this.throwPageErrors();
|
|
33
|
+
}
|
|
34
|
+
async throwOnMissingSaveButton() {
|
|
35
|
+
const saveButtonCount = await this.page.locator(this.saveButton).count();
|
|
36
|
+
if (saveButtonCount === 0) {
|
|
37
|
+
const bodyElement = this.page.locator('div.pbBody');
|
|
38
|
+
if ((await bodyElement.count()) > 0) {
|
|
39
|
+
const errorMsg = await bodyElement.textContent();
|
|
40
|
+
if (errorMsg?.trim()) {
|
|
41
|
+
throw new Error(errorMsg.trim());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async throwPageErrors() {
|
|
47
|
+
const errorElement = this.page.locator('div#validationError div.messageText');
|
|
48
|
+
if ((await errorElement.count()) > 0) {
|
|
49
|
+
const errorMsg = await errorElement.innerText();
|
|
50
|
+
if (errorMsg?.trim()) {
|
|
51
|
+
throw new Error(errorMsg.trim());
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/plugins/record-types/pages.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IACjB,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAC5B,YAAoB;QAEpB,MAAM,KAAK,GAAG,yDAAyD,YAAY,CAAC,KAAK,CACvF,CAAC,EACD,EAAE,CACH,KAAK,CAAC;QACP,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC;QAC1D,MAAM,IAAI,CAAC,IAAI,CAAC,gB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WAAW,CAAC,WAAW,EAAE,CAAC;gBACjD,IAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;oBACrB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CACpC,qCAAqC,CACtC,CAAC;QACF,IAAI,CAAC,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;YACrC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,SAAS,EAAE,CAAC;YAChD,IAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Page } from 'playwright';
|
|
2
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
3
|
+
type Config = {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare class RelateContactToMultipleAccounts extends BrowserforcePlugin {
|
|
7
|
+
retrieve(definition?: Config): Promise<Config>;
|
|
8
|
+
apply(config: Config): Promise<void>;
|
|
9
|
+
waitForProcessFinished(page: Page): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import { RelateContactToMultipleAccounts } from './index.js';
|
|
3
|
+
describe(RelateContactToMultipleAccounts.name, function () {
|
|
4
|
+
let plugin;
|
|
5
|
+
before(() => {
|
|
6
|
+
plugin = new RelateContactToMultipleAccounts(global.bf);
|
|
7
|
+
});
|
|
8
|
+
const configEnabled = {
|
|
9
|
+
enabled: true,
|
|
10
|
+
};
|
|
11
|
+
const configDisabled = {
|
|
12
|
+
enabled: false,
|
|
13
|
+
};
|
|
14
|
+
it('should enable', async () => {
|
|
15
|
+
await plugin.run(configEnabled);
|
|
16
|
+
});
|
|
17
|
+
it('should be enabled', async () => {
|
|
18
|
+
const res = await plugin.run(configEnabled);
|
|
19
|
+
assert.deepStrictEqual(res, { message: 'no action necessary' });
|
|
20
|
+
});
|
|
21
|
+
it('should disable', async () => {
|
|
22
|
+
await plugin.run(configDisabled);
|
|
23
|
+
});
|
|
24
|
+
it('should be disabled', async () => {
|
|
25
|
+
const res = await plugin.run(configDisabled);
|
|
26
|
+
assert.deepStrictEqual(res, { message: 'no action necessary' });
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.e2e-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAE7D,QAAQ,CAAC,+BAA+B,CAAC,IAAI,EAAE;IAC7C,IAAI,MAAuC,CAAC;IAC5C,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,+BAA+B,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG;QACpB,OAAO,EAAE,IAAI;KACd,CAAC;IACF,MAAM,cAAc,GAAG;QACrB,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,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,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC5C,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC7C,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { retry, throwPageErrors } from '../../browserforce.js';
|
|
2
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
3
|
+
const BASE_PATH = 'accounts/accountSetup.apexp';
|
|
4
|
+
export class RelateContactToMultipleAccounts extends BrowserforcePlugin {
|
|
5
|
+
async retrieve(definition) {
|
|
6
|
+
const page = await this.browserforce.openPage(BASE_PATH);
|
|
7
|
+
const response = {
|
|
8
|
+
enabled: await page
|
|
9
|
+
.getByRole('checkbox', { name: 'Allow users to relate a' })
|
|
10
|
+
.isChecked(),
|
|
11
|
+
};
|
|
12
|
+
await page.close();
|
|
13
|
+
return response;
|
|
14
|
+
}
|
|
15
|
+
async apply(config) {
|
|
16
|
+
const page = await this.browserforce.openPage(BASE_PATH);
|
|
17
|
+
await this.waitForProcessFinished(page);
|
|
18
|
+
// First we have to click the 'Edit' button, to make the checkbox editable
|
|
19
|
+
await page.getByRole('button', { name: 'edit' }).first().click();
|
|
20
|
+
// Change the value of the checkbox
|
|
21
|
+
await page
|
|
22
|
+
.getByRole('checkbox', { name: 'Allow users to relate a' })
|
|
23
|
+
.click();
|
|
24
|
+
await page
|
|
25
|
+
.getByRole('button', { name: 'save' })
|
|
26
|
+
.first()
|
|
27
|
+
.click({ timeout: 90_000 });
|
|
28
|
+
if (await page
|
|
29
|
+
.getByRole('heading', { name: 'Disable Contacts to Multiple' })
|
|
30
|
+
.isVisible()) {
|
|
31
|
+
await page
|
|
32
|
+
.getByRole('checkbox', { name: 'Yes, I understand that this' })
|
|
33
|
+
.click();
|
|
34
|
+
await page.getByRole('button', { name: 'Disable' }).click();
|
|
35
|
+
}
|
|
36
|
+
await throwPageErrors(page);
|
|
37
|
+
await page.close();
|
|
38
|
+
}
|
|
39
|
+
async waitForProcessFinished(page) {
|
|
40
|
+
await retry(async () => {
|
|
41
|
+
const enablingCount = await page
|
|
42
|
+
.getByText("In progress: We're enabling")
|
|
43
|
+
.count();
|
|
44
|
+
if (enablingCount > 0) {
|
|
45
|
+
const message = await page
|
|
46
|
+
.getByText("In progress: We're enabling")
|
|
47
|
+
.innerText();
|
|
48
|
+
throw new Error(message);
|
|
49
|
+
}
|
|
50
|
+
const disablingCount = await page
|
|
51
|
+
.getByText("In progress: We're disabling")
|
|
52
|
+
.count();
|
|
53
|
+
if (disablingCount > 0) {
|
|
54
|
+
const message = await page
|
|
55
|
+
.getByText("In progress: We're disabling")
|
|
56
|
+
.innerText();
|
|
57
|
+
throw new Error(message);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/relate-contact-to-multiple-accounts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAA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,CAAC;iBAC9D,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAC9D,CAAC;QAED,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5B,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,IAAU;QACrC,MAAM,KAAK,CAAC,KAAK,IAAI,EAAE;YACrB,MAAM,aAAa,GAAG,MAAM,IAAI;iBAC7B,SAAS,CAAC,6BAA6B,CAAC;iBACxC,KAAK,EAAE,CAAC;YACX,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;gBACtB,MAAM,OAAO,GAAG,MAAM,IAAI;qBACvB,SAAS,CAAC,6BAA6B,CAAC;qBACxC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;YAC3B,CAAC;YACD,MAAM,cAAc,GAAG,MAAM,IAAI;iBAC9B,SAAS,CAAC,8BAA8B,CAAC;iBACzC,KAAK,EAAE,CAAC;YACX,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,OAAO,GAAG,MAAM,IAAI;qBACvB,SAAS,CAAC,8BAA8B,CAAC;qBACzC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../../plugin.js';
|
|
2
|
+
export type Config = {
|
|
3
|
+
enableEnhancedFolderSharing: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class FolderSharing extends BrowserforcePlugin {
|
|
6
|
+
retrieve(definition?: Config): Promise<Config>;
|
|
7
|
+
apply(config: Config): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../../src/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.ts"],"names":[],"mappings":";AAAA,8DAA8D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../../plugin.js';
|
|
2
|
+
const BASE_PATH = 'ui/rpt/AnalyticsSharingSettingsPage/e';
|
|
3
|
+
const BASE_SELECTOR = 'div.pbBody';
|
|
4
|
+
const ENABLE_CHECKBOX_SELECTOR = 'input[id="0"]';
|
|
5
|
+
const SAVE_BUTTON_SELECTOR = 'input[id="saveButton"]';
|
|
6
|
+
export class FolderSharing extends BrowserforcePlugin {
|
|
7
|
+
async retrieve(definition) {
|
|
8
|
+
const response = {
|
|
9
|
+
enableEnhancedFolderSharing: true,
|
|
10
|
+
};
|
|
11
|
+
const page = await this.browserforce.openPage(BASE_PATH);
|
|
12
|
+
try {
|
|
13
|
+
const frameOrPage = await this.browserforce.waitForSelectorInFrameOrPage(page, BASE_SELECTOR);
|
|
14
|
+
const inputEnable = await frameOrPage
|
|
15
|
+
.locator(ENABLE_CHECKBOX_SELECTOR)
|
|
16
|
+
.count();
|
|
17
|
+
if (inputEnable > 0) {
|
|
18
|
+
response.enableEnhancedFolderSharing = await frameOrPage
|
|
19
|
+
.locator(ENABLE_CHECKBOX_SELECTOR)
|
|
20
|
+
.evaluate((el) => el.checked);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
// already enabled
|
|
24
|
+
response.enableEnhancedFolderSharing = true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
if (e instanceof Error && e.message.match('Insufficient Privileges')) {
|
|
29
|
+
await page.close();
|
|
30
|
+
return response;
|
|
31
|
+
}
|
|
32
|
+
await page.close();
|
|
33
|
+
throw e;
|
|
34
|
+
}
|
|
35
|
+
await page.close();
|
|
36
|
+
return response;
|
|
37
|
+
}
|
|
38
|
+
async apply(config) {
|
|
39
|
+
if (config.enableEnhancedFolderSharing === false) {
|
|
40
|
+
throw new Error('`enableEnhancedFolderSharing` cannot be disabled once enabled');
|
|
41
|
+
}
|
|
42
|
+
const page = await this.browserforce.openPage(BASE_PATH);
|
|
43
|
+
await page.locator(ENABLE_CHECKBOX_SELECTOR).waitFor();
|
|
44
|
+
await page
|
|
45
|
+
.locator(ENABLE_CHECKBOX_SELECTOR)
|
|
46
|
+
.evaluate((e, v) => {
|
|
47
|
+
e.checked = v;
|
|
48
|
+
}, config.enableEnhancedFolderSharing);
|
|
49
|
+
await page.locator(SAVE_BUTTON_SELECTOR).waitFor();
|
|
50
|
+
await page.locator(SAVE_BUTTON_SELECTOR).click();
|
|
51
|
+
await page.waitForLoadState('load');
|
|
52
|
+
await page.close();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/reports-and-dashboards/folder-sharing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,SAAS,GAAG,uCAAuC,CAAC;AAE1D,MAAM,aAAa,GAAG,YAAY,CAAC;AACnC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AACjD,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAMtD,MAAM,OAAO,aAAc,SAAQ,kBAAkB;IAC5C,KAAK,CAAC,QAAQ,CAAC,UAAmB;QACvC,MAAM,QAAQ,GAAG;YACf,2BAA2B,EAAE,IAAI;SAClC,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAEzD,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAA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AAE;YAC5C,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC;QAChB,CAAC,EAAE,MAAM,CAAC,2BAA2B,CAAC,CAAC;QACzC,MAAM,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,EAAE,CAAC;QACnD,MAAM,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,CAAC;QACjD,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACpC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
|
+
import { Config as FolderSharingConfig } from './folder-sharing/index.js';
|
|
3
|
+
type Config = {
|
|
4
|
+
folderSharing?: FolderSharingConfig;
|
|
5
|
+
};
|
|
6
|
+
export declare class ReportsAndDashboards extends BrowserforcePlugin {
|
|
7
|
+
retrieve(definition?: Config): Promise<Config>;
|
|
8
|
+
diff(state: Config, definition: Config): Config | undefined;
|
|
9
|
+
apply(plan: Config): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/reports-and-dashboards/index.e2e-spec.ts"],"names":[],"mappings":";AAAA,4EAA4E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
|
+
import { FolderSharing, } from './folder-sharing/index.js';
|
|
3
|
+
export class ReportsAndDashboards extends BrowserforcePlugin {
|
|
4
|
+
async retrieve(definition) {
|
|
5
|
+
const response = {};
|
|
6
|
+
if (definition) {
|
|
7
|
+
if (definition.folderSharing) {
|
|
8
|
+
const pluginFolderSharing = new FolderSharing(this.browserforce);
|
|
9
|
+
response.folderSharing = await pluginFolderSharing.retrieve(definition.folderSharing);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return response;
|
|
13
|
+
}
|
|
14
|
+
diff(state, definition) {
|
|
15
|
+
const response = {};
|
|
16
|
+
const folderSharing = new FolderSharing(this.browserforce).diff(state.folderSharing, definition.folderSharing);
|
|
17
|
+
if (folderSharing !== undefined) {
|
|
18
|
+
response.folderSharing = folderSharing;
|
|
19
|
+
}
|
|
20
|
+
return Object.keys(response).length ? response : undefined;
|
|
21
|
+
}
|
|
22
|
+
async apply(plan) {
|
|
23
|
+
if (plan.folderSharing) {
|
|
24
|
+
const pluginFolderSharing = new FolderSharing(this.browserforce);
|
|
25
|
+
await pluginFolderSharing.apply(plan.folderSharing);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/reports-and-dashboards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,aAAa,GAEd,MAAM,2BAA2B,CAAC;AAMnC,MAAM,OAAO,oBAAqB,SAAQ,kBAAkB;IACnD,KAAK,CAAC,QAAQ,CAAC,UAAmB;QACvC,MAAM,QAAQ,GAAW,EAAE,CAAC;QAC5B,IAAI,UAAU,EAAE,CAAC;YACf,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;gBAC7B,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBACjE,QAAQ,CAAC,aAAa,GAAG,MAAM,mBAAmB,CAAC,QAAQ,CACzD,UAAU,CAAC,aAAa,CACzB,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEM,IAAI,CAAC,KAAa,EAAE,UAAkB;QAC3C,MAAM,QAAQ,GAAW,EAAE,CAAC;QAC5B,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAC7D,KAAK,CAAC,aAAa,EACnB,UAAU,CAAC,aAAa,CACU,CAAC;QACrC,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAChC,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7D,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,IAAY;QAC7B,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACjE,MAAM,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type FormConfig = {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
label: string;
|
|
4
|
+
component: string;
|
|
5
|
+
id: string;
|
|
6
|
+
properties: {
|
|
7
|
+
[key: string]: {
|
|
8
|
+
label: string;
|
|
9
|
+
component: string;
|
|
10
|
+
type: string;
|
|
11
|
+
name: string;
|
|
12
|
+
immediatelySave?: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const formConfig: FormConfig;
|