sfdx-browserforce-plugin 5.0.1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/package.json +2 -5
  2. package/lib/browserforce-command.d.ts +0 -15
  3. package/lib/browserforce-command.js +0 -61
  4. package/lib/browserforce-command.js.map +0 -1
  5. package/lib/browserforce.d.ts +0 -25
  6. package/lib/browserforce.js +0 -169
  7. package/lib/browserforce.js.map +0 -1
  8. package/lib/commands/browserforce/apply.d.ts +0 -10
  9. package/lib/commands/browserforce/apply.js +0 -54
  10. package/lib/commands/browserforce/apply.js.map +0 -1
  11. package/lib/commands/browserforce/plan.d.ts +0 -10
  12. package/lib/commands/browserforce/plan.js +0 -56
  13. package/lib/commands/browserforce/plan.js.map +0 -1
  14. package/lib/config-parser.d.ts +0 -16
  15. package/lib/config-parser.js +0 -24
  16. package/lib/config-parser.js.map +0 -1
  17. package/lib/index.d.ts +0 -1
  18. package/lib/index.js +0 -2
  19. package/lib/index.js.map +0 -1
  20. package/lib/jsforce-utils.d.ts +0 -5
  21. package/lib/jsforce-utils.js +0 -14
  22. package/lib/jsforce-utils.js.map +0 -1
  23. package/lib/pages/login.d.ts +0 -8
  24. package/lib/pages/login.js +0 -39
  25. package/lib/pages/login.js.map +0 -1
  26. package/lib/plugin.d.ts +0 -17
  27. package/lib/plugin.js +0 -30
  28. package/lib/plugin.js.map +0 -1
  29. package/lib/plugins/activity-settings/index.d.ts +0 -9
  30. package/lib/plugins/activity-settings/index.e2e-spec.d.ts +0 -1
  31. package/lib/plugins/activity-settings/index.e2e-spec.js +0 -36
  32. package/lib/plugins/activity-settings/index.e2e-spec.js.map +0 -1
  33. package/lib/plugins/activity-settings/index.js +0 -31
  34. package/lib/plugins/activity-settings/index.js.map +0 -1
  35. package/lib/plugins/company-information/index.d.ts +0 -8
  36. package/lib/plugins/company-information/index.e2e-spec.d.ts +0 -1
  37. package/lib/plugins/company-information/index.e2e-spec.js +0 -37
  38. package/lib/plugins/company-information/index.e2e-spec.js.map +0 -1
  39. package/lib/plugins/company-information/index.js +0 -50
  40. package/lib/plugins/company-information/index.js.map +0 -1
  41. package/lib/plugins/customer-portal/available-custom-objects/index.d.ts +0 -14
  42. package/lib/plugins/customer-portal/available-custom-objects/index.js +0 -114
  43. package/lib/plugins/customer-portal/available-custom-objects/index.js.map +0 -1
  44. package/lib/plugins/customer-portal/available-custom-objects/index.test.d.ts +0 -1
  45. package/lib/plugins/customer-portal/available-custom-objects/index.test.js +0 -39
  46. package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +0 -1
  47. package/lib/plugins/customer-portal/enabled/index.d.ts +0 -6
  48. package/lib/plugins/customer-portal/enabled/index.js +0 -27
  49. package/lib/plugins/customer-portal/enabled/index.js.map +0 -1
  50. package/lib/plugins/customer-portal/enabled/index.test.d.ts +0 -1
  51. package/lib/plugins/customer-portal/enabled/index.test.js +0 -34
  52. package/lib/plugins/customer-portal/enabled/index.test.js.map +0 -1
  53. package/lib/plugins/customer-portal/index.d.ts +0 -15
  54. package/lib/plugins/customer-portal/index.e2e-spec.d.ts +0 -1
  55. package/lib/plugins/customer-portal/index.e2e-spec.js +0 -202
  56. package/lib/plugins/customer-portal/index.e2e-spec.js.map +0 -1
  57. package/lib/plugins/customer-portal/index.js +0 -59
  58. package/lib/plugins/customer-portal/index.js.map +0 -1
  59. package/lib/plugins/customer-portal/index.test.d.ts +0 -1
  60. package/lib/plugins/customer-portal/index.test.js +0 -84
  61. package/lib/plugins/customer-portal/index.test.js.map +0 -1
  62. package/lib/plugins/customer-portal/portals/index.d.ts +0 -25
  63. package/lib/plugins/customer-portal/portals/index.js +0 -180
  64. package/lib/plugins/customer-portal/portals/index.js.map +0 -1
  65. package/lib/plugins/customer-portal/portals/index.test.d.ts +0 -1
  66. package/lib/plugins/customer-portal/portals/index.test.js +0 -140
  67. package/lib/plugins/customer-portal/portals/index.test.js.map +0 -1
  68. package/lib/plugins/density-settings/index.d.ts +0 -17
  69. package/lib/plugins/density-settings/index.e2e-spec.d.ts +0 -1
  70. package/lib/plugins/density-settings/index.e2e-spec.js +0 -39
  71. package/lib/plugins/density-settings/index.e2e-spec.js.map +0 -1
  72. package/lib/plugins/density-settings/index.js +0 -46
  73. package/lib/plugins/density-settings/index.js.map +0 -1
  74. package/lib/plugins/deprecated.d.ts +0 -4
  75. package/lib/plugins/deprecated.js +0 -28
  76. package/lib/plugins/deprecated.js.map +0 -1
  77. package/lib/plugins/email-deliverability/index.d.ts +0 -9
  78. package/lib/plugins/email-deliverability/index.e2e-spec.d.ts +0 -1
  79. package/lib/plugins/email-deliverability/index.e2e-spec.js +0 -55
  80. package/lib/plugins/email-deliverability/index.e2e-spec.js.map +0 -1
  81. package/lib/plugins/email-deliverability/index.js +0 -39
  82. package/lib/plugins/email-deliverability/index.js.map +0 -1
  83. package/lib/plugins/high-velocity-sales-settings/index.d.ts +0 -10
  84. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.d.ts +0 -1
  85. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js +0 -29
  86. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +0 -1
  87. package/lib/plugins/high-velocity-sales-settings/index.js +0 -42
  88. package/lib/plugins/high-velocity-sales-settings/index.js.map +0 -1
  89. package/lib/plugins/high-velocity-sales-settings/page.d.ts +0 -7
  90. package/lib/plugins/high-velocity-sales-settings/page.js +0 -29
  91. package/lib/plugins/high-velocity-sales-settings/page.js.map +0 -1
  92. package/lib/plugins/history-tracking/index.d.ts +0 -17
  93. package/lib/plugins/history-tracking/index.e2e-spec.d.ts +0 -1
  94. package/lib/plugins/history-tracking/index.e2e-spec.js +0 -106
  95. package/lib/plugins/history-tracking/index.e2e-spec.js.map +0 -1
  96. package/lib/plugins/history-tracking/index.js +0 -169
  97. package/lib/plugins/history-tracking/index.js.map +0 -1
  98. package/lib/plugins/home-page-layouts/index.d.ts +0 -14
  99. package/lib/plugins/home-page-layouts/index.e2e-spec.d.ts +0 -1
  100. package/lib/plugins/home-page-layouts/index.e2e-spec.js +0 -47
  101. package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +0 -1
  102. package/lib/plugins/home-page-layouts/index.js +0 -90
  103. package/lib/plugins/home-page-layouts/index.js.map +0 -1
  104. package/lib/plugins/home-page-layouts/index.test.d.ts +0 -1
  105. package/lib/plugins/home-page-layouts/index.test.js +0 -104
  106. package/lib/plugins/home-page-layouts/index.test.js.map +0 -1
  107. package/lib/plugins/index.d.ts +0 -23
  108. package/lib/plugins/index.js +0 -24
  109. package/lib/plugins/index.js.map +0 -1
  110. package/lib/plugins/lightning-experience-settings/index.d.ts +0 -17
  111. package/lib/plugins/lightning-experience-settings/index.e2e-spec.d.ts +0 -1
  112. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +0 -39
  113. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +0 -1
  114. package/lib/plugins/lightning-experience-settings/index.js +0 -61
  115. package/lib/plugins/lightning-experience-settings/index.js.map +0 -1
  116. package/lib/plugins/linkedin-sales-navigator-settings/index.d.ts +0 -8
  117. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.d.ts +0 -1
  118. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js +0 -29
  119. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js.map +0 -1
  120. package/lib/plugins/linkedin-sales-navigator-settings/index.js +0 -15
  121. package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +0 -1
  122. package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +0 -8
  123. package/lib/plugins/linkedin-sales-navigator-settings/page.js +0 -32
  124. package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +0 -1
  125. package/lib/plugins/omni-channel-settings/index.d.ts +0 -9
  126. package/lib/plugins/omni-channel-settings/index.e2e-spec.d.ts +0 -1
  127. package/lib/plugins/omni-channel-settings/index.e2e-spec.js +0 -26
  128. package/lib/plugins/omni-channel-settings/index.e2e-spec.js.map +0 -1
  129. package/lib/plugins/omni-channel-settings/index.js +0 -29
  130. package/lib/plugins/omni-channel-settings/index.js.map +0 -1
  131. package/lib/plugins/opportunity-splits/index.d.ts +0 -9
  132. package/lib/plugins/opportunity-splits/index.e2e-spec.d.ts +0 -1
  133. package/lib/plugins/opportunity-splits/index.e2e-spec.js +0 -46
  134. package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +0 -1
  135. package/lib/plugins/opportunity-splits/index.js +0 -32
  136. package/lib/plugins/opportunity-splits/index.js.map +0 -1
  137. package/lib/plugins/opportunity-splits/pages/layout-selection.d.ts +0 -8
  138. package/lib/plugins/opportunity-splits/pages/layout-selection.js +0 -17
  139. package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +0 -1
  140. package/lib/plugins/opportunity-splits/pages/overview.d.ts +0 -10
  141. package/lib/plugins/opportunity-splits/pages/overview.js +0 -38
  142. package/lib/plugins/opportunity-splits/pages/overview.js.map +0 -1
  143. package/lib/plugins/opportunity-splits/pages/setup.d.ts +0 -8
  144. package/lib/plugins/opportunity-splits/pages/setup.js +0 -19
  145. package/lib/plugins/opportunity-splits/pages/setup.js.map +0 -1
  146. package/lib/plugins/permission-sets/index.d.ts +0 -10
  147. package/lib/plugins/permission-sets/index.e2e-spec.d.ts +0 -1
  148. package/lib/plugins/permission-sets/index.e2e-spec.js +0 -36
  149. package/lib/plugins/permission-sets/index.e2e-spec.js.map +0 -1
  150. package/lib/plugins/permission-sets/index.js +0 -22
  151. package/lib/plugins/permission-sets/index.js.map +0 -1
  152. package/lib/plugins/permission-sets/service-presence-status/index.d.ts +0 -10
  153. package/lib/plugins/permission-sets/service-presence-status/index.js +0 -60
  154. package/lib/plugins/permission-sets/service-presence-status/index.js.map +0 -1
  155. package/lib/plugins/picklists/field-dependencies/index.d.ts +0 -11
  156. package/lib/plugins/picklists/field-dependencies/index.js +0 -56
  157. package/lib/plugins/picklists/field-dependencies/index.js.map +0 -1
  158. package/lib/plugins/picklists/field-dependencies/index.test.d.ts +0 -1
  159. package/lib/plugins/picklists/field-dependencies/index.test.js +0 -64
  160. package/lib/plugins/picklists/field-dependencies/index.test.js.map +0 -1
  161. package/lib/plugins/picklists/field-dependencies/pages.d.ts +0 -14
  162. package/lib/plugins/picklists/field-dependencies/pages.js +0 -57
  163. package/lib/plugins/picklists/field-dependencies/pages.js.map +0 -1
  164. package/lib/plugins/picklists/index.d.ts +0 -23
  165. package/lib/plugins/picklists/index.e2e-spec.d.ts +0 -1
  166. package/lib/plugins/picklists/index.e2e-spec.js +0 -100
  167. package/lib/plugins/picklists/index.e2e-spec.js.map +0 -1
  168. package/lib/plugins/picklists/index.js +0 -153
  169. package/lib/plugins/picklists/index.js.map +0 -1
  170. package/lib/plugins/picklists/pages.d.ts +0 -40
  171. package/lib/plugins/picklists/pages.js +0 -194
  172. package/lib/plugins/picklists/pages.js.map +0 -1
  173. package/lib/plugins/picklists/standard-value-set.d.ts +0 -1
  174. package/lib/plugins/picklists/standard-value-set.js +0 -80
  175. package/lib/plugins/picklists/standard-value-set.js.map +0 -1
  176. package/lib/plugins/record-types/index.d.ts +0 -13
  177. package/lib/plugins/record-types/index.e2e-spec.d.ts +0 -1
  178. package/lib/plugins/record-types/index.e2e-spec.js +0 -73
  179. package/lib/plugins/record-types/index.e2e-spec.js.map +0 -1
  180. package/lib/plugins/record-types/index.js +0 -70
  181. package/lib/plugins/record-types/index.js.map +0 -1
  182. package/lib/plugins/record-types/pages.d.ts +0 -15
  183. package/lib/plugins/record-types/pages.js +0 -64
  184. package/lib/plugins/record-types/pages.js.map +0 -1
  185. package/lib/plugins/relate-contact-to-multiple-accounts/index.d.ts +0 -11
  186. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.d.ts +0 -1
  187. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js +0 -29
  188. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +0 -1
  189. package/lib/plugins/relate-contact-to-multiple-accounts/index.js +0 -72
  190. package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +0 -1
  191. package/lib/plugins/reports-and-dashboards/folder-sharing/index.d.ts +0 -8
  192. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.d.ts +0 -1
  193. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js +0 -3
  194. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js.map +0 -1
  195. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +0 -50
  196. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +0 -1
  197. package/lib/plugins/reports-and-dashboards/index.d.ts +0 -11
  198. package/lib/plugins/reports-and-dashboards/index.e2e-spec.d.ts +0 -1
  199. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js +0 -3
  200. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js.map +0 -1
  201. package/lib/plugins/reports-and-dashboards/index.js +0 -29
  202. package/lib/plugins/reports-and-dashboards/index.js.map +0 -1
  203. package/lib/plugins/salesforce-cpq-config/formConfig.d.ts +0 -17
  204. package/lib/plugins/salesforce-cpq-config/formConfig.js +0 -649
  205. package/lib/plugins/salesforce-cpq-config/formConfig.js.map +0 -1
  206. package/lib/plugins/salesforce-cpq-config/index.d.ts +0 -7
  207. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.d.ts +0 -1
  208. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js +0 -37
  209. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js.map +0 -1
  210. package/lib/plugins/salesforce-cpq-config/index.js +0 -195
  211. package/lib/plugins/salesforce-cpq-config/index.js.map +0 -1
  212. package/lib/plugins/salesforce-to-salesforce/index.d.ts +0 -9
  213. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.d.ts +0 -1
  214. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js +0 -34
  215. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +0 -1
  216. package/lib/plugins/salesforce-to-salesforce/index.js +0 -44
  217. package/lib/plugins/salesforce-to-salesforce/index.js.map +0 -1
  218. package/lib/plugins/security/authentication-configuration/index.d.ts +0 -11
  219. package/lib/plugins/security/authentication-configuration/index.e2e-spec.d.ts +0 -1
  220. package/lib/plugins/security/authentication-configuration/index.e2e-spec.js +0 -101
  221. package/lib/plugins/security/authentication-configuration/index.e2e-spec.js.map +0 -1
  222. package/lib/plugins/security/authentication-configuration/index.js +0 -62
  223. package/lib/plugins/security/authentication-configuration/index.js.map +0 -1
  224. package/lib/plugins/security/certificate-and-key-management/index.d.ts +0 -23
  225. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.d.ts +0 -1
  226. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js +0 -63
  227. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js.map +0 -1
  228. package/lib/plugins/security/certificate-and-key-management/index.js +0 -159
  229. package/lib/plugins/security/certificate-and-key-management/index.js.map +0 -1
  230. package/lib/plugins/security/certificate-and-key-management/index.test.d.ts +0 -1
  231. package/lib/plugins/security/certificate-and-key-management/index.test.js +0 -61
  232. package/lib/plugins/security/certificate-and-key-management/index.test.js.map +0 -1
  233. package/lib/plugins/security/index.d.ts +0 -13
  234. package/lib/plugins/security/index.js +0 -42
  235. package/lib/plugins/security/index.js.map +0 -1
  236. package/lib/plugins/service-channels/capacity/index.d.ts +0 -18
  237. package/lib/plugins/service-channels/capacity/index.js +0 -133
  238. package/lib/plugins/service-channels/capacity/index.js.map +0 -1
  239. package/lib/plugins/service-channels/index.d.ts +0 -12
  240. package/lib/plugins/service-channels/index.e2e-spec.d.ts +0 -1
  241. package/lib/plugins/service-channels/index.e2e-spec.js +0 -57
  242. package/lib/plugins/service-channels/index.e2e-spec.js.map +0 -1
  243. package/lib/plugins/service-channels/index.js +0 -38
  244. package/lib/plugins/service-channels/index.js.map +0 -1
  245. package/lib/plugins/slack/index.d.ts +0 -9
  246. package/lib/plugins/slack/index.e2e-spec.d.ts +0 -1
  247. package/lib/plugins/slack/index.e2e-spec.js +0 -47
  248. package/lib/plugins/slack/index.e2e-spec.js.map +0 -1
  249. package/lib/plugins/slack/index.js +0 -47
  250. package/lib/plugins/slack/index.js.map +0 -1
  251. package/lib/plugins/utils.d.ts +0 -3
  252. package/lib/plugins/utils.js +0 -47
  253. package/lib/plugins/utils.js.map +0 -1
  254. package/oclif.manifest.json +0 -163
@@ -1,202 +0,0 @@
1
- import assert from 'assert';
2
- import * as child from 'child_process';
3
- import { fileURLToPath } from 'node:url';
4
- import * as path from 'path';
5
- import { CustomerPortalAvailableCustomObjects } from './available-custom-objects/index.js';
6
- import { CustomerPortalEnable } from './enabled/index.js';
7
- import { CustomerPortalSetup } from './portals/index.js';
8
- const __dirname = fileURLToPath(new URL('.', import.meta.url));
9
- describe('CustomerPortal', () => {
10
- describe(CustomerPortalEnable.name, function () {
11
- let plugin;
12
- before(() => {
13
- plugin = new CustomerPortalEnable(global.bf);
14
- });
15
- it('should enable', async () => {
16
- await plugin.run(true);
17
- });
18
- it('should be enabled', async () => {
19
- const res = await plugin.retrieve();
20
- assert.deepStrictEqual(res, true);
21
- });
22
- it('should fail to disable', async () => {
23
- let err;
24
- try {
25
- await plugin.run(false);
26
- }
27
- catch (e) {
28
- err = e;
29
- }
30
- assert.throws(() => {
31
- throw err;
32
- }, /cannot be disabled/);
33
- });
34
- });
35
- describe(CustomerPortalSetup.name, function () {
36
- let plugin;
37
- before(() => {
38
- plugin = new CustomerPortalSetup(global.bf);
39
- });
40
- const configSetPortalAdmin = [
41
- {
42
- name: 'Customer Portal',
43
- adminUser: 'User User',
44
- isSelfRegistrationActivated: true,
45
- },
46
- ];
47
- const configSetupPortal = [
48
- {
49
- name: 'Foo Portal',
50
- oldName: 'Customer Portal',
51
- description: 'Foo Portal',
52
- adminUser: 'User User',
53
- isSelfRegistrationActivated: true,
54
- selfRegUserDefaultLicense: 'Customer Portal Manager Custom',
55
- selfRegUserDefaultRole: 'User',
56
- selfRegUserDefaultProfile: 'Customer Portal Manager Custom',
57
- portalProfileMemberships: [
58
- {
59
- name: 'Customer Portal Manager Standard',
60
- active: false,
61
- },
62
- {
63
- name: 'Dummy',
64
- active: true,
65
- },
66
- ],
67
- },
68
- ];
69
- const configRevertPortal = [
70
- {
71
- name: 'Customer Portal',
72
- oldName: 'Foo Portal',
73
- description: 'Customer Portal',
74
- isSelfRegistrationActivated: false,
75
- },
76
- ];
77
- const dir = path.resolve(path.join(__dirname, 'portals'));
78
- it('should fail to set portal admin user without permset', async () => {
79
- let err;
80
- try {
81
- await plugin.run(configSetPortalAdmin);
82
- }
83
- catch (e) {
84
- err = e;
85
- }
86
- assert.throws(() => {
87
- throw err;
88
- }, /This user has insufficient permissions to be a portal administrator/);
89
- });
90
- it('should set up user for portal', async () => {
91
- const sourceDeployCmd = child.spawnSync('sf', [
92
- 'project',
93
- 'deploy',
94
- 'start',
95
- '-d',
96
- path.join(dir, 'sfdx-source'),
97
- '--json',
98
- ]);
99
- assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
100
- const permSetAssignCmd = child.spawnSync('sf', [
101
- 'org',
102
- 'assign',
103
- 'permset',
104
- '-n',
105
- 'Customer_Portal_Admin',
106
- ]);
107
- assert.deepStrictEqual(permSetAssignCmd.status, 0, permSetAssignCmd.output.toString());
108
- });
109
- it('should set up portal', async () => {
110
- await plugin.run(configSetupPortal);
111
- });
112
- it('portal should be set up', async () => {
113
- const res = await plugin.run(configSetupPortal);
114
- assert.deepStrictEqual(res, { message: 'no action necessary' });
115
- });
116
- it('should revert back', async () => {
117
- await plugin.run(configRevertPortal);
118
- });
119
- it('should be reverted back', async () => {
120
- const res = await plugin.run(configRevertPortal);
121
- assert.deepStrictEqual(res, { message: 'no action necessary' });
122
- });
123
- it('should cleanup', async () => {
124
- const conn = global.bf.org.getConnection();
125
- await conn.metadata.delete('Profile', ['Dummy']);
126
- const permSetUnassignCmd = child.spawnSync('sf', [
127
- 'data',
128
- 'delete',
129
- 'record',
130
- '-s',
131
- 'PermissionSetAssignment',
132
- '-w',
133
- 'PermissionSet.Name=Customer_Portal_Admin',
134
- ]);
135
- assert.deepStrictEqual(permSetUnassignCmd.status, 0, permSetUnassignCmd.output.toString());
136
- await conn.metadata.delete('PermissionSet', ['Customer_Portal_Admin']);
137
- });
138
- });
139
- describe(CustomerPortalAvailableCustomObjects.name, function () {
140
- let plugin;
141
- before(() => {
142
- plugin = new CustomerPortalAvailableCustomObjects(global.bf);
143
- });
144
- const configAvailableCustomObjects = [
145
- {
146
- name: 'Dummy',
147
- available: true,
148
- },
149
- ];
150
- const configNonAvailableCustomObjects = [
151
- {
152
- name: 'DummyXYZ',
153
- available: true,
154
- },
155
- ];
156
- const configUnavailableCustomObjects = [
157
- {
158
- name: 'Dummy',
159
- available: false,
160
- },
161
- ];
162
- const dir = path.resolve(path.join(__dirname, 'available-custom-objects'));
163
- it('should fail to make non-existent custom objects available for customer portal', async () => {
164
- let err;
165
- try {
166
- await plugin.run(configNonAvailableCustomObjects);
167
- }
168
- catch (e) {
169
- err = e;
170
- }
171
- assert.throws(() => {
172
- throw err;
173
- }, /Could not find CustomObject/);
174
- });
175
- it('should deploy custom object', () => {
176
- const sourceDeployCmd = child.spawnSync('sf', [
177
- 'project',
178
- 'deploy',
179
- 'start',
180
- '-d',
181
- path.join(dir, 'sfdx-source'),
182
- '--json',
183
- ]);
184
- assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
185
- });
186
- it('should make custom objects available for customer portal', async () => {
187
- await plugin.run(configAvailableCustomObjects);
188
- });
189
- it('should have applied checkbox available for customer portal', async () => {
190
- const res = await plugin.run(configAvailableCustomObjects);
191
- assert.deepStrictEqual(res, { message: 'no action necessary' });
192
- });
193
- it('should make custom objects unavailable for customer portal', async () => {
194
- await plugin.run(configUnavailableCustomObjects);
195
- });
196
- it('should remove the CustomObject', async () => {
197
- const conn = global.bf.org.getConnection();
198
- await conn.metadata.delete('CustomObject', ['Dummy__c']);
199
- });
200
- });
201
- });
202
- //# sourceMappingURL=index.e2e-spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/customer-portal/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,oCAAoC,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,QAAQ,CAAC,oBAAoB,CAAC,IAAI,EAAE;QAClC,IAAI,MAA4B,CAAC;QACjC,MAAM,CAAC,GAAG,EAAE;YACV,MAAM,GAAG,IAAI,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;YAC7B,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,mBAAmB,EAAE,KAAK,IAAI,EAAE;YACjC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC;YACpC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;YAC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,CAAC,CAAC;YACH,MAAM,CAAC,eAAe,CACpB,eAAe,CAAC,MAAM,EACtB,CAAC,EACD,eAAe,CAAC,MAAM,CAAC,QAAQ,EAAE,CAClC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,0DAA0D,EAAE,KAAK,IAAI,EAAE;YACxE,MAAM,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;YAC1E,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC3D,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;YAC1E,MAAM,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;YAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YAC3C,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,59 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin.js';
2
- import { CustomerPortalAvailableCustomObjects, } from './available-custom-objects/index.js';
3
- import { CustomerPortalEnable, } from './enabled/index.js';
4
- import { CustomerPortalSetup, } from './portals/index.js';
5
- export class CustomerPortal extends BrowserforcePlugin {
6
- async retrieve(definition) {
7
- const pluginEnable = new CustomerPortalEnable(this.browserforce);
8
- const response = {
9
- enabled: false,
10
- portals: [],
11
- availableCustomObjects: [],
12
- };
13
- response.enabled = await pluginEnable.retrieve();
14
- if (response.enabled) {
15
- if (definition.portals) {
16
- const pluginSetup = new CustomerPortalSetup(this.browserforce);
17
- response.portals = await pluginSetup.retrieve();
18
- }
19
- if (definition.availableCustomObjects) {
20
- const pluginAvailableCustomObjects = new CustomerPortalAvailableCustomObjects(this.browserforce);
21
- response.availableCustomObjects =
22
- await pluginAvailableCustomObjects.retrieve(definition.availableCustomObjects);
23
- }
24
- }
25
- return response;
26
- }
27
- diff(state, definition) {
28
- const enabled = new CustomerPortalEnable(this.browserforce).diff(state.enabled, definition.enabled);
29
- const portals = new CustomerPortalSetup(this.browserforce).diff(state.portals, definition.portals);
30
- const availableCustomObjects = new CustomerPortalAvailableCustomObjects(this.browserforce).diff(state.availableCustomObjects, definition.availableCustomObjects);
31
- const response = {
32
- ...(enabled !== undefined && {
33
- enabled,
34
- }),
35
- ...(portals !== undefined && {
36
- portals,
37
- }),
38
- ...(availableCustomObjects !== undefined && {
39
- availableCustomObjects,
40
- }),
41
- };
42
- return Object.keys(response).length ? response : undefined;
43
- }
44
- async apply(config) {
45
- if (config.enabled !== undefined) {
46
- const pluginEnable = new CustomerPortalEnable(this.browserforce);
47
- await pluginEnable.apply(config.enabled);
48
- }
49
- if (config.portals?.length) {
50
- const pluginSetup = new CustomerPortalSetup(this.browserforce);
51
- await pluginSetup.apply(config.portals);
52
- }
53
- if (config.availableCustomObjects) {
54
- const pluginAvailableCustomObjects = new CustomerPortalAvailableCustomObjects(this.browserforce);
55
- await pluginAvailableCustomObjects.apply(config.availableCustomObjects);
56
- }
57
- }
58
- }
59
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/customer-portal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,oCAAoC,GAErC,MAAM,qCAAqC,CAAC;AAC7C,OAA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C;CACF"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,84 +0,0 @@
1
- import assert from 'assert';
2
- import { CustomerPortal } from './index.js';
3
- const tests = [
4
- {
5
- description: 'should ignore a non-existent target flag',
6
- source: {
7
- enabled: true,
8
- },
9
- target: {},
10
- expected: undefined,
11
- },
12
- {
13
- description: 'should ignore a matching target flag',
14
- source: {
15
- enabled: true,
16
- },
17
- target: {
18
- enabled: true,
19
- },
20
- expected: undefined,
21
- },
22
- {
23
- description: 'should detect a changed flag',
24
- source: {
25
- enabled: false,
26
- },
27
- target: {
28
- enabled: true,
29
- },
30
- expected: {
31
- enabled: true,
32
- },
33
- },
34
- {
35
- description: 'should only return necessary fields',
36
- source: {
37
- enabled: true,
38
- portals: [
39
- {
40
- name: 'Customer Portal',
41
- description: 'Customer Portal',
42
- adminUser: 'User User',
43
- portalProfileMemberships: [
44
- {
45
- name: 'Customer Portal Manager Standard',
46
- active: true,
47
- _id: 'a1',
48
- },
49
- ],
50
- _id: 'p1',
51
- },
52
- ],
53
- },
54
- target: {
55
- portals: [
56
- {
57
- name: 'Customer Portal',
58
- description: 'new description',
59
- },
60
- ],
61
- },
62
- expected: {
63
- portals: [
64
- {
65
- name: 'Customer Portal',
66
- description: 'new description',
67
- _id: 'p1',
68
- },
69
- ],
70
- },
71
- },
72
- ];
73
- describe('CustomerPortal', () => {
74
- describe('diff()', () => {
75
- const p = new CustomerPortal(global.bf);
76
- for (const t of tests) {
77
- it(t.description, () => {
78
- const actual = p.diff(t.source, t.target);
79
- assert.deepStrictEqual(actual, t.expected);
80
- });
81
- }
82
- });
83
- });
84
- //# sourceMappingURL=index.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/plugins/customer-portal/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,KAAK,GAAG;IACZ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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"}
@@ -1,25 +0,0 @@
1
- import { BrowserforcePlugin } from '../../../plugin.js';
2
- export type Config = PortalConfig[];
3
- type PortalConfig = {
4
- adminUser?: string;
5
- description?: string;
6
- isSelfRegistrationActivated?: boolean;
7
- name: string;
8
- oldName?: string;
9
- selfRegUserDefaultLicense?: string;
10
- selfRegUserDefaultProfile?: string;
11
- selfRegUserDefaultRole?: string;
12
- portalProfileMemberships?: PortalProfileMembership[];
13
- _id?: string;
14
- };
15
- type PortalProfileMembership = {
16
- name: string;
17
- active: boolean;
18
- _id?: string;
19
- };
20
- export declare class CustomerPortalSetup extends BrowserforcePlugin {
21
- retrieve(): Promise<Config>;
22
- diff(source?: Config, target?: Config): Config | undefined;
23
- apply(config: Config): Promise<void>;
24
- }
25
- export {};
@@ -1,180 +0,0 @@
1
- import * as queryString from 'querystring';
2
- import { BrowserforcePlugin } from '../../../plugin.js';
3
- import { semanticallyCleanObject } from '../../utils.js';
4
- const LIST_VIEW_PATH = '_ui/core/portal/CustomerSuccessPortalSetup/d';
5
- const PORTAL_PROFILE_MEMBERSHIP_PATH = '_ui/core/portal/PortalProfileMembershipPage/e';
6
- const SAVE_BUTTON_SELECTOR = 'input[name="save"]';
7
- const LIST_VIEW_PORTAL_LINKS_XPATH_SELECTOR = '//div[contains(@class,"pbBody")]//th[contains(@class,"dataCell")]//a[starts-with(@href, "/060")]';
8
- const PORTAL_DESCRIPTION_SELECTOR = '#Description';
9
- const PORTAL_ID_SELECTOR = '#portalId';
10
- const PORTAL_ADMIN_ID_SELECTOR = 'Admin';
11
- const PORTAL_IS_SELF_REGISTRATION_ACTIVATED_ID_SELECTOR = 'IsSelfRegistrationActivated';
12
- const PORTAL_SELF_REG_USER_DEFAULT_LICENSE_ID_SELECTOR = 'SelfRegUserDefaultLicense';
13
- const PORTAL_SELF_REG_USER_DEFAULT_ROLE_ID_SELECTOR = 'SelfRegUserDefaultRole';
14
- const PORTAL_SELF_REG_USER_DEFAULT_PROFILE_ID_SELECTOR = 'SelfRegUserDefaultProfile';
15
- const PORTAL_PROFILE_MEMBERSHIP_PROFILES_SELECTOR = 'th.dataCell';
16
- const PORTAL_PROFILE_MEMBERSHIP_CHECKBOXES_SELECTOR = 'td.dataCell input';
17
- export class CustomerPortalSetup extends BrowserforcePlugin {
18
- async retrieve() {
19
- const page = await this.browserforce.openPage(LIST_VIEW_PATH);
20
- await page.waitForSelector(`::-p-xpath(${LIST_VIEW_PORTAL_LINKS_XPATH_SELECTOR})`);
21
- const customerPortalLinks = await page.$$(`xpath/.${LIST_VIEW_PORTAL_LINKS_XPATH_SELECTOR}`);
22
- const response = await page.evaluate((...links) => {
23
- return links.map((a) => {
24
- return {
25
- _id: a.pathname.split('/')[1],
26
- name: a.text,
27
- portalProfileMemberships: [],
28
- };
29
- });
30
- }, ...customerPortalLinks);
31
- for (const portal of response) {
32
- const portalPage = await this.browserforce.openPage(`${portal._id}/e`);
33
- await portalPage.waitForSelector(PORTAL_DESCRIPTION_SELECTOR);
34
- portal.description = await portalPage.$eval(PORTAL_DESCRIPTION_SELECTOR, (el) => el.value);
35
- portal.adminUser = await portalPage.$eval(`#${PORTAL_ADMIN_ID_SELECTOR}`, (el) => el.value);
36
- portal.isSelfRegistrationActivated = await portalPage.$eval(`#${PORTAL_IS_SELF_REGISTRATION_ACTIVATED_ID_SELECTOR}`, (el) => el.checked);
37
- portal.selfRegUserDefaultLicense = await portalPage.$eval(`#${PORTAL_SELF_REG_USER_DEFAULT_LICENSE_ID_SELECTOR}`, (el) => el.selectedOptions[0].text);
38
- portal.selfRegUserDefaultRole = await portalPage.$eval(`#${PORTAL_SELF_REG_USER_DEFAULT_ROLE_ID_SELECTOR}`, (el) => el.selectedOptions[0].text);
39
- portal.selfRegUserDefaultProfile = await portalPage.$eval(`#${PORTAL_SELF_REG_USER_DEFAULT_PROFILE_ID_SELECTOR}`, (el) => el.selectedOptions[0].text);
40
- await portalPage.close();
41
- // portalProfileMemberships
42
- const portalProfilePage = await this.browserforce.openPage(`${PORTAL_PROFILE_MEMBERSHIP_PATH}?portalId=${portal._id}&setupid=CustomerSuccessPortalSettings`);
43
- await portalProfilePage.waitForSelector(PORTAL_ID_SELECTOR);
44
- const profiles = await portalProfilePage.$$eval(PORTAL_PROFILE_MEMBERSHIP_PROFILES_SELECTOR, (ths) => {
45
- return ths.map((th) => th.innerText.trim());
46
- });
47
- const checkboxes = await portalProfilePage.$$eval(PORTAL_PROFILE_MEMBERSHIP_CHECKBOXES_SELECTOR, (inputs) => {
48
- return inputs.map((input) => {
49
- return {
50
- active: input.checked,
51
- _id: input.id,
52
- };
53
- });
54
- });
55
- const portalProfileMemberships = [];
56
- for (let i = 0; i < profiles.length; i++) {
57
- portalProfileMemberships.push({
58
- name: profiles[i],
59
- active: checkboxes[i].active,
60
- _id: checkboxes[i]._id,
61
- });
62
- }
63
- portal.portalProfileMemberships = portalProfileMemberships;
64
- await portalProfilePage.close();
65
- }
66
- await page.close();
67
- return response;
68
- }
69
- diff(source, target) {
70
- const response = [];
71
- if (source && target) {
72
- for (const plannedPortal of target) {
73
- const portal = JSON.parse(JSON.stringify(plannedPortal));
74
- let sourcePortal = source.find((p) => p.name === portal.name);
75
- if (portal.oldName && !sourcePortal) {
76
- // fallback to old name of portal
77
- sourcePortal = source.find((p) => p.name === portal.oldName);
78
- }
79
- if (!sourcePortal) {
80
- throw new Error(`Portal with name '${portal.name} (oldName: ${portal.oldName})' not found. Setting up new Portals is not yet supported.`);
81
- }
82
- delete portal.oldName;
83
- if (sourcePortal) {
84
- // copy id of existing portal to new portal to be retained and used
85
- portal._id = sourcePortal._id;
86
- }
87
- if (sourcePortal.portalProfileMemberships &&
88
- portal.portalProfileMemberships) {
89
- const membershipResponse = [];
90
- for (const member of portal.portalProfileMemberships) {
91
- // copy id of existing member to new member to be retained and used
92
- const sourceMember = sourcePortal.portalProfileMemberships.find((m) => m.name === member.name);
93
- if (sourceMember) {
94
- member._id = sourceMember._id;
95
- }
96
- else {
97
- throw new Error(`Could not find portal profile membership for '${member.name}'`);
98
- }
99
- const membershipDiff = semanticallyCleanObject(super.diff(sourceMember, member), '_id');
100
- if (membershipDiff) {
101
- membershipResponse.push(membershipDiff);
102
- }
103
- }
104
- delete sourcePortal.portalProfileMemberships;
105
- delete portal.portalProfileMemberships;
106
- if (membershipResponse.length) {
107
- portal.portalProfileMemberships = membershipResponse;
108
- }
109
- }
110
- const diff = semanticallyCleanObject(super.diff(sourcePortal, portal), '_id');
111
- if (diff !== undefined) {
112
- response.push(diff);
113
- }
114
- }
115
- }
116
- return response.length ? response : undefined;
117
- }
118
- async apply(config) {
119
- for (const portal of config) {
120
- if (portal._id) {
121
- // everything that can be changed using the url
122
- const urlAttributes = {};
123
- if (portal.name) {
124
- urlAttributes['Name'] = portal.name;
125
- }
126
- if (portal.description) {
127
- urlAttributes['Description'] = portal.description;
128
- }
129
- if (portal.adminUser) {
130
- urlAttributes[PORTAL_ADMIN_ID_SELECTOR] = portal.adminUser;
131
- }
132
- if (portal.isSelfRegistrationActivated !== undefined) {
133
- urlAttributes[PORTAL_IS_SELF_REGISTRATION_ACTIVATED_ID_SELECTOR] =
134
- portal.isSelfRegistrationActivated ? 1 : 0;
135
- }
136
- const page = await this.browserforce.openPage(`${portal._id}/e?${queryString.stringify(urlAttributes)}`);
137
- await page.waitForSelector(PORTAL_DESCRIPTION_SELECTOR);
138
- if (portal.selfRegUserDefaultLicense) {
139
- const licenseValue = await page.evaluate((option) => option.value, (await page.$$(`xpath/.//select[@id="${PORTAL_SELF_REG_USER_DEFAULT_LICENSE_ID_SELECTOR}"]//option[text()="${portal.selfRegUserDefaultLicense}"]`))[0]);
140
- await page.select(`#${PORTAL_SELF_REG_USER_DEFAULT_LICENSE_ID_SELECTOR}`, licenseValue);
141
- }
142
- if (portal.selfRegUserDefaultRole) {
143
- const roleValue = await page.evaluate((option) => option.value, (await page.$$(`xpath/.//select[@id="${PORTAL_SELF_REG_USER_DEFAULT_ROLE_ID_SELECTOR}"]//option[text()="${portal.selfRegUserDefaultRole}"]`))[0]);
144
- await page.select(`#${PORTAL_SELF_REG_USER_DEFAULT_ROLE_ID_SELECTOR}`, roleValue);
145
- }
146
- if (portal.selfRegUserDefaultProfile) {
147
- const profileValue = await page.evaluate((option) => option.value, (await page.$$(`xpath/.//select[@id="${PORTAL_SELF_REG_USER_DEFAULT_PROFILE_ID_SELECTOR}"]//option[text()="${portal.selfRegUserDefaultProfile}"]`))[0]);
148
- await page.select(`#${PORTAL_SELF_REG_USER_DEFAULT_PROFILE_ID_SELECTOR}`, profileValue);
149
- }
150
- await page.waitForSelector(SAVE_BUTTON_SELECTOR);
151
- await Promise.all([
152
- page.waitForNavigation(),
153
- page.click(SAVE_BUTTON_SELECTOR),
154
- ]);
155
- if ((await page.url()).includes(portal._id)) {
156
- // error handling
157
- await page.waitForSelector(PORTAL_DESCRIPTION_SELECTOR);
158
- await this.browserforce.throwPageErrors(page);
159
- throw new Error(`saving customer portal '${portal._id}' failed`);
160
- }
161
- // portalProfileMemberships
162
- if (portal.portalProfileMemberships) {
163
- const membershipUrlAttributes = {};
164
- for (const member of portal.portalProfileMemberships) {
165
- membershipUrlAttributes[member._id] = member.active ? 1 : 0;
166
- }
167
- const portalProfilePage = await this.browserforce.openPage(`${PORTAL_PROFILE_MEMBERSHIP_PATH}?portalId=${portal._id}&setupid=CustomerSuccessPortalSettings&${queryString.stringify(membershipUrlAttributes)}`);
168
- await portalProfilePage.waitForSelector(SAVE_BUTTON_SELECTOR);
169
- await Promise.all([
170
- portalProfilePage.waitForNavigation(),
171
- portalProfilePage.click(SAVE_BUTTON_SELECTOR),
172
- ]);
173
- await portalProfilePage.close();
174
- }
175
- await page.close();
176
- }
177
- }
178
- }
179
- }
180
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/customer-portal/portals/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,MAAM,cAAc,GAAG,8CAA8C,CAAC;AACtE,MAAM,8BAA8B,GAClC,+CAA+C,CAAC;AAElD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAClD,MAAM,qCAAqC,GACzC,kGAAkG,CAAC;AACrG,MAAM,2BAA2B,GAAG,cAAc,CAAC;AACnD,MAAM,kBAAkB,GAAG,WAAW,CAAC;AACvC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AACzC,MAAM,iDAAiD,GACrD,6BAA6B,CAAC;AAChC,MAAM,gDAAgD,GACpD,2BAA2B,CAAC;AAC9B,MAAM,6CAA6C,GAAG,wBAAwB,CAAC;AAC/E,MAAM,gDAAgD,GACpD,2BAA2B,CAAC;AAC9B,MAAM,2CAA2C,GAAG,aAAa,CAAC;AAClE,MAAM,6CAA6C,GAAG,mBAAmB,CAAC;AAuB1E,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IAClD,KAAK,CAAC,QAAQ;QACnB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAC9D,MAAM,IAAI,CAAC,eAAe,CACxB,cAAc,qCAAqC,GAAG,CACvD,CAAC;QACF,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,EAAE,CACvC,UAAU,qCA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