@axinom/mosaic-e2e-page-model 0.2.1-rc.3 → 0.2.1-rc.6

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 (56) hide show
  1. package/dist/managed-services/{image-selection-explorer.d.ts → image-service/image-selection-explorer.d.ts} +1 -1
  2. package/dist/managed-services/image-service/image-selection-explorer.d.ts.map +1 -0
  3. package/dist/managed-services/{image-selection-explorer.js → image-service/image-selection-explorer.js} +3 -2
  4. package/dist/managed-services/image-service/image-selection-explorer.js.map +1 -0
  5. package/dist/managed-services/{image-service.d.ts → image-service/image-service.d.ts} +9 -9
  6. package/dist/managed-services/image-service/image-service.d.ts.map +1 -0
  7. package/dist/managed-services/{image-service.js → image-service/image-service.js} +35 -39
  8. package/dist/managed-services/image-service/image-service.js.map +1 -0
  9. package/dist/managed-services/image-service/index.d.ts +3 -0
  10. package/dist/managed-services/image-service/index.d.ts.map +1 -0
  11. package/dist/managed-services/image-service/index.js +15 -0
  12. package/dist/managed-services/image-service/index.js.map +1 -0
  13. package/dist/managed-services/index.d.ts +1 -1
  14. package/dist/managed-services/index.d.ts.map +1 -1
  15. package/dist/managed-services/index.js +1 -1
  16. package/dist/managed-services/index.js.map +1 -1
  17. package/dist/managed-services/monetization-service/index.d.ts +4 -0
  18. package/dist/managed-services/monetization-service/index.d.ts.map +1 -0
  19. package/dist/managed-services/monetization-service/index.js +16 -0
  20. package/dist/managed-services/monetization-service/index.js.map +1 -0
  21. package/dist/managed-services/monetization-service/monetization-service.d.ts +242 -0
  22. package/dist/managed-services/monetization-service/monetization-service.d.ts.map +1 -0
  23. package/dist/managed-services/monetization-service/monetization-service.js +467 -0
  24. package/dist/managed-services/monetization-service/monetization-service.js.map +1 -0
  25. package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.d.ts +14 -0
  26. package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.d.ts.map +1 -0
  27. package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.js +26 -0
  28. package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.js.map +1 -0
  29. package/dist/managed-services/monetization-service/payment-provider-settings-field.d.ts +18 -0
  30. package/dist/managed-services/monetization-service/payment-provider-settings-field.d.ts.map +1 -0
  31. package/dist/managed-services/{payment-provider-settings-field.js → monetization-service/payment-provider-settings-field.js} +11 -0
  32. package/dist/managed-services/monetization-service/payment-provider-settings-field.js.map +1 -0
  33. package/dist/managed-services/video-service.d.ts +88 -0
  34. package/dist/managed-services/video-service.d.ts.map +1 -0
  35. package/dist/managed-services/video-service.js +169 -0
  36. package/dist/managed-services/video-service.js.map +1 -0
  37. package/dist/page-model.d.ts +4 -2
  38. package/dist/page-model.d.ts.map +1 -1
  39. package/dist/page-model.js +2 -0
  40. package/dist/page-model.js.map +1 -1
  41. package/dist/ui-selectors/ui-shell-model.d.ts +15 -2
  42. package/dist/ui-selectors/ui-shell-model.d.ts.map +1 -1
  43. package/dist/ui-selectors/ui-shell-model.js +42 -24
  44. package/dist/ui-selectors/ui-shell-model.js.map +1 -1
  45. package/package.json +5 -5
  46. package/dist/managed-services/image-selection-explorer.d.ts.map +0 -1
  47. package/dist/managed-services/image-selection-explorer.js.map +0 -1
  48. package/dist/managed-services/image-service.d.ts.map +0 -1
  49. package/dist/managed-services/image-service.js.map +0 -1
  50. package/dist/managed-services/monetization-service.d.ts +0 -208
  51. package/dist/managed-services/monetization-service.d.ts.map +0 -1
  52. package/dist/managed-services/monetization-service.js +0 -459
  53. package/dist/managed-services/monetization-service.js.map +0 -1
  54. package/dist/managed-services/payment-provider-settings-field.d.ts +0 -7
  55. package/dist/managed-services/payment-provider-settings-field.d.ts.map +0 -1
  56. package/dist/managed-services/payment-provider-settings-field.js.map +0 -1
@@ -0,0 +1,467 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MonetizationService = void 0;
4
+ const mosaic_e2e_ui_selectors_1 = require("@axinom/mosaic-e2e-ui-selectors");
5
+ const managed_service_model_1 = require("../managed-service-model");
6
+ const payment_plan_recurrence_period_field_1 = require("./payment-plan-recurrence-period-field");
7
+ const payment_provider_settings_field_1 = require("./payment-provider-settings-field");
8
+ /** A model for the managed monetization service. */
9
+ class MonetizationService extends managed_service_model_1.ManagedServiceModel {
10
+ constructor() {
11
+ super(...arguments);
12
+ /**
13
+ * A reference to a PaymentProviderSettingsField component mod*e*l which can
14
+ * be used to configure payment provider settings on subscription plans and
15
+ * payment plans. This is a custom FormField component.
16
+ *
17
+ * Example usage:
18
+ * ```
19
+ * const field = uiManagedWorkflows.form
20
+ * .getFieldByLabel('Payment Providers & Settings')
21
+ * .as(monetizationService.PaymentProviderSettingsField);
22
+ * await field.addPaymentProvider('PAYPAL');
23
+ * await field.setExternalId('PAYPAL', 'P-123XYZ');
24
+ * ```
25
+ */
26
+ this.PaymentProviderSettingsField = payment_provider_settings_field_1.PaymentProviderSettingsField;
27
+ /**
28
+ * A reference to a PaymentPlanRecurrencePeriodField component mod*e*l which
29
+ * can be used to configure the "Recurrence Period" field on payment plans.
30
+ * This is a custom FormField component.
31
+ *
32
+ * Example usage:
33
+ * ```
34
+ * await uiManagedWorkflows.form
35
+ .getFieldByLabel('Recurrence Period')
36
+ .as(monetizationService.PaymentPlanRecurrencePeriodField)
37
+ .setValues(1, 'WEEK');
38
+ * ```
39
+ */
40
+ this.PaymentPlanRecurrencePeriodField = payment_plan_recurrence_period_field_1.PaymentPlanRecurrencePeriodField;
41
+ }
42
+ /**
43
+ * This method navigates to the subscription plans explorer station.
44
+ * The management system must be loaded & signed in before using this method.
45
+ *
46
+ * The following steps will be taken:
47
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
48
+ * - Wait for data to load
49
+ */
50
+ async navigateToSubscriptionPlans() {
51
+ const { uiShell, uiManagedWorkflows } = this;
52
+ await uiShell.navigateToLandingPageTile('Monetization');
53
+ // click subscription plans tile
54
+ const label = 'Subscription Plans';
55
+ const tile = uiManagedWorkflows.hub.getTileByLabel(label);
56
+ try {
57
+ await tile.waitFor({ state: 'visible' });
58
+ }
59
+ catch (_a) {
60
+ throw new Error(`Monetization hub tile '${label}' is not visible.`);
61
+ }
62
+ await uiShell.waitForPageTransition(tile.click());
63
+ await uiManagedWorkflows.list.waitForData();
64
+ }
65
+ /**
66
+ * This method navigates to the claim sets explorer station.
67
+ * The management system must be loaded & signed in before using this method.
68
+ *
69
+ * The following steps will be taken:
70
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
71
+ * - Wait for data to load
72
+ */
73
+ async navigateToClaimSets() {
74
+ const { uiShell, uiManagedWorkflows } = this;
75
+ await uiShell.navigateToLandingPageTile('Monetization');
76
+ // click claim sets tile
77
+ const label = 'Claim Sets';
78
+ const tile = uiManagedWorkflows.hub.getTileByLabel(label);
79
+ try {
80
+ await tile.waitFor({ state: 'visible' });
81
+ }
82
+ catch (_a) {
83
+ throw new Error(`Monetization hub tile '${label}' is not visible.`);
84
+ }
85
+ await uiShell.waitForPageTransition(tile.click());
86
+ await uiManagedWorkflows.list.waitForData();
87
+ }
88
+ /**
89
+ * This method navigates to a subscription plan details station by title.
90
+ * The management system must be loaded & signed in before using this method.
91
+ * If there is not exactly one matching subscription plan an exception will be raised.
92
+ *
93
+ * The following steps will be taken:
94
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
95
+ * - Filter by title and click the subscription plan row action
96
+ * - Wait for the subscription plan details page to load
97
+ */
98
+ async navigateToSubscriptionPlanDetails(filterBy) {
99
+ const { uiShell, uiManagedWorkflows } = this;
100
+ await this.navigateToSubscriptionPlans();
101
+ // filter to the item
102
+ await uiManagedWorkflows.filters
103
+ .getFilterByName('title')
104
+ .asFreeTextFilter()
105
+ .setValue(filterBy.title);
106
+ await uiManagedWorkflows.list.waitForData();
107
+ // Verify that there is exactly one matching row
108
+ if ((await uiManagedWorkflows.list.allVisibleRows.count()) !== 1) {
109
+ throw new Error(`Failed to find exactly one subscription plan with title '${filterBy.title}'.`);
110
+ }
111
+ // navigate
112
+ await uiShell.waitForPageTransition(uiManagedWorkflows.list.getRow(1).actionButton.click());
113
+ await uiManagedWorkflows.form.waitForData();
114
+ }
115
+ /**
116
+ * This method navigates to a claim set details station by unique key.
117
+ * The management system must be loaded & signed in before using this method.
118
+ * If there is not exactly one matching claim set an exception will be raised.
119
+ *
120
+ * The following steps will be taken:
121
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
122
+ * - Filter by unique key and click the claim set row action
123
+ * - Wait for the claim set details station to load
124
+ */
125
+ async navigateToClaimSetDetails(args) {
126
+ const { uiShell, uiManagedWorkflows } = this;
127
+ if (this.page.url().endsWith(`/monetization/claimsets/${args.uniqueKey}`)) {
128
+ // already on the correct page. do nothing
129
+ return;
130
+ }
131
+ await this.navigateToClaimSets();
132
+ // filter to the item
133
+ await uiManagedWorkflows.filters
134
+ .getFilterByName('key')
135
+ .asFreeTextFilter()
136
+ .setValue(args.uniqueKey);
137
+ await uiManagedWorkflows.list.waitForData();
138
+ // Verify that there is exactly one matching row
139
+ if ((await uiManagedWorkflows.list.allVisibleRows.count()) !== 1) {
140
+ throw new Error(`Failed to find exactly one claim set with unique key '${args.uniqueKey}'.`);
141
+ }
142
+ // navigate
143
+ await uiShell.waitForPageTransition(uiManagedWorkflows.list.getRow(1).actionButton.click());
144
+ await uiManagedWorkflows.form.waitForData();
145
+ }
146
+ /**
147
+ * This method assigns a claim set to the subscription plan.
148
+ * The management system must be loaded & signed in before using this method.
149
+ * If the claim set does not exist, or is already added to this subscription plan then an exception will be raised.
150
+ *
151
+ * The following steps will be taken:
152
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
153
+ * - Filter by title and click the subscription plan row action
154
+ * - Click the 'Claim Sets' action
155
+ * - Open the claim sets explorer modal, filter by key and select the first result
156
+ * - Click the 'previous' breadcrumb and wait for the subscription plan details station to load
157
+ */
158
+ async assignClaimSetToSubscriptionPlan(args) {
159
+ const { uiShell, uiManagedWorkflows } = this;
160
+ await this.navigateToSubscriptionPlanDetails({
161
+ title: args.subscriptionPlanTitle,
162
+ });
163
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Manage Claim Sets').click());
164
+ await uiManagedWorkflows.form.waitForData();
165
+ // Associate the claim set
166
+ await uiManagedWorkflows.form
167
+ .getFieldByLabel('Claim Sets')
168
+ .asDynamicDataListField()
169
+ .dataList.dataEntryRow.addButton.click();
170
+ const modal = uiManagedWorkflows.form.modal.asSelectionExplorer();
171
+ await modal.waitToOpen();
172
+ await modal.filters
173
+ .getFilterByName('key')
174
+ .asFreeTextFilter()
175
+ .setValue(args.claimSetUniqueKey);
176
+ await modal.list.waitForData();
177
+ if ((await modal.list.allVisibleRows.count()) !== 1) {
178
+ throw new Error('The claim set was not found or is already assigned.');
179
+ }
180
+ await modal.list.getRow(1).selectButton.click();
181
+ await modal.waitToClose();
182
+ // Back to subscription plan details
183
+ await uiShell.navigateToBreadcrumbPrevious();
184
+ await uiManagedWorkflows.form.waitForData();
185
+ }
186
+ /**
187
+ * This method removes a claim set assignment from a subscription plan.
188
+ * The management system must be loaded & signed in before using this method.
189
+ * If the claim set is not assigned to this subscription plan then an exception will be raised.
190
+ *
191
+ * The following steps will be taken:
192
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
193
+ * - Filter by title and click the subscription plan row action
194
+ * - Click the 'Claim Sets' action
195
+ * - Unassign the claim set using the inline menu
196
+ * - Click the 'previous' breadcrumb and wait for the subscription plan details station to load
197
+ */
198
+ async removeClaimSetFromSubscriptionPlan(args) {
199
+ const { uiShell, uiManagedWorkflows } = this;
200
+ await this.navigateToSubscriptionPlanDetails({
201
+ title: args.subscriptionPlanTitle,
202
+ });
203
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Manage Claim Sets').click());
204
+ await uiManagedWorkflows.form.waitForData();
205
+ // Find and remove the claim set
206
+ const dataList = uiManagedWorkflows.form
207
+ .getFieldByLabel('Claim Sets')
208
+ .asDynamicDataListField().dataList;
209
+ const row = dataList.getRowByPropertyValue('key', args.claimSetUniqueKey);
210
+ try {
211
+ await row.getLocator().waitFor({ state: 'visible' });
212
+ }
213
+ catch (_a) {
214
+ throw new Error('The claim set was not found on the subscription plan.');
215
+ }
216
+ await row.inlineMenu.openButton.click();
217
+ await row.inlineMenu.getActionByLabel('Unassign').click();
218
+ await dataList.waitForData();
219
+ // Back to subscription plan details
220
+ await uiShell.navigateToBreadcrumbPrevious();
221
+ await uiManagedWorkflows.form.waitForData();
222
+ }
223
+ /**
224
+ * This method sets subscription plan status and publishes the subscription plan.
225
+ * The management system must be loaded & signed in before using this method.
226
+ * If the subscription plan cannot be published then an exception will be raised.
227
+ *
228
+ * The following steps will be taken:
229
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
230
+ * - Filter by title and click the subscription plan row action
231
+ * - Set the Status field
232
+ * - Click 'Publishing'
233
+ * - Click 'Publish' and confirm
234
+ * - Wait for the subscription plan details station to load and verify that the publication state is 'PUBLISHED'
235
+ */
236
+ async publishSubscriptionPlan(args) {
237
+ const { uiShell, uiManagedWorkflows } = this;
238
+ await this.navigateToSubscriptionPlanDetails(args);
239
+ if (args.status !== undefined) {
240
+ await uiManagedWorkflows.form
241
+ .getFieldByName('isActive')
242
+ .asRadioField()
243
+ .setValue(args.status === 'Active' ? 'true' : 'false');
244
+ }
245
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Publishing').click());
246
+ await uiManagedWorkflows.form.waitForData();
247
+ const publishButton = uiManagedWorkflows.actions.getActionByLabel('Publish');
248
+ try {
249
+ await publishButton.waitFor({ state: 'visible' });
250
+ }
251
+ catch (_a) {
252
+ throw new Error('Subscription plan could not be published. Are there validation errors?');
253
+ }
254
+ await publishButton.click();
255
+ await uiManagedWorkflows.actions.confirmButton.click();
256
+ await uiManagedWorkflows.form.waitForData();
257
+ }
258
+ /**
259
+ * This method creates a new claim set.
260
+ * The management system must be loaded & signed in before using this method.
261
+ * When this method completes, the new claim set details station will be loaded.
262
+ *
263
+ * The following steps will be taken:
264
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
265
+ * - Click 'NEW', enter the title and key then click 'Proceed'
266
+ * - Wait for the claim set details station to load
267
+ */
268
+ async createClaimSet(properties) {
269
+ const { uiShell, uiManagedWorkflows } = this;
270
+ await this.navigateToClaimSets();
271
+ await uiShell.waitForPageTransition(uiManagedWorkflows.pageHeader.actions.getActionByLabel('NEW').click());
272
+ await uiManagedWorkflows.form.waitForData();
273
+ await uiManagedWorkflows.form
274
+ .getFieldByName('title')
275
+ .asSingleLineTextField()
276
+ .setValue(properties.title);
277
+ await uiManagedWorkflows.form
278
+ .getFieldByName('key')
279
+ .asSingleLineTextField()
280
+ .setValue(properties.uniqueKey);
281
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel(mosaic_e2e_ui_selectors_1.ActionLabel.Proceed).click());
282
+ await uiManagedWorkflows.form.waitForData();
283
+ }
284
+ /**
285
+ * This method assigns claims to a claim set.
286
+ * The management system must be loaded & signed in before using this method.
287
+ * NOTE: This method does not support adding claims by mod*a*l.
288
+ *
289
+ * The following steps will be taken:
290
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
291
+ * - Filter by unique key and click the claim set row action
292
+ * - Click 'Claims'
293
+ * - Add each claim by checkbox or radio button
294
+ * - Click the 'previous' breadcrumb and wait for the claim set details station to load
295
+ */
296
+ async assignClaimsToClaimSet(args) {
297
+ const { uiShell, uiManagedWorkflows } = this;
298
+ await this.navigateToClaimSetDetails(args);
299
+ // Open claims editor
300
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Claims').click());
301
+ // Select each claim
302
+ for (const claim of args.claims) {
303
+ const control = uiManagedWorkflows.accordion.getLocator(
304
+ // TODO: improve selector
305
+ `//*[ ./input[@name="${claim}"] ]//*[self::input[@type="checkbox"] or self::label[@for]]`);
306
+ try {
307
+ await control.waitFor({ state: 'visible' });
308
+ }
309
+ catch (e) {
310
+ throw new Error(`A radio or checkbox for for claim '${claim}' is not visible. NOTE: selecting claims by mod*a*l is not supported by this method.` +
311
+ (e instanceof Error ? `\n${e.message}` : ''));
312
+ }
313
+ await control.check();
314
+ }
315
+ // Back to claim set details
316
+ await uiShell.navigateToBreadcrumbPrevious();
317
+ await uiManagedWorkflows.form.waitForData();
318
+ }
319
+ /**
320
+ * This method assigns claims to a claim set.
321
+ * The management system must be loaded & signed in before using this method.
322
+ * NOTE: This method *does* support adding claims by mod*a*l.
323
+ *
324
+ * The following steps will be taken:
325
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
326
+ * - Filter by unique key and click the claim set row action
327
+ * - Click 'Claims'
328
+ * - Add each claim by checkbox or radio button
329
+ * - Click the 'previous' breadcrumb and wait for the claim set details station to load
330
+ */
331
+ async assignClaimsToClaimSetByLabel(args) {
332
+ const { uiShell, uiManagedWorkflows } = this;
333
+ await this.navigateToClaimSetDetails(args);
334
+ // Open claims editor
335
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Claims').click());
336
+ // Select each claim
337
+ const group = uiManagedWorkflows.accordion.getItemContainingText(args.claimGroupLabel);
338
+ try {
339
+ await group.row.waitFor({ state: 'visible' });
340
+ }
341
+ catch (e) {
342
+ throw new Error(`A claim group with label ${args.claimGroupLabel} is not visible.` +
343
+ (e instanceof Error ? `\n${e.message}` : ''));
344
+ }
345
+ await group.expand();
346
+ const dataList = group.getChildOfType(mosaic_e2e_ui_selectors_1.DynamicDataList);
347
+ if (await dataList.getLocator().isVisible()) {
348
+ // Select each claim with selection explorer
349
+ const modal = uiManagedWorkflows.form.modal.asSelectionExplorer();
350
+ for (const claimLabel of args.claimLabels) {
351
+ await dataList.dataEntryRow.addButton.click();
352
+ await modal.waitToOpen();
353
+ await modal.list.waitForData();
354
+ await modal.filters
355
+ .getFilterByName('title')
356
+ .asFreeTextFilter()
357
+ .setValue(claimLabel);
358
+ await modal.list.waitForData();
359
+ if ((await modal.list.allVisibleRows.count()) !== 1) {
360
+ throw new Error(`A entry for claim with label '${claimLabel}' is not visible in the modal for group '${args.claimGroupLabel}'.`);
361
+ }
362
+ await modal.list.getRow(1).selectButton.click();
363
+ await modal.waitToClose();
364
+ }
365
+ }
366
+ else {
367
+ // Select each claim
368
+ for (const claimLabel of args.claimLabels) {
369
+ const control = group.content.locator(
370
+ // TODO: improve selector
371
+ `//*[ ./*[text()="${claimLabel}"] ]//*[self::input[@type="checkbox"] or self::label[@for]]`);
372
+ try {
373
+ await control.waitFor({ state: 'visible' });
374
+ }
375
+ catch (e) {
376
+ throw new Error(`A radio or checkbox for claim with label '${claimLabel}' is not visible in group '${args.claimGroupLabel}'.` +
377
+ (e instanceof Error ? `\n${e.message}` : ''));
378
+ }
379
+ await control.click();
380
+ }
381
+ }
382
+ // Back to claim set details
383
+ await uiShell.navigateToBreadcrumbPrevious();
384
+ await uiManagedWorkflows.form.waitForData();
385
+ }
386
+ /**
387
+ * This method publishes a claim set.
388
+ * The management system must be loaded & signed in before using this method.
389
+ * If the claim set cannot be published then an exception will be raised.
390
+ *
391
+ * The following steps will be taken:
392
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
393
+ * - Filter by unique key and click the claim set row action
394
+ * - Click 'Publishing'
395
+ * - Click 'Publish' and confirm
396
+ * - Wait for the claim set details station to load
397
+ */
398
+ async publishClaimSet(args) {
399
+ const { uiShell, uiManagedWorkflows } = this;
400
+ await this.navigateToClaimSetDetails(args);
401
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Publishing').click());
402
+ await uiManagedWorkflows.form.waitForData();
403
+ const action = uiManagedWorkflows.actions.getActionByLabel('Publish');
404
+ try {
405
+ await action.waitFor({ state: 'visible' });
406
+ }
407
+ catch (_a) {
408
+ throw new Error('Claim set could not be published. Are there validation errors?');
409
+ }
410
+ await action.click();
411
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.confirmButton.click());
412
+ await uiManagedWorkflows.form.waitForData();
413
+ }
414
+ /**
415
+ * This method unpublishes a claim set by unique key.
416
+ * The management system must be loaded & signed in before using this method.
417
+ * If the claim set cannot be unpublished then an exception will be raised.
418
+ *
419
+ * The following steps will be taken:
420
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
421
+ * - Filter by unique key and click the claim set row action
422
+ * - Click 'Unpublish' and confirm
423
+ * - Wait for the claim sets details station to load
424
+ */
425
+ async unpublishClaimSet(args) {
426
+ const { uiShell, uiManagedWorkflows } = this;
427
+ await this.navigateToClaimSetDetails(args);
428
+ const action = uiManagedWorkflows.actions.getActionByLabel('Unpublish');
429
+ try {
430
+ await action.waitFor({ state: 'visible' });
431
+ }
432
+ catch (_a) {
433
+ throw new Error('The "Unpublish" action is not visible.');
434
+ }
435
+ await action.click();
436
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.confirmButton.click());
437
+ await uiManagedWorkflows.form.waitForData();
438
+ }
439
+ /**
440
+ * This method deletes a claim set by unique key.
441
+ * The management system must be loaded & signed in before using this method.
442
+ * If the claim set cannot be deleted then an exception will be raised.
443
+ *
444
+ * The following steps will be taken:
445
+ * - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
446
+ * - Filter by unique key and click the claim set row action
447
+ * - Click 'Delete' and confirm
448
+ * - Wait for the claim sets explorer to load
449
+ */
450
+ async deleteClaimSet(args) {
451
+ const { uiShell, uiManagedWorkflows } = this;
452
+ await this.navigateToClaimSetDetails(args);
453
+ // Delete the claim set
454
+ const action = uiManagedWorkflows.actions.getActionByLabel('Delete');
455
+ try {
456
+ await action.waitFor({ state: 'visible' });
457
+ }
458
+ catch (_a) {
459
+ throw new Error('The "Delete" action is not visible.');
460
+ }
461
+ await action.click();
462
+ await uiShell.waitForPageTransition(uiManagedWorkflows.actions.confirmButton.click());
463
+ await uiManagedWorkflows.list.waitForData();
464
+ }
465
+ }
466
+ exports.MonetizationService = MonetizationService;
467
+ //# sourceMappingURL=monetization-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monetization-service.js","sourceRoot":"","sources":["../../../src/managed-services/monetization-service/monetization-service.ts"],"names":[],"mappings":";;;AAAA,6EAA+E;AAC/E,oEAA+D;AAC/D,iGAA0F;AAC1F,uFAAiF;AAUjF,oDAAoD;AACpD,MAAa,mBAAoB,SAAQ,2CAAmB;IAA5D;;QAiiBE;;;;;;;;;;;;;WAaG;QACM,iCAA4B,GAAG,8DAA4B,CAAC;QAErE;;;;;;;;;;;;WAYG;QACM,qCAAgC,GAAG,uEAAgC,CAAC;IAC/E,CAAC;IA9jBC;;;;;;;OAOG;IACH,KAAK,CAAC,2BAA2B;QAC/B,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;QAC7C,MAAM,OAAO,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAC;QAExD,gCAAgC;QAChC,MAAM,KAAK,GAAG,oBAAoB,CAAC;QACnC,MAAM,IAAI,GAAG,kBAAkB,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI;YACF,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;SAC1C;QAAC,WAAM;YACN,MAAM,IAAI,KAAK,CAAC,0BAA0B,KAAK,mBAAmB,CAAC,CAAC;SACrE;QACD,MAAM,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAClD,MAAM,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC9C,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,mBAAmB;QACvB,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;QAC7C,MAAM,OAAO,CAAC,yBAAyB,CAAC,cAAc,CAAC,C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WAAM;YACN,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;SAC3D;QACD,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,OAAO,CAAC,qBAAqB,CACjC,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,CACjD,CAAC;QACF,MAAM,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC9C,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,cAAc,CAAC,IAGpB;QACC,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;QAC7C,MAAM,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;QAE3C,uBAAuB;QACvB,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACrE,IAAI;YACF,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;SAC5C;QAAC,WAAM;YACN,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QACD,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,OAAO,CAAC,qBAAqB,CACjC,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,CACjD,CAAC;QACF,MAAM,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC9C,CAAC;CAgCF;AA/jBD,kDA+jBC"}
@@ -0,0 +1,14 @@
1
+ import { GenericField } from '@axinom/mosaic-e2e-ui-selectors';
2
+ /** A model for a "Recurrence Period" form field on the payment plan details station. */
3
+ export declare class PaymentPlanRecurrencePeriodField extends GenericField {
4
+ readonly quantityInput: import("playwright-core").Locator;
5
+ readonly unitInput: import("playwright-core").Locator;
6
+ /**
7
+ * Sets values for both inputs of the recurrence period field.
8
+ *
9
+ * @param quantity Value for the number entry input
10
+ * @param unit The dropdown label to select
11
+ */
12
+ setValues(quantity: number, unit: 'day(s)' | 'week(s)' | 'month(s)' | 'year(s)'): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=payment-plan-recurrence-period-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-plan-recurrence-period-field.d.ts","sourceRoot":"","sources":["../../../src/managed-services/monetization-service/payment-plan-recurrence-period-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,wFAAwF;AACxF,qBAAa,gCAAiC,SAAQ,YAAY;IAEhE,QAAQ,CAAC,aAAa,oCAEpB;IAEF,QAAQ,CAAC,SAAS,oCAAwD;IAE1E;;;;;OAKG;IACG,SAAS,CACb,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAClD,OAAO,CAAC,IAAI,CAAC;CAIjB"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentPlanRecurrencePeriodField = void 0;
4
+ const mosaic_e2e_ui_selectors_1 = require("@axinom/mosaic-e2e-ui-selectors");
5
+ /** A model for a "Recurrence Period" form field on the payment plan details station. */
6
+ class PaymentPlanRecurrencePeriodField extends mosaic_e2e_ui_selectors_1.GenericField {
7
+ constructor() {
8
+ super(...arguments);
9
+ // TODO: improve selector
10
+ this.quantityInput = this.content.locator('//input[@name="periodQuantity"]');
11
+ // TODO: improve selector
12
+ this.unitInput = this.content.locator('//select[@name="periodUnit"]');
13
+ }
14
+ /**
15
+ * Sets values for both inputs of the recurrence period field.
16
+ *
17
+ * @param quantity Value for the number entry input
18
+ * @param unit The dropdown label to select
19
+ */
20
+ async setValues(quantity, unit) {
21
+ await this.quantityInput.fill(quantity.toString());
22
+ await this.unitInput.selectOption({ label: unit });
23
+ }
24
+ }
25
+ exports.PaymentPlanRecurrencePeriodField = PaymentPlanRecurrencePeriodField;
26
+ //# sourceMappingURL=payment-plan-recurrence-period-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-plan-recurrence-period-field.js","sourceRoot":"","sources":["../../../src/managed-services/monetization-service/payment-plan-recurrence-period-field.ts"],"names":[],"mappings":";;;AAAA,6EAA+D;AAE/D,wFAAwF;AACxF,MAAa,gCAAiC,SAAQ,sCAAY;IAAlE;;QACE,yBAAyB;QAChB,kBAAa,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAC3C,iCAAiC,CAClC,CAAC;QACF,yBAAyB;QAChB,cAAS,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAe5E,CAAC;IAbC;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,QAAgB,EAChB,IAAmD;QAEnD,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;CACF;AArBD,4EAqBC"}
@@ -0,0 +1,18 @@
1
+ import { GenericField } from '@axinom/mosaic-e2e-ui-selectors';
2
+ /** A model for a payment provider settings form field. */
3
+ export declare class PaymentProviderSettingsField extends GenericField {
4
+ /**
5
+ * Add a payment provider.
6
+ *
7
+ * @param paymentProviderKey Unique key for the payment provider. e.g. 'PAYPAL'
8
+ */
9
+ addPaymentProvider(paymentProviderKey: string): Promise<void>;
10
+ /**
11
+ * Set the external ID of an added payment provider.
12
+ *
13
+ * @param paymentProviderKey Unique key for the payment provider. e.g. 'PAYPAL'
14
+ * @param externalId A value to set as the external Id.
15
+ */
16
+ setExternalId(paymentProviderKey: string, externalId: string): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=payment-provider-settings-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-provider-settings-field.d.ts","sourceRoot":"","sources":["../../../src/managed-services/monetization-service/payment-provider-settings-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,0DAA0D;AAC1D,qBAAa,4BAA6B,SAAQ,YAAY;IAC5D;;;;OAIG;IACG,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBnE;;;;;OAKG;IACG,aAAa,CACjB,kBAAkB,EAAE,MAAM,EAC1B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;CAejB"}
@@ -4,6 +4,11 @@ exports.PaymentProviderSettingsField = void 0;
4
4
  const mosaic_e2e_ui_selectors_1 = require("@axinom/mosaic-e2e-ui-selectors");
5
5
  /** A model for a payment provider settings form field. */
6
6
  class PaymentProviderSettingsField extends mosaic_e2e_ui_selectors_1.GenericField {
7
+ /**
8
+ * Add a payment provider.
9
+ *
10
+ * @param paymentProviderKey Unique key for the payment provider. e.g. 'PAYPAL'
11
+ */
7
12
  async addPaymentProvider(paymentProviderKey) {
8
13
  // TODO: improve selector
9
14
  const providerSelect = this.getLocator('//select', 1);
@@ -20,6 +25,12 @@ class PaymentProviderSettingsField extends mosaic_e2e_ui_selectors_1.GenericFiel
20
25
  await providerSelect.selectOption(paymentProviderKey);
21
26
  await providerAddButton.click();
22
27
  }
28
+ /**
29
+ * Set the external ID of an added payment provider.
30
+ *
31
+ * @param paymentProviderKey Unique key for the payment provider. e.g. 'PAYPAL'
32
+ * @param externalId A value to set as the external Id.
33
+ */
23
34
  async setExternalId(paymentProviderKey, externalId) {
24
35
  const input = this.getLocator(
25
36
  // TODO: improve selector
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-provider-settings-field.js","sourceRoot":"","sources":["../../../src/managed-services/monetization-service/payment-provider-settings-field.ts"],"names":[],"mappings":";;;AAAA,6EAA+D;AAE/D,0DAA0D;AAC1D,MAAa,4BAA6B,SAAQ,sCAAY;IAC5D;;;;OAIG;IACH,KAAK,CAAC,kBAAkB,CAAC,kBAA0B;QACjD,yBAAyB;QACzB,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACtD,yBAAyB;QACzB,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAEzD,IAAI;YACF,MAAM,cAAc;iBACjB,OAAO,CAAC,oBAAoB,kBAAkB,IAAI,CAAC;iBACnD,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;SACnC;QAAC,WAAM;YACN,MAAM,IAAI,KAAK,CACb,mCAAmC,kBAAkB,6FAA6F,CACnJ,CAAC;SACH;QACD,MAAM,cAAc,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;QACtD,MAAM,iBAAiB,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,kBAA0B,EAC1B,UAAkB;QAElB,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU;QAC3B,yBAAyB;QACzB,oCAAoC,kBAAkB,gBAAgB,CACvE,CAAC;QAEF,IAAI;YACF,MAAM,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;SAC3C;QAAC,WAAM;YACN,MAAM,IAAI,KAAK,CACb,oDAAoD,kBAAkB,qEAAqE,CAC5I,CAAC;SACH;QACD,MAAM,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC;CACF;AAjDD,oEAiDC"}