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.
Files changed (264) hide show
  1. package/README.md +54 -16
  2. package/lib/browserforce-command.d.ts +15 -0
  3. package/lib/browserforce-command.js +61 -0
  4. package/lib/browserforce-command.js.map +1 -0
  5. package/lib/browserforce.d.ts +29 -0
  6. package/lib/browserforce.js +194 -0
  7. package/lib/browserforce.js.map +1 -0
  8. package/lib/commands/browserforce/apply.d.ts +10 -0
  9. package/lib/commands/browserforce/apply.js +54 -0
  10. package/lib/commands/browserforce/apply.js.map +1 -0
  11. package/lib/commands/browserforce/plan.d.ts +10 -0
  12. package/lib/commands/browserforce/plan.js +56 -0
  13. package/lib/commands/browserforce/plan.js.map +1 -0
  14. package/lib/config-parser.d.ts +16 -0
  15. package/lib/config-parser.js +24 -0
  16. package/lib/config-parser.js.map +1 -0
  17. package/lib/index.d.ts +1 -0
  18. package/lib/index.js +2 -0
  19. package/lib/index.js.map +1 -0
  20. package/lib/jsforce-utils.d.ts +5 -0
  21. package/lib/jsforce-utils.js +14 -0
  22. package/lib/jsforce-utils.js.map +1 -0
  23. package/lib/pages/login.d.ts +8 -0
  24. package/lib/pages/login.js +39 -0
  25. package/lib/pages/login.js.map +1 -0
  26. package/lib/plugin.d.ts +17 -0
  27. package/lib/plugin.js +30 -0
  28. package/lib/plugin.js.map +1 -0
  29. package/lib/plugins/activity-settings/index.d.ts +9 -0
  30. package/lib/plugins/activity-settings/index.e2e-spec.d.ts +1 -0
  31. package/lib/plugins/activity-settings/index.e2e-spec.js +36 -0
  32. package/lib/plugins/activity-settings/index.e2e-spec.js.map +1 -0
  33. package/lib/plugins/activity-settings/index.js +34 -0
  34. package/lib/plugins/activity-settings/index.js.map +1 -0
  35. package/lib/plugins/company-information/index.d.ts +8 -0
  36. package/lib/plugins/company-information/index.e2e-spec.d.ts +1 -0
  37. package/lib/plugins/company-information/index.e2e-spec.js +37 -0
  38. package/lib/plugins/company-information/index.e2e-spec.js.map +1 -0
  39. package/lib/plugins/company-information/index.js +60 -0
  40. package/lib/plugins/company-information/index.js.map +1 -0
  41. package/lib/plugins/customer-portal/available-custom-objects/index.d.ts +14 -0
  42. package/lib/plugins/customer-portal/available-custom-objects/index.js +114 -0
  43. package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -0
  44. package/lib/plugins/customer-portal/available-custom-objects/index.test.d.ts +1 -0
  45. package/lib/plugins/customer-portal/available-custom-objects/index.test.js +39 -0
  46. package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +1 -0
  47. package/lib/plugins/customer-portal/enabled/index.d.ts +6 -0
  48. package/lib/plugins/customer-portal/enabled/index.js +26 -0
  49. package/lib/plugins/customer-portal/enabled/index.js.map +1 -0
  50. package/lib/plugins/customer-portal/enabled/index.test.d.ts +1 -0
  51. package/lib/plugins/customer-portal/enabled/index.test.js +34 -0
  52. package/lib/plugins/customer-portal/enabled/index.test.js.map +1 -0
  53. package/lib/plugins/customer-portal/index.d.ts +15 -0
  54. package/lib/plugins/customer-portal/index.e2e-spec.d.ts +1 -0
  55. package/lib/plugins/customer-portal/index.e2e-spec.js +202 -0
  56. package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -0
  57. package/lib/plugins/customer-portal/index.js +59 -0
  58. package/lib/plugins/customer-portal/index.js.map +1 -0
  59. package/lib/plugins/customer-portal/index.test.d.ts +1 -0
  60. package/lib/plugins/customer-portal/index.test.js +84 -0
  61. package/lib/plugins/customer-portal/index.test.js.map +1 -0
  62. package/lib/plugins/customer-portal/portals/index.d.ts +25 -0
  63. package/lib/plugins/customer-portal/portals/index.js +216 -0
  64. package/lib/plugins/customer-portal/portals/index.js.map +1 -0
  65. package/lib/plugins/customer-portal/portals/index.test.d.ts +1 -0
  66. package/lib/plugins/customer-portal/portals/index.test.js +140 -0
  67. package/lib/plugins/customer-portal/portals/index.test.js.map +1 -0
  68. package/lib/plugins/density-settings/index.d.ts +10 -0
  69. package/lib/plugins/density-settings/index.e2e-spec.d.ts +1 -0
  70. package/lib/plugins/density-settings/index.e2e-spec.js +39 -0
  71. package/lib/plugins/density-settings/index.e2e-spec.js.map +1 -0
  72. package/lib/plugins/density-settings/index.js +54 -0
  73. package/lib/plugins/density-settings/index.js.map +1 -0
  74. package/lib/plugins/deprecated.d.ts +4 -0
  75. package/lib/plugins/deprecated.js +28 -0
  76. package/lib/plugins/deprecated.js.map +1 -0
  77. package/lib/plugins/email-deliverability/index.d.ts +9 -0
  78. package/lib/plugins/email-deliverability/index.e2e-spec.d.ts +1 -0
  79. package/lib/plugins/email-deliverability/index.e2e-spec.js +55 -0
  80. package/lib/plugins/email-deliverability/index.e2e-spec.js.map +1 -0
  81. package/lib/plugins/email-deliverability/index.js +42 -0
  82. package/lib/plugins/email-deliverability/index.js.map +1 -0
  83. package/lib/plugins/high-velocity-sales-settings/index.d.ts +10 -0
  84. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.d.ts +1 -0
  85. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js +29 -0
  86. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +1 -0
  87. package/lib/plugins/high-velocity-sales-settings/index.js +42 -0
  88. package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -0
  89. package/lib/plugins/high-velocity-sales-settings/page.d.ts +7 -0
  90. package/lib/plugins/high-velocity-sales-settings/page.js +28 -0
  91. package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -0
  92. package/lib/plugins/history-tracking/index.d.ts +17 -0
  93. package/lib/plugins/history-tracking/index.e2e-spec.d.ts +1 -0
  94. package/lib/plugins/history-tracking/index.e2e-spec.js +106 -0
  95. package/lib/plugins/history-tracking/index.e2e-spec.js.map +1 -0
  96. package/lib/plugins/history-tracking/index.js +176 -0
  97. package/lib/plugins/history-tracking/index.js.map +1 -0
  98. package/lib/plugins/home-page-layouts/index.d.ts +14 -0
  99. package/lib/plugins/home-page-layouts/index.e2e-spec.d.ts +1 -0
  100. package/lib/plugins/home-page-layouts/index.e2e-spec.js +47 -0
  101. package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +1 -0
  102. package/lib/plugins/home-page-layouts/index.js +94 -0
  103. package/lib/plugins/home-page-layouts/index.js.map +1 -0
  104. package/lib/plugins/home-page-layouts/index.test.d.ts +1 -0
  105. package/lib/plugins/home-page-layouts/index.test.js +104 -0
  106. package/lib/plugins/home-page-layouts/index.test.js.map +1 -0
  107. package/lib/plugins/index.d.ts +24 -0
  108. package/lib/plugins/index.js +25 -0
  109. package/lib/plugins/index.js.map +1 -0
  110. package/lib/plugins/lightning-experience-settings/index.d.ts +18 -0
  111. package/lib/plugins/lightning-experience-settings/index.e2e-spec.d.ts +1 -0
  112. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +40 -0
  113. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -0
  114. package/lib/plugins/lightning-experience-settings/index.js +101 -0
  115. package/lib/plugins/lightning-experience-settings/index.js.map +1 -0
  116. package/lib/plugins/linkedin-sales-navigator-settings/index.d.ts +8 -0
  117. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.d.ts +1 -0
  118. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js +29 -0
  119. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js.map +1 -0
  120. package/lib/plugins/linkedin-sales-navigator-settings/index.js +15 -0
  121. package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -0
  122. package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +10 -0
  123. package/lib/plugins/linkedin-sales-navigator-settings/page.js +42 -0
  124. package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -0
  125. package/lib/plugins/omni-channel-settings/index.d.ts +9 -0
  126. package/lib/plugins/omni-channel-settings/index.e2e-spec.d.ts +1 -0
  127. package/lib/plugins/omni-channel-settings/index.e2e-spec.js +30 -0
  128. package/lib/plugins/omni-channel-settings/index.e2e-spec.js.map +1 -0
  129. package/lib/plugins/omni-channel-settings/index.js +21 -0
  130. package/lib/plugins/omni-channel-settings/index.js.map +1 -0
  131. package/lib/plugins/opportunity-splits/index.d.ts +9 -0
  132. package/lib/plugins/opportunity-splits/index.e2e-spec.d.ts +1 -0
  133. package/lib/plugins/opportunity-splits/index.e2e-spec.js +46 -0
  134. package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +1 -0
  135. package/lib/plugins/opportunity-splits/index.js +32 -0
  136. package/lib/plugins/opportunity-splits/index.js.map +1 -0
  137. package/lib/plugins/opportunity-splits/pages/layout-selection.d.ts +8 -0
  138. package/lib/plugins/opportunity-splits/pages/layout-selection.js +15 -0
  139. package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +1 -0
  140. package/lib/plugins/opportunity-splits/pages/overview.d.ts +10 -0
  141. package/lib/plugins/opportunity-splits/pages/overview.js +33 -0
  142. package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -0
  143. package/lib/plugins/opportunity-splits/pages/setup.d.ts +8 -0
  144. package/lib/plugins/opportunity-splits/pages/setup.js +17 -0
  145. package/lib/plugins/opportunity-splits/pages/setup.js.map +1 -0
  146. package/lib/plugins/permission-sets/index.d.ts +10 -0
  147. package/lib/plugins/permission-sets/index.e2e-spec.d.ts +1 -0
  148. package/lib/plugins/permission-sets/index.e2e-spec.js +47 -0
  149. package/lib/plugins/permission-sets/index.e2e-spec.js.map +1 -0
  150. package/lib/plugins/permission-sets/index.js +22 -0
  151. package/lib/plugins/permission-sets/index.js.map +1 -0
  152. package/lib/plugins/permission-sets/service-presence-status/index.d.ts +10 -0
  153. package/lib/plugins/permission-sets/service-presence-status/index.js +67 -0
  154. package/lib/plugins/permission-sets/service-presence-status/index.js.map +1 -0
  155. package/lib/plugins/picklists/field-dependencies/index.d.ts +11 -0
  156. package/lib/plugins/picklists/field-dependencies/index.js +56 -0
  157. package/lib/plugins/picklists/field-dependencies/index.js.map +1 -0
  158. package/lib/plugins/picklists/field-dependencies/index.test.d.ts +1 -0
  159. package/lib/plugins/picklists/field-dependencies/index.test.js +64 -0
  160. package/lib/plugins/picklists/field-dependencies/index.test.js.map +1 -0
  161. package/lib/plugins/picklists/field-dependencies/pages.d.ts +14 -0
  162. package/lib/plugins/picklists/field-dependencies/pages.js +49 -0
  163. package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -0
  164. package/lib/plugins/picklists/index.d.ts +23 -0
  165. package/lib/plugins/picklists/index.e2e-spec.d.ts +1 -0
  166. package/lib/plugins/picklists/index.e2e-spec.js +100 -0
  167. package/lib/plugins/picklists/index.e2e-spec.js.map +1 -0
  168. package/lib/plugins/picklists/index.js +153 -0
  169. package/lib/plugins/picklists/index.js.map +1 -0
  170. package/lib/plugins/picklists/pages.d.ts +41 -0
  171. package/lib/plugins/picklists/pages.js +166 -0
  172. package/lib/plugins/picklists/pages.js.map +1 -0
  173. package/lib/plugins/picklists/standard-value-set.d.ts +1 -0
  174. package/lib/plugins/picklists/standard-value-set.js +80 -0
  175. package/lib/plugins/picklists/standard-value-set.js.map +1 -0
  176. package/lib/plugins/record-types/index.d.ts +13 -0
  177. package/lib/plugins/record-types/index.e2e-spec.d.ts +1 -0
  178. package/lib/plugins/record-types/index.e2e-spec.js +73 -0
  179. package/lib/plugins/record-types/index.e2e-spec.js.map +1 -0
  180. package/lib/plugins/record-types/index.js +70 -0
  181. package/lib/plugins/record-types/index.js.map +1 -0
  182. package/lib/plugins/record-types/pages.d.ts +15 -0
  183. package/lib/plugins/record-types/pages.js +56 -0
  184. package/lib/plugins/record-types/pages.js.map +1 -0
  185. package/lib/plugins/relate-contact-to-multiple-accounts/index.d.ts +11 -0
  186. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.d.ts +1 -0
  187. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js +29 -0
  188. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +1 -0
  189. package/lib/plugins/relate-contact-to-multiple-accounts/index.js +62 -0
  190. package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -0
  191. package/lib/plugins/reports-and-dashboards/folder-sharing/index.d.ts +8 -0
  192. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.d.ts +1 -0
  193. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js +3 -0
  194. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js.map +1 -0
  195. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +55 -0
  196. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -0
  197. package/lib/plugins/reports-and-dashboards/index.d.ts +11 -0
  198. package/lib/plugins/reports-and-dashboards/index.e2e-spec.d.ts +1 -0
  199. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js +3 -0
  200. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js.map +1 -0
  201. package/lib/plugins/reports-and-dashboards/index.js +29 -0
  202. package/lib/plugins/reports-and-dashboards/index.js.map +1 -0
  203. package/lib/plugins/salesforce-cpq-config/formConfig.d.ts +17 -0
  204. package/lib/plugins/salesforce-cpq-config/formConfig.js +649 -0
  205. package/lib/plugins/salesforce-cpq-config/formConfig.js.map +1 -0
  206. package/lib/plugins/salesforce-cpq-config/index.d.ts +7 -0
  207. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.d.ts +1 -0
  208. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js +37 -0
  209. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js.map +1 -0
  210. package/lib/plugins/salesforce-cpq-config/index.js +214 -0
  211. package/lib/plugins/salesforce-cpq-config/index.js.map +1 -0
  212. package/lib/plugins/salesforce-to-salesforce/index.d.ts +9 -0
  213. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.d.ts +1 -0
  214. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js +35 -0
  215. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -0
  216. package/lib/plugins/salesforce-to-salesforce/index.js +36 -0
  217. package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -0
  218. package/lib/plugins/security/authentication-configuration/index.d.ts +11 -0
  219. package/lib/plugins/security/authentication-configuration/index.e2e-spec.d.ts +1 -0
  220. package/lib/plugins/security/authentication-configuration/index.e2e-spec.js +101 -0
  221. package/lib/plugins/security/authentication-configuration/index.e2e-spec.js.map +1 -0
  222. package/lib/plugins/security/authentication-configuration/index.js +67 -0
  223. package/lib/plugins/security/authentication-configuration/index.js.map +1 -0
  224. package/lib/plugins/security/certificate-and-key-management/index.d.ts +23 -0
  225. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.d.ts +1 -0
  226. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js +63 -0
  227. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js.map +1 -0
  228. package/lib/plugins/security/certificate-and-key-management/index.js +154 -0
  229. package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -0
  230. package/lib/plugins/security/certificate-and-key-management/index.test.d.ts +1 -0
  231. package/lib/plugins/security/certificate-and-key-management/index.test.js +61 -0
  232. package/lib/plugins/security/certificate-and-key-management/index.test.js.map +1 -0
  233. package/lib/plugins/security/index.d.ts +13 -0
  234. package/lib/plugins/security/index.js +42 -0
  235. package/lib/plugins/security/index.js.map +1 -0
  236. package/lib/plugins/service-channels/capacity/index.d.ts +18 -0
  237. package/lib/plugins/service-channels/capacity/index.js +162 -0
  238. package/lib/plugins/service-channels/capacity/index.js.map +1 -0
  239. package/lib/plugins/service-channels/index.d.ts +12 -0
  240. package/lib/plugins/service-channels/index.e2e-spec.d.ts +1 -0
  241. package/lib/plugins/service-channels/index.e2e-spec.js +61 -0
  242. package/lib/plugins/service-channels/index.e2e-spec.js.map +1 -0
  243. package/lib/plugins/service-channels/index.js +38 -0
  244. package/lib/plugins/service-channels/index.js.map +1 -0
  245. package/lib/plugins/slack/index.d.ts +9 -0
  246. package/lib/plugins/slack/index.e2e-spec.d.ts +1 -0
  247. package/lib/plugins/slack/index.e2e-spec.js +47 -0
  248. package/lib/plugins/slack/index.e2e-spec.js.map +1 -0
  249. package/lib/plugins/slack/index.js +46 -0
  250. package/lib/plugins/slack/index.js.map +1 -0
  251. package/lib/plugins/user-access-policies/index.d.ts +19 -0
  252. package/lib/plugins/user-access-policies/index.e2e-spec.d.ts +1 -0
  253. package/lib/plugins/user-access-policies/index.e2e-spec.js +63 -0
  254. package/lib/plugins/user-access-policies/index.e2e-spec.js.map +1 -0
  255. package/lib/plugins/user-access-policies/index.js +107 -0
  256. package/lib/plugins/user-access-policies/index.js.map +1 -0
  257. package/lib/plugins/user-access-policies/page.d.ts +29 -0
  258. package/lib/plugins/user-access-policies/page.js +115 -0
  259. package/lib/plugins/user-access-policies/page.js.map +1 -0
  260. package/lib/plugins/utils.d.ts +3 -0
  261. package/lib/plugins/utils.js +47 -0
  262. package/lib/plugins/utils.js.map +1 -0
  263. package/oclif.manifest.json +153 -0
  264. package/package.json +2 -2
@@ -0,0 +1,140 @@
1
+ import assert from 'assert';
2
+ import { CustomerPortalSetup } from './index.js';
3
+ const tests = [
4
+ {
5
+ description: 'should only return necessary portal fields',
6
+ source: [
7
+ {
8
+ _id: 'p1',
9
+ name: 'Customer Portal',
10
+ description: 'Customer Portal',
11
+ adminUser: 'User User',
12
+ isSelfRegistrationActivated: true,
13
+ selfRegUserDefaultLicense: 'Customer Portal Manager Custom',
14
+ selfRegUserDefaultRole: 'User',
15
+ selfRegUserDefaultProfile: 'Customer Portal Manager Custom',
16
+ },
17
+ ],
18
+ target: [
19
+ {
20
+ name: 'Customer Portal',
21
+ description: 'new description',
22
+ },
23
+ ],
24
+ expected: [
25
+ {
26
+ _id: 'p1',
27
+ name: 'Customer Portal',
28
+ description: 'new description',
29
+ },
30
+ ],
31
+ },
32
+ {
33
+ description: 'should only return portal and portalProfileMemberships fields',
34
+ source: [
35
+ {
36
+ name: 'Customer Portal',
37
+ description: 'Customer Portal',
38
+ adminUser: 'User User',
39
+ portalProfileMemberships: [
40
+ {
41
+ name: 'Customer Portal Manager Standard',
42
+ active: true,
43
+ _id: 'a1',
44
+ },
45
+ ],
46
+ _id: 'p1',
47
+ },
48
+ ],
49
+ target: [
50
+ {
51
+ name: 'Customer Portal',
52
+ portalProfileMemberships: [
53
+ {
54
+ name: 'Customer Portal Manager Standard',
55
+ active: false,
56
+ },
57
+ ],
58
+ },
59
+ ],
60
+ expected: [
61
+ {
62
+ _id: 'p1',
63
+ name: 'Customer Portal',
64
+ portalProfileMemberships: [
65
+ {
66
+ _id: 'a1',
67
+ name: 'Customer Portal Manager Standard',
68
+ active: false,
69
+ },
70
+ ],
71
+ },
72
+ ],
73
+ },
74
+ {
75
+ description: 'should detect a renamed portal',
76
+ source: [
77
+ {
78
+ name: 'Customer Portal',
79
+ description: 'Customer Portal',
80
+ adminUser: 'User User',
81
+ portalProfileMemberships: [],
82
+ _id: 'p1',
83
+ },
84
+ ],
85
+ target: [
86
+ {
87
+ name: 'Foo Portal',
88
+ oldName: 'Customer Portal',
89
+ },
90
+ ],
91
+ expected: [
92
+ {
93
+ _id: 'p1',
94
+ name: 'Foo Portal',
95
+ },
96
+ ],
97
+ },
98
+ {
99
+ description: 'should return no change',
100
+ source: [
101
+ {
102
+ name: 'Customer Portal',
103
+ description: 'Customer Portal',
104
+ adminUser: 'User User',
105
+ portalProfileMemberships: [
106
+ {
107
+ name: 'Customer Portal Manager Standard',
108
+ active: true,
109
+ _id: 'a1',
110
+ },
111
+ ],
112
+ _id: 'p1',
113
+ },
114
+ ],
115
+ target: [
116
+ {
117
+ name: 'Customer Portal',
118
+ portalProfileMemberships: [
119
+ {
120
+ name: 'Customer Portal Manager Standard',
121
+ active: true,
122
+ },
123
+ ],
124
+ },
125
+ ],
126
+ expected: undefined,
127
+ },
128
+ ];
129
+ describe('CustomerPortalSetup', () => {
130
+ describe('diff()', () => {
131
+ const p = new CustomerPortalSetup(global.bf);
132
+ for (const t of tests) {
133
+ it(t.description, () => {
134
+ const actual = p.diff(t.source, t.target);
135
+ assert.deepStrictEqual(actual, t.expected);
136
+ });
137
+ }
138
+ });
139
+ });
140
+ //# sourceMappingURL=index.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/plugins/customer-portal/portals/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,KAAK,GAAG;IACZ;QACE,WAAW,EAAE,4CAA4C;QACzD,MAAM,EAAE;YACN;gBACE,GAAG,EAAE,IAAI;gBACT,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,iBAAiB;gBAC9B,SAAS,EAAE,WAAW;gBACtB,2BAA2B,EAAE,IAAI;gBACjC,yBAAyB,EAAE,gCAAgC;gBAC3D,sBAAsB,EAAE,MAAM;gBAC9B,yBAAyB,EAAE,gCAAgC;aAC5D;SACF;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,iBAAiB;aAC/B;SACF;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,IAAI;gBACT,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,iBAAiB;aAC/B;SACF;KACF;IACD;QACE,WAAW,EACT,+DAA+D;QACjE,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,iBAAiB;gBAC9B,SAAS,EAAE,WAAW;gBACtB,wBAAwB,EAAE;oBACxB;wBACE,IAAI,EAAE,kCAAkC;wBACxC,MAAM,EAAE,IAAI;wBACZ,GAAG,EAAE,IAAI;qBACV;iBACF;gBACD,GAAG,EAAE,IAAI;aACV;SACF;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,iBAAiB;gBACvB,wBAAwB,EAAE;oBACxB;wBACE,IAAI,EAAE,kCAAkC;wBACxC,MAAM,EAA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E,CAAC,CAAC;QAC7C,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE;gBACrB,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;gBAC1C,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ type Config = {
3
+ density: string;
4
+ };
5
+ export declare class DensitySettings extends BrowserforcePlugin {
6
+ retrieve(): Promise<Config>;
7
+ apply(config: Config): Promise<void>;
8
+ private getSelectedDensity;
9
+ }
10
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ import assert from 'assert';
2
+ import { DensitySettings } from './index.js';
3
+ describe(DensitySettings.name, function () {
4
+ let plugin;
5
+ before(() => {
6
+ plugin = new DensitySettings(global.bf);
7
+ });
8
+ const configComfy = {
9
+ density: 'Comfy',
10
+ };
11
+ const configCompact = { density: 'Compact' };
12
+ it('should set to Compact', async () => {
13
+ await plugin.run(configCompact);
14
+ });
15
+ it('should be set to Compact', async () => {
16
+ const res = await plugin.retrieve();
17
+ assert.deepStrictEqual(res, configCompact);
18
+ });
19
+ it('should set to Comfy', async () => {
20
+ await plugin.apply(configComfy);
21
+ });
22
+ it('should be set to Comfy', async () => {
23
+ const res = await plugin.retrieve();
24
+ assert.deepStrictEqual(res, configComfy);
25
+ });
26
+ it('should throw for invalid density', async () => {
27
+ let err;
28
+ try {
29
+ await plugin.run({ density: 'Foo' });
30
+ }
31
+ catch (e) {
32
+ err = e;
33
+ }
34
+ assert.throws(() => {
35
+ throw err;
36
+ }, /Could not find density/);
37
+ });
38
+ });
39
+ //# sourceMappingURL=index.e2e-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/density-settings/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,EAAE,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG;QAClB,OAAO,EAAE,OAAO;KACjB,CAAC;IACF,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAE7C,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE;QACxC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;QACnC,MAAM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,IAAI,GAAG,CAAC;QACR,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,GAAG,GAAG,CAAC,CAAC;QACV,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACjB,MAAM,GAAG,CAAC;QACZ,CAAC,EAAE,wBAAwB,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ const BASE_PATH = 'lightning/setup/DensitySetup/home';
3
+ export class DensitySettings extends BrowserforcePlugin {
4
+ async retrieve() {
5
+ const page = await this.browserforce.openPage(BASE_PATH);
6
+ const density = await this.getSelectedDensity(page);
7
+ await page.close();
8
+ return {
9
+ density,
10
+ };
11
+ }
12
+ async apply(config) {
13
+ const page = await this.browserforce.openPage(BASE_PATH);
14
+ // Find the radio button by its value attribute
15
+ const radioButton = page.getByRole('img', { name: config.density });
16
+ // Wait for the radio button to be attached to the DOM
17
+ try {
18
+ await radioButton.waitFor({ state: 'attached', timeout: 10000 });
19
+ }
20
+ catch (error) {
21
+ const allRadios = await page.getByRole('radio').all();
22
+ const radioValues = await Promise.all(allRadios.map(async (radio) => {
23
+ try {
24
+ return await radio.getAttribute('value');
25
+ }
26
+ catch {
27
+ return 'unknown';
28
+ }
29
+ }));
30
+ throw new Error(`Could not find density "${config.density}". Available options: ${radioValues.filter(Boolean).join(', ')}`);
31
+ }
32
+ // Click the radio button with force to bypass label interception
33
+ await radioButton.click();
34
+ await this.browserforce.waitForIdle(page);
35
+ await page.close();
36
+ }
37
+ async getSelectedDensity(page) {
38
+ // Density options are represented as radio buttons with accessible names
39
+ const densityOptions = ['Comfy', 'Compact'];
40
+ for (const densityName of densityOptions) {
41
+ // Find the radio button by its accessible name (starts with the density name)
42
+ // Example: "Comfy Comfy For users who want a spacious view..."
43
+ const radioButton = page.getByRole('radio', {
44
+ name: new RegExp(`^${densityName}`, 'i'),
45
+ });
46
+ // Check if this radio button is checked
47
+ if (await radioButton.isChecked()) {
48
+ return densityName;
49
+ }
50
+ }
51
+ throw new Error('No density option is selected');
52
+ }
53
+ }
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/density-settings/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,mCAAmC,CAAC;AAMtD,MAAM,OAAO,eAAgB,SAAQ,kBAAkB;IAC9C,KAAK,CAAC,QAAQ;QACnB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACpD,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QACnB,OAAO;YACL,OAAO;SACR,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;QAC/B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAEzD,+CAA+C;QAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAEpE,sDAAsD;QACtD,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACnE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO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[];
2
+ export declare const handleDeprecations: (definition: {
3
+ settings: unknown;
4
+ }) => void;
@@ -0,0 +1,28 @@
1
+ export const DEPRECATED_DRIVERS = ['communities', 'defer-sharing-calculation'];
2
+ export const handleDeprecations = (definition) => {
3
+ for (const driverName of Object.keys(definition.settings)) {
4
+ if (DEPRECATED_DRIVERS.includes(driverName)) {
5
+ throw new Error(`The sfdx-browserforce-plugin setting '${driverName}' is deprecated and has been removed.
6
+ ✅ Salesforce now supports this setting in the Metadata API.
7
+ 👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#${driverName}.`);
8
+ }
9
+ if (driverName === 'security') {
10
+ if (definition.settings[driverName]?.loginAccessPolicies !== undefined) {
11
+ throw new Error(`The sfdx-browserforce-plugin setting 'security.loginAccessPolicies' is deprecated and has been removed.
12
+ ✅ Salesforce now supports this setting in the Metadata API.
13
+ 👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#security-loginaccesspolicies-administratorscanloginasanyuser.`);
14
+ }
15
+ if (definition.settings[driverName]?.identityProvider !== undefined) {
16
+ throw new Error(`The sfdx-browserforce-plugin setting 'security.identityProvider' is deprecated and has been removed.
17
+ ✅ Salesforce now supports this setting in the Metadata API.
18
+ 👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#security-identityprovider.`);
19
+ }
20
+ if (definition.settings[driverName]?.sharing !== undefined) {
21
+ throw new Error(`The sfdx-browserforce-plugin setting 'security.sharing' is deprecated and has been removed.
22
+ ✅ Salesforce now supports this setting in the Metadata API.
23
+ 👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#security-sharing.`);
24
+ }
25
+ }
26
+ }
27
+ };
28
+ //# sourceMappingURL=deprecated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../src/plugins/deprecated.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,aAAa,EAAE,2BAA2B,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAiC,EAAE,EAAE;IACtE,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1D,IAAI,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CACb,yCAAyC,UAAU;;0GAE+C,UAAU,GAAG,CAChH,CAAC;QACJ,CAAC;QACD,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;YAC9B,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,KAAK,SAAS,EAAE,CAAC;gBACvE,MAAM,IAAI,KAAK,CACb;;sKAE4J,CAC7J,CAAC;YACJ,CAAC;YACD,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACpE,MAAM,IAAI,KAAK,CACb;;mIAEyH,CAC1H,CAAC;YACJ,CAAC;YACD,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC3D,MAAM,IAAI,KAAK,CACb;;0HAEgH,CACjH,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ type Config = {
3
+ accessLevel: string;
4
+ };
5
+ export declare class EmailDeliverability extends BrowserforcePlugin {
6
+ retrieve(definition?: Config): Promise<Config>;
7
+ apply(config: Config): Promise<void>;
8
+ }
9
+ export {};
@@ -0,0 +1,55 @@
1
+ import assert from 'assert';
2
+ import { EmailDeliverability } from './index.js';
3
+ describe(EmailDeliverability.name, function () {
4
+ let plugin;
5
+ before(() => {
6
+ plugin = new EmailDeliverability(global.bf);
7
+ });
8
+ const configNone = {
9
+ accessLevel: 'No access',
10
+ };
11
+ const configAll = {
12
+ accessLevel: 'All email',
13
+ };
14
+ const configSystem = {
15
+ accessLevel: 'System email only',
16
+ };
17
+ const configInvalid = {
18
+ accessLevel: 'Invalid',
19
+ };
20
+ // Note order is important here, the scratch org will be created with all access set, I have placed last so if a scratch is reused at least it is in the same state
21
+ it('should set "no access"', async () => {
22
+ await plugin.run(configNone);
23
+ });
24
+ it('should already be set to "no access"', async () => {
25
+ const res = await plugin.retrieve();
26
+ assert.deepStrictEqual(res, configNone);
27
+ });
28
+ it('should set "system only"', async () => {
29
+ await plugin.apply(configSystem);
30
+ });
31
+ it('should be set to "system only"', async () => {
32
+ const res = await plugin.retrieve();
33
+ assert.deepStrictEqual(res, configSystem);
34
+ });
35
+ it('should apply all email', async () => {
36
+ await plugin.apply(configAll);
37
+ });
38
+ it('should already be have all enabled', async () => {
39
+ const res = await plugin.retrieve();
40
+ assert.deepStrictEqual(res, configAll);
41
+ });
42
+ it('should error on invalid input', async () => {
43
+ let err;
44
+ try {
45
+ await plugin.apply(configInvalid);
46
+ }
47
+ catch (e) {
48
+ err = e;
49
+ }
50
+ assert.throws(() => {
51
+ throw err;
52
+ }, /Invalid email access level/);
53
+ });
54
+ });
55
+ //# sourceMappingURL=index.e2e-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/email-deliverability/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,MAA2B,CAAC;IAChC,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC,CAAC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;IACH,EAAE,CAAC,+BAA+B,EAAE,KAAK,IAAI,EAAE;QAC7C,IAAI,GAAG,CAAC;QACR,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACpC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,GAAG,GAAG,CAAC,CAAC;QACV,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACjB,MAAM,GAAG,CAAC;QACZ,CAAC,EAAE,4BAA4B,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ const BASE_PATH = 'email-admin/editOrgEmailSettings.apexp';
3
+ const ACCESS_LEVEL_SELECTOR = 'select[id$=":sendEmailAccessControlSelect"]';
4
+ const CONFIRM_MESSAGE_SELECTOR = 'span[id$=":successText"]';
5
+ const SAVE_BUTTON_SELECTOR = 'input[id$=":saveBtn"]';
6
+ const ACCESS_LEVEL_VALUES = new Map([
7
+ ['No access', '0'],
8
+ ['System email only', '1'],
9
+ ['All email', '2'],
10
+ ]);
11
+ export class EmailDeliverability extends BrowserforcePlugin {
12
+ async retrieve(definition) {
13
+ const page = await this.browserforce.openPage(BASE_PATH);
14
+ await page.locator(ACCESS_LEVEL_SELECTOR).waitFor();
15
+ const selectedOption = await page
16
+ .locator(`${ACCESS_LEVEL_SELECTOR} > option[selected]`)
17
+ .first()
18
+ .textContent();
19
+ await page.close();
20
+ if (!selectedOption) {
21
+ throw new Error('Selected access level not found...');
22
+ }
23
+ return {
24
+ accessLevel: selectedOption,
25
+ };
26
+ }
27
+ async apply(config) {
28
+ const accessLevelNumber = ACCESS_LEVEL_VALUES.get(config.accessLevel);
29
+ if (accessLevelNumber === undefined) {
30
+ throw new Error(`Invalid email access level ${config.accessLevel}`);
31
+ }
32
+ const page = await this.browserforce.openPage(BASE_PATH);
33
+ await page.locator(ACCESS_LEVEL_SELECTOR).waitFor();
34
+ await page.locator(ACCESS_LEVEL_SELECTOR).selectOption(accessLevelNumber);
35
+ await Promise.all([
36
+ page.locator(CONFIRM_MESSAGE_SELECTOR).waitFor(),
37
+ page.locator(SAVE_BUTTON_SELECTOR).click(),
38
+ ]);
39
+ await page.close();
40
+ }
41
+ }
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/email-deliverability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,wCAAwC,CAAC;AAE3D,MAAM,qBAAqB,GAAG,6CAA6C,CAAC;AAC5E,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAErD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,CAAC,WAAW,EAAE,GAAG,CAAC;IAClB,CAAC,mBAAmB,EAAE,GAAG,CAAC;IAC1B,CAAC,WAAW,EAAE,GAAG,CAAC;CACnB,CAAC,CAAC;AAMH,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IAClD,KAAK,CAAC,QAAQ,CAAC,UAAmB;QACvC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzD,MAAM,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,EAAE,CAAC;QACpD,MAAM,cAAc,GAAG,MAAM,IAAI;aAC9B,OAAO,CAAC,GAAG,qBAAqB,qBAAqB,CAAC;aACtD,KAAK,EAAE;aACP,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;QACD,OAAO;YACL,WAAW,EAAE,cAAc;SAC5B,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;QAC/B,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACtE,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QACtE,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzD,MAAM,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,EAAE,CAAC;QACpD,MAAM,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QAC1E,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,OAAO,EAAE;YAChD,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE;SAC3C,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ import { Connection } from '@salesforce/core';
2
+ import { BrowserforcePlugin } from '../../plugin.js';
3
+ export type Config = {
4
+ setUpAndEnable: boolean;
5
+ };
6
+ export declare class HighVelocitySalesSettings extends BrowserforcePlugin {
7
+ retrieve(definition?: Config): Promise<Config>;
8
+ apply(config: Config): Promise<void>;
9
+ }
10
+ export declare function disableHighVelocitySalesUsingMetadata(conn: Connection): Promise<void>;
@@ -0,0 +1,29 @@
1
+ import assert from 'assert';
2
+ import { HighVelocitySalesSettings } from './index.js';
3
+ describe(HighVelocitySalesSettings.name, function () {
4
+ let plugin;
5
+ before(() => {
6
+ plugin = new HighVelocitySalesSettings(global.bf);
7
+ });
8
+ const configEnabled = {
9
+ setUpAndEnable: true,
10
+ };
11
+ const configDisabled = {
12
+ setUpAndEnable: false,
13
+ };
14
+ it('should enable', async () => {
15
+ await plugin.run(configEnabled);
16
+ });
17
+ it('should already 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 already 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/high-velocity-sales-settings/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAU,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE/D,QAAQ,CAAC,yBAAyB,CAAC,IAAI,EAAE;IACvC,IAAI,MAAiC,CAAC;IACtC,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAW;QAC5B,cAAc,EAAE,IAAI;KACrB,CAAC;IACF,MAAM,cAAc,GAAG;QACrB,cAAc,EAAE,KAAK;KACtB,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,2BAA2B,EAAE,KAAK,IAAI,EAAE;QACzC,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,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,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,42 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ import { HighVelocitySalesSetupPage } from './page.js';
3
+ const MSG_NOT_AVAILABLE = `HighVelocitySales is not available in this organization.
4
+ Please add 'HighVelocitySales' to your Scratch Org Features or purchase a license.`;
5
+ export class HighVelocitySalesSettings extends BrowserforcePlugin {
6
+ async retrieve(definition) {
7
+ const conn = this.org.getConnection();
8
+ const result = { setUpAndEnable: false };
9
+ try {
10
+ const settings = await conn.metadata.read('HighVelocitySalesSettings', 'HighVelocitySales');
11
+ result.setUpAndEnable = settings['enableHighVelocitySalesSetup'] === true;
12
+ }
13
+ catch (e) {
14
+ if (/INVALID_TYPE: This type of metadata is not available for this organization/.test(e)) {
15
+ throw new Error(MSG_NOT_AVAILABLE);
16
+ }
17
+ else {
18
+ throw e;
19
+ }
20
+ }
21
+ return result;
22
+ }
23
+ async apply(config) {
24
+ if (config.setUpAndEnable) {
25
+ const page = new HighVelocitySalesSetupPage(await this.browserforce.openPage(HighVelocitySalesSetupPage.getUrl()));
26
+ await page.setUpAndEnable();
27
+ }
28
+ else {
29
+ const conn = this.org.getConnection();
30
+ await disableHighVelocitySalesUsingMetadata(conn);
31
+ }
32
+ }
33
+ }
34
+ export async function disableHighVelocitySalesUsingMetadata(conn) {
35
+ const settings = {
36
+ fullName: 'HighVelocitySales',
37
+ enableHighVelocitySalesSetup: false,
38
+ enableHighVelocitySales: false,
39
+ };
40
+ await conn.metadata.update('HighVelocitySalesSettings', settings);
41
+ }
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/high-velocity-sales-settings/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,iBAAiB,GAAG;mFACyD,CAAC;AAMpF,MAAM,OAAO,yBAA0B,SAAQ,kBAAkB;IACxD,KAAK,CAAC,QAAQ,CAAC,UAAmB;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CACvC,2BAA2B,EAC3B,mBAAmB,CACpB,CAAC;YACF,MAAM,CAAC,cAAc,GAAG,QAAQ,CAAC,8BAA8B,CAAC,KAAK,IAAI,CAAC;QAC5E,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IACE,4EAA4E,CAAC,IAAI,CAC/E,CAAC,CACF,EACD,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;QAC/B,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,IAAI,0BAA0B,CACzC,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,EAAE,CAAC,CACtE,CAAC;YACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YACtC,MAAM,qCAAqC,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,qCAAqC,CACzD,IAAgB;IAEhB,MAAM,QAAQ,GAAG;QACf,QAAQ,EAAE,mBAAmB;QAC7B,4BAA4B,EAAE,KAAK;QACnC,uBAAuB,EAAE,KAAK;KAC/B,CAAC;IACF,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;AACpE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Page } from 'playwright';
2
+ export declare class HighVelocitySalesSetupPage {
3
+ private page;
4
+ constructor(page: Page);
5
+ static getUrl(): string;
6
+ setUpAndEnable(): Promise<void>;
7
+ }
@@ -0,0 +1,28 @@
1
+ import { throwPageErrors } from '../../browserforce.js';
2
+ const SET_UP_AND_ENABLE_HVS_BUTTON = 'button.setupAndEnableButton';
3
+ const ENABLE_TOGGLE = '#toggleHighVelocitySalesPref';
4
+ const AUTOMATION_TAB_ITEM = 'lightning-tab-bar li[data-tab-value="automationTab"]';
5
+ export class HighVelocitySalesSetupPage {
6
+ page;
7
+ constructor(page) {
8
+ this.page = page;
9
+ }
10
+ static getUrl() {
11
+ return 'lightning/setup/SalesEngagement/home';
12
+ }
13
+ async setUpAndEnable() {
14
+ await this.page.locator(AUTOMATION_TAB_ITEM).waitFor();
15
+ const tabCount = await this.page.locator(AUTOMATION_TAB_ITEM).count();
16
+ if (tabCount > 0) {
17
+ await this.page.locator(AUTOMATION_TAB_ITEM).click();
18
+ }
19
+ await this.page.locator(SET_UP_AND_ENABLE_HVS_BUTTON).waitFor();
20
+ await Promise.all([
21
+ this.page.locator(ENABLE_TOGGLE).waitFor({ timeout: 90_000 }),
22
+ this.page.locator(SET_UP_AND_ENABLE_HVS_BUTTON).click(),
23
+ ]);
24
+ await throwPageErrors(this.page);
25
+ await this.page.close();
26
+ }
27
+ }
28
+ //# sourceMappingURL=page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/plugins/high-velocity-sales-settings/page.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,4BAA4B,GAAG,6BAA6B,CAAC;AACnE,MAAM,aAAa,GAAG,8BAA8B,CAAC;AACrD,MAAM,mBAAmB,GACvB,sDAAsD,CAAC;AAEzD,MAAM,OAAO,0BAA0B;IAC7B,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,MAAM,CAAC,MAAM;QAClB,OAAO,sCAAsC,CAAC;IAChD,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC;QACvD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,KAAK,EAAE,CAAC;QACtE,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,KAAK,EAAE,CAAC;QACvD,CAAC;QACD,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,OAAO,EAAE,CAAC;QAChE,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;YAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,KAAK,EAAE;SACxD,CAAC,CAAC;QACH,MAAM,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ type HistoryTrackingConfig = {
3
+ objectApiName: string;
4
+ enableHistoryTracking?: boolean;
5
+ fieldHistoryTracking?: FieldHistoryTrackingConfig[];
6
+ };
7
+ export type FieldHistoryTrackingConfig = {
8
+ fieldApiName: string;
9
+ enableHistoryTracking: boolean;
10
+ };
11
+ export declare class HistoryTracking extends BrowserforcePlugin {
12
+ retrieve(definition?: HistoryTrackingConfig[]): Promise<HistoryTrackingConfig[]>;
13
+ apply(plan: HistoryTrackingConfig[]): Promise<void>;
14
+ private getFieldSelectorByFieldApiName;
15
+ private getTableEnumOrIdByObjectApiName;
16
+ }
17
+ export {};
@@ -0,0 +1 @@
1
+ export {};