@axinom/mosaic-e2e-page-model 0.17.6 → 0.17.7-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/managed-services/index.d.ts +0 -1
- package/dist/managed-services/index.d.ts.map +1 -1
- package/dist/managed-services/index.js +0 -1
- package/dist/managed-services/index.js.map +1 -1
- package/dist/managed-services/managed-service-model.d.ts +2 -2
- package/dist/managed-services/managed-service-model.js +1 -1
- package/dist/page-model.d.ts +2 -4
- package/dist/page-model.d.ts.map +1 -1
- package/dist/page-model.js +1 -3
- package/dist/page-model.js.map +1 -1
- package/dist/ui-selectors/ui-shell-model.d.ts +1 -1
- package/dist/ui-selectors/ui-shell-model.js +1 -1
- package/package.json +3 -3
- package/src/managed-services/index.ts +0 -1
- package/src/managed-services/managed-service-model.ts +1 -1
- package/src/page-model.ts +2 -13
- package/src/ui-selectors/ui-shell-model.ts +1 -1
- package/dist/managed-services/monetization-service/claim-set-control.d.ts +0 -48
- package/dist/managed-services/monetization-service/claim-set-control.d.ts.map +0 -1
- package/dist/managed-services/monetization-service/claim-set-control.js +0 -74
- package/dist/managed-services/monetization-service/claim-set-control.js.map +0 -1
- package/dist/managed-services/monetization-service/index.d.ts +0 -4
- package/dist/managed-services/monetization-service/index.d.ts.map +0 -1
- package/dist/managed-services/monetization-service/index.js +0 -20
- package/dist/managed-services/monetization-service/index.js.map +0 -1
- package/dist/managed-services/monetization-service/monetization-service.d.ts +0 -211
- package/dist/managed-services/monetization-service/monetization-service.d.ts.map +0 -1
- package/dist/managed-services/monetization-service/monetization-service.js +0 -416
- package/dist/managed-services/monetization-service/monetization-service.js.map +0 -1
- package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.d.ts +0 -32
- package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.d.ts.map +0 -1
- package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.js +0 -48
- package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.js.map +0 -1
- package/dist/managed-services/monetization-service/payment-provider-settings-field.d.ts +0 -35
- package/dist/managed-services/monetization-service/payment-provider-settings-field.d.ts.map +0 -1
- package/dist/managed-services/monetization-service/payment-provider-settings-field.js +0 -65
- package/dist/managed-services/monetization-service/payment-provider-settings-field.js.map +0 -1
- package/src/managed-services/monetization-service/claim-set-control.ts +0 -84
- package/src/managed-services/monetization-service/index.ts +0 -3
- package/src/managed-services/monetization-service/monetization-service.ts +0 -552
- package/src/managed-services/monetization-service/payment-plan-recurrence-period-field.ts +0 -54
- package/src/managed-services/monetization-service/payment-provider-settings-field.ts +0 -75
|
@@ -1,416 +0,0 @@
|
|
|
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 claim_set_control_1 = require("./claim-set-control");
|
|
7
|
-
/** A model for the managed monetization service. */
|
|
8
|
-
class MonetizationService extends managed_service_model_1.ManagedServiceModel {
|
|
9
|
-
/**
|
|
10
|
-
* This method navigates to the subscription plans explorer station.
|
|
11
|
-
* The management system must be loaded & signed in before using this method.
|
|
12
|
-
*
|
|
13
|
-
* The following steps will be taken:
|
|
14
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
|
|
15
|
-
* - Wait for data to load
|
|
16
|
-
*/
|
|
17
|
-
async navigateToSubscriptionPlans() {
|
|
18
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
19
|
-
await uiShell.goToNavigationPanelItemByTestIds('monetization-subscriptionplans', 'monetization');
|
|
20
|
-
await uiManagedWorkflows.list.waitForData();
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* This method navigates to the claim sets explorer station.
|
|
24
|
-
* The management system must be loaded & signed in before using this method.
|
|
25
|
-
*
|
|
26
|
-
* The following steps will be taken:
|
|
27
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
28
|
-
* - Wait for data to load
|
|
29
|
-
*/
|
|
30
|
-
async navigateToClaimSets() {
|
|
31
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
32
|
-
await uiShell.goToNavigationPanelItemByTestIds('monetization-claimsets', 'monetization');
|
|
33
|
-
await uiManagedWorkflows.list.waitForData();
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* This method navigates to a subscription plan details station by title.
|
|
37
|
-
* The management system must be loaded & signed in before using this method.
|
|
38
|
-
* If there is not exactly one matching subscription plan an exception will be raised.
|
|
39
|
-
*
|
|
40
|
-
* The following steps will be taken:
|
|
41
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
|
|
42
|
-
* - Filter by title and click the subscription plan row action
|
|
43
|
-
* - Wait for the subscription plan details page to load
|
|
44
|
-
*/
|
|
45
|
-
async navigateToSubscriptionPlanDetails(filterBy) {
|
|
46
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
47
|
-
await this.navigateToSubscriptionPlans();
|
|
48
|
-
// filter to the item
|
|
49
|
-
await uiManagedWorkflows.filters
|
|
50
|
-
.getFilterByName('title')
|
|
51
|
-
.asFreeTextFilter()
|
|
52
|
-
.setValue(filterBy.title);
|
|
53
|
-
await uiManagedWorkflows.list.waitForData();
|
|
54
|
-
// Verify that there is exactly one matching row
|
|
55
|
-
if ((await uiManagedWorkflows.list.allVisibleRows.count()) !== 1) {
|
|
56
|
-
throw new Error(`Failed to find exactly one subscription plan with title '${filterBy.title}'.`);
|
|
57
|
-
}
|
|
58
|
-
// navigate
|
|
59
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.list.getRow(1).actionButton.click());
|
|
60
|
-
await uiManagedWorkflows.form.waitForData();
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* This method navigates to a claim set details station by unique key.
|
|
64
|
-
* The management system must be loaded & signed in before using this method.
|
|
65
|
-
* If there is not exactly one matching claim set an exception will be raised.
|
|
66
|
-
*
|
|
67
|
-
* The following steps will be taken:
|
|
68
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
69
|
-
* - Filter by unique key and click the claim set row action
|
|
70
|
-
* - Wait for the claim set details station to load
|
|
71
|
-
*/
|
|
72
|
-
async navigateToClaimSetDetails(args) {
|
|
73
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
74
|
-
if (this.page.url().endsWith(`/monetization/claimsets/${args.uniqueKey}`)) {
|
|
75
|
-
// already on the correct page. do nothing
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
await this.navigateToClaimSets();
|
|
79
|
-
// filter to the item
|
|
80
|
-
await uiManagedWorkflows.filters
|
|
81
|
-
.getFilterByName('key')
|
|
82
|
-
.asFreeTextFilter()
|
|
83
|
-
.setValue(args.uniqueKey);
|
|
84
|
-
await uiManagedWorkflows.list.waitForData();
|
|
85
|
-
// Verify that there is exactly one matching row
|
|
86
|
-
if ((await uiManagedWorkflows.list.allVisibleRows.count()) !== 1) {
|
|
87
|
-
throw new Error(`Failed to find exactly one claim set with unique key '${args.uniqueKey}'.`);
|
|
88
|
-
}
|
|
89
|
-
// navigate
|
|
90
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.list.getRow(1).actionButton.click());
|
|
91
|
-
await uiManagedWorkflows.form.waitForData();
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* This method assigns a claim set to the subscription plan.
|
|
95
|
-
* The management system must be loaded & signed in before using this method.
|
|
96
|
-
* If the claim set does not exist, or is already added to this subscription plan then an exception will be raised.
|
|
97
|
-
*
|
|
98
|
-
* The following steps will be taken:
|
|
99
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
|
|
100
|
-
* - Filter by title and click the subscription plan row action
|
|
101
|
-
* - Click the 'Claim Sets' action
|
|
102
|
-
* - Open the claim sets explorer modal, filter by key and select the first result
|
|
103
|
-
* - Click the 'previous' breadcrumb and wait for the subscription plan details station to load
|
|
104
|
-
*/
|
|
105
|
-
async assignClaimSetToSubscriptionPlan(args) {
|
|
106
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
107
|
-
await this.navigateToSubscriptionPlanDetails({
|
|
108
|
-
title: args.subscriptionPlanTitle,
|
|
109
|
-
});
|
|
110
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Manage Claim Sets').click());
|
|
111
|
-
await uiManagedWorkflows.form.waitForData();
|
|
112
|
-
// open modal
|
|
113
|
-
await uiManagedWorkflows.form
|
|
114
|
-
.getFieldByLabel('Claim Sets')
|
|
115
|
-
.asDynamicDataListField()
|
|
116
|
-
.dataList.dataEntryRow.addButton.click();
|
|
117
|
-
const modal = uiManagedWorkflows.form.modal.asSelectionExplorer();
|
|
118
|
-
await modal.waitToOpen();
|
|
119
|
-
await modal.list.waitForData();
|
|
120
|
-
// filter to the claim set
|
|
121
|
-
await modal.filters
|
|
122
|
-
.getFilterByName('key')
|
|
123
|
-
.asFreeTextFilter()
|
|
124
|
-
.setValue(args.claimSetUniqueKey);
|
|
125
|
-
await modal.list.waitForData();
|
|
126
|
-
if ((await modal.list.allVisibleRows.count()) !== 1) {
|
|
127
|
-
throw new Error('The claim set was not found or is already assigned.');
|
|
128
|
-
}
|
|
129
|
-
// assign the claim set
|
|
130
|
-
await modal.list.getRow(1).selectButton.click();
|
|
131
|
-
await modal.waitToClose();
|
|
132
|
-
// Back to subscription plan details
|
|
133
|
-
await uiShell.navigateToBreadcrumbPrevious();
|
|
134
|
-
await uiManagedWorkflows.form.waitForData();
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* This method removes a claim set assignment from a subscription plan.
|
|
138
|
-
* The management system must be loaded & signed in before using this method.
|
|
139
|
-
* If the claim set is not assigned to this subscription plan then an exception will be raised.
|
|
140
|
-
*
|
|
141
|
-
* The following steps will be taken:
|
|
142
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
|
|
143
|
-
* - Filter by title and click the subscription plan row action
|
|
144
|
-
* - Click the 'Claim Sets' action
|
|
145
|
-
* - Unassign the claim set using the inline menu
|
|
146
|
-
* - Click the 'previous' breadcrumb and wait for the subscription plan details station to load
|
|
147
|
-
*/
|
|
148
|
-
async removeClaimSetFromSubscriptionPlan(args) {
|
|
149
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
150
|
-
await this.navigateToSubscriptionPlanDetails({
|
|
151
|
-
title: args.subscriptionPlanTitle,
|
|
152
|
-
});
|
|
153
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Manage Claim Sets').click());
|
|
154
|
-
await uiManagedWorkflows.form.waitForData();
|
|
155
|
-
// Find and remove the claim set
|
|
156
|
-
const dataList = uiManagedWorkflows.form
|
|
157
|
-
.getFieldByLabel('Claim Sets')
|
|
158
|
-
.asDynamicDataListField().dataList;
|
|
159
|
-
const row = dataList.getRowByPropertyValue('key', args.claimSetUniqueKey);
|
|
160
|
-
try {
|
|
161
|
-
await row.getLocator().waitFor({ state: 'visible' });
|
|
162
|
-
}
|
|
163
|
-
catch (_a) {
|
|
164
|
-
throw new Error('The claim set was not found on the subscription plan.');
|
|
165
|
-
}
|
|
166
|
-
await row.inlineMenu.openButton.click();
|
|
167
|
-
await row.inlineMenu.getActionByLabel('Unassign').click();
|
|
168
|
-
await dataList.waitForData();
|
|
169
|
-
// Back to subscription plan details
|
|
170
|
-
await uiShell.navigateToBreadcrumbPrevious();
|
|
171
|
-
await uiManagedWorkflows.form.waitForData();
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* This method sets subscription plan status and publishes the subscription plan.
|
|
175
|
-
* The management system must be loaded & signed in before using this method.
|
|
176
|
-
* If the subscription plan cannot be published then an exception will be raised.
|
|
177
|
-
*
|
|
178
|
-
* The following steps will be taken:
|
|
179
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Subscription Plans'
|
|
180
|
-
* - Filter by title and click the subscription plan row action
|
|
181
|
-
* - Set the Status field
|
|
182
|
-
* - Click 'Publishing'
|
|
183
|
-
* - Click 'Publish' and confirm
|
|
184
|
-
* - Wait for the subscription plan details station to load and verify that the publication state is 'PUBLISHED'
|
|
185
|
-
*/
|
|
186
|
-
async publishSubscriptionPlan(args) {
|
|
187
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
188
|
-
await this.navigateToSubscriptionPlanDetails(args);
|
|
189
|
-
if (args.status !== undefined) {
|
|
190
|
-
await uiManagedWorkflows.form
|
|
191
|
-
.getFieldByName('isActive')
|
|
192
|
-
.asRadioField()
|
|
193
|
-
.setValue(args.status === 'Active' ? 'true' : 'false');
|
|
194
|
-
}
|
|
195
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Publishing').click());
|
|
196
|
-
await uiManagedWorkflows.form.waitForData();
|
|
197
|
-
const publishButton = uiManagedWorkflows.actions.getActionByLabel('Publish');
|
|
198
|
-
try {
|
|
199
|
-
await publishButton.waitFor({ state: 'visible' });
|
|
200
|
-
}
|
|
201
|
-
catch (_a) {
|
|
202
|
-
throw new Error('Subscription plan could not be published. Are there validation errors?');
|
|
203
|
-
}
|
|
204
|
-
await publishButton.click();
|
|
205
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.confirmButton.click());
|
|
206
|
-
await uiManagedWorkflows.form.waitForData();
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* This method creates a new claim set.
|
|
210
|
-
* The management system must be loaded & signed in before using this method.
|
|
211
|
-
* When this method completes, the new claim set details station will be loaded.
|
|
212
|
-
*
|
|
213
|
-
* The following steps will be taken:
|
|
214
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
215
|
-
* - Click 'New', enter the title and key then click 'Proceed'
|
|
216
|
-
* - Wait for the claim set details station to load
|
|
217
|
-
*/
|
|
218
|
-
async createClaimSet(properties) {
|
|
219
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
220
|
-
await this.navigateToClaimSets();
|
|
221
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.pageHeader.actions.getActionByLabel('New').click());
|
|
222
|
-
await uiManagedWorkflows.form.waitForData();
|
|
223
|
-
await uiManagedWorkflows.form
|
|
224
|
-
.getFieldByName('title')
|
|
225
|
-
.asSingleLineTextField()
|
|
226
|
-
.setValue(properties.title);
|
|
227
|
-
await uiManagedWorkflows.form
|
|
228
|
-
.getFieldByName('key')
|
|
229
|
-
.asSingleLineTextField()
|
|
230
|
-
.setValue(properties.uniqueKey);
|
|
231
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel(mosaic_e2e_ui_selectors_1.ActionLabel.Proceed).click());
|
|
232
|
-
await uiManagedWorkflows.form.waitForData();
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* This method assigns claims to a claim set.
|
|
236
|
-
* The management system must be loaded & signed in before using this method.
|
|
237
|
-
* NOTE: This method does not support adding claims by mod*a*l.
|
|
238
|
-
*
|
|
239
|
-
* The following steps will be taken:
|
|
240
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
241
|
-
* - Filter by unique key and click the claim set row action
|
|
242
|
-
* - Click 'Claims'
|
|
243
|
-
* - Add each claim by checkbox or radio button
|
|
244
|
-
* - Click the 'previous' breadcrumb and wait for the claim set details station to load
|
|
245
|
-
*/
|
|
246
|
-
async assignClaimsToClaimSet(args) {
|
|
247
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
248
|
-
await this.navigateToClaimSetDetails(args);
|
|
249
|
-
// Open claims editor
|
|
250
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Claims').click());
|
|
251
|
-
// Select each claim
|
|
252
|
-
const claimsEditor = new claim_set_control_1.ClaimsEditor(this.page);
|
|
253
|
-
for (const claim of args.claims) {
|
|
254
|
-
const row = claimsEditor.getClaimRow(claim);
|
|
255
|
-
try {
|
|
256
|
-
await row.getLocator().waitFor({ state: 'visible' });
|
|
257
|
-
}
|
|
258
|
-
catch (e) {
|
|
259
|
-
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.` +
|
|
260
|
-
(e instanceof Error ? `\n${e.message}` : ''));
|
|
261
|
-
}
|
|
262
|
-
await row.toggle();
|
|
263
|
-
}
|
|
264
|
-
// Back to claim set details
|
|
265
|
-
await uiShell.navigateToBreadcrumbPrevious();
|
|
266
|
-
await uiManagedWorkflows.form.waitForData();
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* This method assigns claims to a claim set.
|
|
270
|
-
* The management system must be loaded & signed in before using this method.
|
|
271
|
-
* NOTE: This method *does* support adding claims by mod*a*l.
|
|
272
|
-
*
|
|
273
|
-
* The following steps will be taken:
|
|
274
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
275
|
-
* - Filter by unique key and click the claim set row action
|
|
276
|
-
* - Click 'Claims'
|
|
277
|
-
* - Add each claim by checkbox or radio button
|
|
278
|
-
* - Click the 'previous' breadcrumb and wait for the claim set details station to load
|
|
279
|
-
*/
|
|
280
|
-
async assignClaimsToClaimSetByLabel(args) {
|
|
281
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
282
|
-
await this.navigateToClaimSetDetails(args);
|
|
283
|
-
// Open claims editor
|
|
284
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Claims').click());
|
|
285
|
-
// Select each claim
|
|
286
|
-
const claimsEditor = new claim_set_control_1.ClaimsEditor(this.page);
|
|
287
|
-
const group = claimsEditor.getClaimGroup(args.claimGroupLabel);
|
|
288
|
-
try {
|
|
289
|
-
await group.row.waitFor({ state: 'visible' });
|
|
290
|
-
}
|
|
291
|
-
catch (e) {
|
|
292
|
-
throw new Error(`A claim group with label ${args.claimGroupLabel} is not visible.` +
|
|
293
|
-
(e instanceof Error ? `\n${e.message}` : ''));
|
|
294
|
-
}
|
|
295
|
-
await group.expand();
|
|
296
|
-
if (await group.isDataListEntry()) {
|
|
297
|
-
// Select each claim with selection explorer
|
|
298
|
-
const modal = group.explorerModal;
|
|
299
|
-
for (const claimLabel of args.claimLabels) {
|
|
300
|
-
await group.dataList.dataEntryRow.addButton.click();
|
|
301
|
-
await modal.waitToOpen();
|
|
302
|
-
await modal.list.waitForData();
|
|
303
|
-
// filter to the claim
|
|
304
|
-
await modal.filters
|
|
305
|
-
.getFilterByName('title')
|
|
306
|
-
.asFreeTextFilter()
|
|
307
|
-
.setValue(claimLabel);
|
|
308
|
-
await modal.list.waitForData();
|
|
309
|
-
if ((await modal.list.allVisibleRows.count()) !== 1) {
|
|
310
|
-
throw new Error(`A entry for claim with label '${claimLabel}' is not visible in the modal for group '${args.claimGroupLabel}'.`);
|
|
311
|
-
}
|
|
312
|
-
// assign the claim
|
|
313
|
-
await modal.list.getRow(1).selectButton.click();
|
|
314
|
-
await modal.waitToClose();
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
// Select each claim
|
|
319
|
-
for (const claimLabel of args.claimLabels) {
|
|
320
|
-
const row = group.getClaimRowByLabel(claimLabel);
|
|
321
|
-
try {
|
|
322
|
-
await row.getLocator().waitFor({ state: 'visible' });
|
|
323
|
-
}
|
|
324
|
-
catch (e) {
|
|
325
|
-
throw new Error(`A radio or checkbox for claim with label '${claimLabel}' is not visible in group '${args.claimGroupLabel}'.` +
|
|
326
|
-
(e instanceof Error ? `\n${e.message}` : ''));
|
|
327
|
-
}
|
|
328
|
-
await row.toggle();
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
// Back to claim set details
|
|
332
|
-
await uiShell.navigateToBreadcrumbPrevious();
|
|
333
|
-
await uiManagedWorkflows.form.waitForData();
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* This method publishes a claim set.
|
|
337
|
-
* The management system must be loaded & signed in before using this method.
|
|
338
|
-
* If the claim set cannot be published then an exception will be raised.
|
|
339
|
-
*
|
|
340
|
-
* The following steps will be taken:
|
|
341
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
342
|
-
* - Filter by unique key and click the claim set row action
|
|
343
|
-
* - Click 'Publishing'
|
|
344
|
-
* - Click 'Publish' and confirm
|
|
345
|
-
* - Wait for the claim set details station to load
|
|
346
|
-
*/
|
|
347
|
-
async publishClaimSet(args) {
|
|
348
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
349
|
-
await this.navigateToClaimSetDetails(args);
|
|
350
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.getActionByLabel('Publishing').click());
|
|
351
|
-
await uiManagedWorkflows.form.waitForData();
|
|
352
|
-
const action = uiManagedWorkflows.actions.getActionByLabel('Publish');
|
|
353
|
-
try {
|
|
354
|
-
await action.waitFor({ state: 'visible' });
|
|
355
|
-
}
|
|
356
|
-
catch (_a) {
|
|
357
|
-
throw new Error('Claim set could not be published. Are there validation errors?');
|
|
358
|
-
}
|
|
359
|
-
await action.click();
|
|
360
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.confirmButton.click());
|
|
361
|
-
await uiManagedWorkflows.form.waitForData();
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* This method unpublishes a claim set by unique key.
|
|
365
|
-
* The management system must be loaded & signed in before using this method.
|
|
366
|
-
* If the claim set cannot be unpublished then an exception will be raised.
|
|
367
|
-
*
|
|
368
|
-
* The following steps will be taken:
|
|
369
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
370
|
-
* - Filter by unique key and click the claim set row action
|
|
371
|
-
* - Click 'Unpublish' and confirm
|
|
372
|
-
* - Wait for the claim sets details station to load
|
|
373
|
-
*/
|
|
374
|
-
async unpublishClaimSet(args) {
|
|
375
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
376
|
-
await this.navigateToClaimSetDetails(args);
|
|
377
|
-
const action = uiManagedWorkflows.actions.getActionByLabel('Unpublish');
|
|
378
|
-
try {
|
|
379
|
-
await action.waitFor({ state: 'visible' });
|
|
380
|
-
}
|
|
381
|
-
catch (_a) {
|
|
382
|
-
throw new Error('The "Unpublish" action is not visible.');
|
|
383
|
-
}
|
|
384
|
-
await action.click();
|
|
385
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.confirmButton.click());
|
|
386
|
-
await uiManagedWorkflows.form.waitForData();
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* This method deletes a claim set by unique key.
|
|
390
|
-
* The management system must be loaded & signed in before using this method.
|
|
391
|
-
* If the claim set cannot be deleted then an exception will be raised.
|
|
392
|
-
*
|
|
393
|
-
* The following steps will be taken:
|
|
394
|
-
* - Navigate to the home breadcrumb, then tiles: 'Monetization', 'Claim Sets'
|
|
395
|
-
* - Filter by unique key and click the claim set row action
|
|
396
|
-
* - Click 'Delete' and confirm
|
|
397
|
-
* - Wait for the claim sets explorer to load
|
|
398
|
-
*/
|
|
399
|
-
async deleteClaimSet(args) {
|
|
400
|
-
const { uiShell, uiManagedWorkflows } = this;
|
|
401
|
-
await this.navigateToClaimSetDetails(args);
|
|
402
|
-
// Delete the claim set
|
|
403
|
-
const action = uiManagedWorkflows.actions.getActionByLabel('Delete');
|
|
404
|
-
try {
|
|
405
|
-
await action.waitFor({ state: 'visible' });
|
|
406
|
-
}
|
|
407
|
-
catch (_a) {
|
|
408
|
-
throw new Error('The "Delete" action is not visible.');
|
|
409
|
-
}
|
|
410
|
-
await action.click();
|
|
411
|
-
await uiShell.waitForPageTransition(uiManagedWorkflows.actions.confirmButton.click());
|
|
412
|
-
await uiManagedWorkflows.list.waitForData();
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
exports.MonetizationService = MonetizationService;
|
|
416
|
-
//# sourceMappingURL=monetization-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monetization-service.js","sourceRoot":"","sources":["../../../src/managed-services/monetization-service/monetization-service.ts"],"names":[],"mappings":";;;AAAA,6EAA8D;AAE9D,oEAA+D;AAC/D,2DAAmD;AAUnD,oDAAoD;AACpD,MAAa,mBAAoB,SAAQ,2CAAmB;IAC1D;;;;;;;OAOG;IACH,KAAK,CAAC,2BAA2B;QAC/B,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;QAC7C,MAAM,OAAO,CAAC,gCAAgC,CAC5C,gCAAgC,EAChC,cAAc,CACf,CAAC;QAEF,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,gCAAgC,CAC5C,wBAAwB,EACxB,cAAc,CACf,CAAC;QAEF,MAAM,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IAC9C,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,iCAAiC,CAAC,QAGvC;QACC,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;QAC7C,MAAM,IAAI,CAAC,2BAA2B,EAAE,CAAC;QAEzC,qBAAqB;QACrB,MAAM,kBAAkB,CAAC,OAAO;aAC7B,eAAe,CAAC,OAAO,CAAC;aACxB,gBAAgB,EAAE;aAClB,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAE5C,gDAAgD;QAChD,IAAI,CAAC,MAAM,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE;YAChE,MAAM,IAAI,KAAK,CACb,4DAA4D,QAAQ,CAAC,KAAK,IAAI,CAC/E,CAAC;SAC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CAAC;CACF;AAzhBD,kDAyhBC"}
|
package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { GenericField } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
-
import { Locator } from 'playwright-core';
|
|
3
|
-
/**
|
|
4
|
-
* A model for a "Recurrence Period" form field which can be used to configure
|
|
5
|
-
* the "Recurrence Period" field on payment plans. This is a custom FormField component.
|
|
6
|
-
*
|
|
7
|
-
* It is advised not to use this model directly but to use fixed pre-configured
|
|
8
|
-
* subscription plans for end-to-end testing of payment provider integrations.
|
|
9
|
-
*
|
|
10
|
-
* Example usage:
|
|
11
|
-
* ```
|
|
12
|
-
* await uiManagedWorkflows.form
|
|
13
|
-
* .getFieldByLabel('Recurrence Period')
|
|
14
|
-
* .as(PaymentPlanRecurrencePeriodField)
|
|
15
|
-
* .setValues(1, 'WEEK');
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare class PaymentPlanRecurrencePeriodField extends GenericField {
|
|
19
|
-
/** @inheritdoc */
|
|
20
|
-
protected get fieldTypeValidator(): string;
|
|
21
|
-
readonly quantityInput: Locator;
|
|
22
|
-
readonly unitInput: Locator;
|
|
23
|
-
readonly option: (value: string) => Locator;
|
|
24
|
-
/**
|
|
25
|
-
* Sets values for both inputs of the recurrence period field.
|
|
26
|
-
*
|
|
27
|
-
* @param quantity Value for the number entry input
|
|
28
|
-
* @param unit The dropdown label to select
|
|
29
|
-
*/
|
|
30
|
-
setValues(quantity: number, unit: 'day(s)' | 'week(s)' | 'month(s)' | 'year(s)'): Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=payment-plan-recurrence-period-field.d.ts.map
|
package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C;;;;;;;;;;;;;;GAcG;AACH,qBAAa,gCAAiC,SAAQ,YAAY;IAChE,kBAAkB;IAClB,cAAuB,kBAAkB,IAAI,MAAM,CAElD;IAED,QAAQ,CAAC,aAAa,UAEpB;IAEF,QAAQ,CAAC,SAAS,UAA4C;IAE9D,QAAQ,CAAC,MAAM,UAAW,MAAM,KAAG,OAAO,CAGtC;IAEJ;;;;;OAKG;IACG,SAAS,CACb,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAClD,OAAO,CAAC,IAAI,CAAC;CASjB"}
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* A model for a "Recurrence Period" form field which can be used to configure
|
|
7
|
-
* the "Recurrence Period" field on payment plans. This is a custom FormField component.
|
|
8
|
-
*
|
|
9
|
-
* It is advised not to use this model directly but to use fixed pre-configured
|
|
10
|
-
* subscription plans for end-to-end testing of payment provider integrations.
|
|
11
|
-
*
|
|
12
|
-
* Example usage:
|
|
13
|
-
* ```
|
|
14
|
-
* await uiManagedWorkflows.form
|
|
15
|
-
* .getFieldByLabel('Recurrence Period')
|
|
16
|
-
* .as(PaymentPlanRecurrencePeriodField)
|
|
17
|
-
* .setValues(1, 'WEEK');
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
class PaymentPlanRecurrencePeriodField extends mosaic_e2e_ui_selectors_1.GenericField {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.quantityInput = this.content.locator('//input[@name="periodQuantity"]');
|
|
24
|
-
this.unitInput = this.getLocator('//*[@id="periodUnit"]');
|
|
25
|
-
this.option = (value) => this.getGlobalLocator(`//li[@role="option" and normalize-space(text())="${value}"]`);
|
|
26
|
-
}
|
|
27
|
-
/** @inheritdoc */
|
|
28
|
-
get fieldTypeValidator() {
|
|
29
|
-
return '[@data-test-type="PaymentProviderRecurrencePeriod"]';
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Sets values for both inputs of the recurrence period field.
|
|
33
|
-
*
|
|
34
|
-
* @param quantity Value for the number entry input
|
|
35
|
-
* @param unit The dropdown label to select
|
|
36
|
-
*/
|
|
37
|
-
async setValues(quantity, unit) {
|
|
38
|
-
await this.verifyFieldType();
|
|
39
|
-
await this.quantityInput.fill(quantity.toString());
|
|
40
|
-
await this.unitInput.click();
|
|
41
|
-
await this.unitInput.fill(unit);
|
|
42
|
-
const optionElement = this.option(unit);
|
|
43
|
-
await optionElement.waitFor({ state: 'visible' });
|
|
44
|
-
await optionElement.click();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.PaymentPlanRecurrencePeriodField = PaymentPlanRecurrencePeriodField;
|
|
48
|
-
//# sourceMappingURL=payment-plan-recurrence-period-field.js.map
|
package/dist/managed-services/monetization-service/payment-plan-recurrence-period-field.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;AAG/D;;;;;;;;;;;;;;GAcG;AACH,MAAa,gCAAiC,SAAQ,sCAAY;IAAlE;;QAMW,kBAAa,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAC3C,iCAAiC,CAClC,CAAC;QAEO,cAAS,GAAG,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;QAErD,WAAM,GAAG,CAAC,KAAa,EAAW,EAAE,CAC3C,IAAI,CAAC,gBAAgB,CACnB,oDAAoD,KAAK,IAAI,CAC9D,CAAC;IAoBN,CAAC;IAlCC,kBAAkB;IAClB,IAAuB,kBAAkB;QACvC,OAAO,qDAAqD,CAAC;IAC/D,CAAC;IAaD;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,QAAgB,EAChB,IAAmD;QAEnD,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAC7B,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,aAAa,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAClD,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AAnCD,4EAmCC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { GenericField } from '@axinom/mosaic-e2e-ui-selectors';
|
|
2
|
-
/** A model for a payment provider settings form field which can
|
|
3
|
-
* be used to configure payment provider settings on subscription plans and
|
|
4
|
-
* payment plans. This is a custom FormField component.
|
|
5
|
-
*
|
|
6
|
-
* It is advised not to use this model directly but to use fixed pre-configured
|
|
7
|
-
* subscription plans for end-to-end testing of payment provider integrations.
|
|
8
|
-
*
|
|
9
|
-
* Example usage:
|
|
10
|
-
* ```
|
|
11
|
-
* const field = uiManagedWorkflows.form
|
|
12
|
-
* .getFieldByLabel('Payment Providers & Settings')
|
|
13
|
-
* .as(PaymentProviderSettingsField);
|
|
14
|
-
* await field.addPaymentProvider('PAYPAL');
|
|
15
|
-
* await field.setExternalId('PAYPAL', 'P-123XYZ');
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare class PaymentProviderSettingsField extends GenericField {
|
|
19
|
-
/** @inheritdoc */
|
|
20
|
-
protected get fieldTypeValidator(): string;
|
|
21
|
-
/**
|
|
22
|
-
* Add a payment provider.
|
|
23
|
-
*
|
|
24
|
-
* @param paymentProviderTitle Label for the payment provider. e.g. 'PayPal'
|
|
25
|
-
*/
|
|
26
|
-
addPaymentProvider(paymentProviderTitle: string): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Set the external ID of an added payment provider.
|
|
29
|
-
*
|
|
30
|
-
* @param paymentProviderTitle Label for the payment provider. e.g. 'PayPal'
|
|
31
|
-
* @param externalId A value to set as the external Id.
|
|
32
|
-
*/
|
|
33
|
-
setExternalId(paymentProviderTitle: string, externalId: string): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=payment-provider-settings-field.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,4BAA6B,SAAQ,YAAY;IAC5D,kBAAkB;IAClB,cAAuB,kBAAkB,IAAI,MAAM,CAElD;IAED;;;;OAIG;IACG,kBAAkB,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBrE;;;;;OAKG;IACG,aAAa,CACjB,oBAAoB,EAAE,MAAM,EAC5B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;CAejB"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentProviderSettingsField = void 0;
|
|
4
|
-
const mosaic_e2e_ui_selectors_1 = require("@axinom/mosaic-e2e-ui-selectors");
|
|
5
|
-
/** A model for a payment provider settings form field which can
|
|
6
|
-
* be used to configure payment provider settings on subscription plans and
|
|
7
|
-
* payment plans. This is a custom FormField component.
|
|
8
|
-
*
|
|
9
|
-
* It is advised not to use this model directly but to use fixed pre-configured
|
|
10
|
-
* subscription plans for end-to-end testing of payment provider integrations.
|
|
11
|
-
*
|
|
12
|
-
* Example usage:
|
|
13
|
-
* ```
|
|
14
|
-
* const field = uiManagedWorkflows.form
|
|
15
|
-
* .getFieldByLabel('Payment Providers & Settings')
|
|
16
|
-
* .as(PaymentProviderSettingsField);
|
|
17
|
-
* await field.addPaymentProvider('PAYPAL');
|
|
18
|
-
* await field.setExternalId('PAYPAL', 'P-123XYZ');
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
class PaymentProviderSettingsField extends mosaic_e2e_ui_selectors_1.GenericField {
|
|
22
|
-
/** @inheritdoc */
|
|
23
|
-
get fieldTypeValidator() {
|
|
24
|
-
return '[@data-test-type="SubscriptionPlanProviderConfigs" or @data-test-type="PaymentPlanProviderConfigs"]';
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Add a payment provider.
|
|
28
|
-
*
|
|
29
|
-
* @param paymentProviderTitle Label for the payment provider. e.g. 'PayPal'
|
|
30
|
-
*/
|
|
31
|
-
async addPaymentProvider(paymentProviderTitle) {
|
|
32
|
-
const providerSelect = this.getLocator('//input[@id="addPaymentProvider"]');
|
|
33
|
-
const providerOption = this.getGlobalLocator(`//li[normalize-space(text())='${paymentProviderTitle}']`);
|
|
34
|
-
const providerAddButton = this.getLocator('//button[@data-test-id="payment-provider-add-button"]');
|
|
35
|
-
await this.verifyFieldType();
|
|
36
|
-
try {
|
|
37
|
-
await providerSelect.click();
|
|
38
|
-
await providerOption.waitFor({ state: 'attached' });
|
|
39
|
-
}
|
|
40
|
-
catch (_a) {
|
|
41
|
-
throw new Error(`Could not add payment provider '${paymentProviderTitle}'. Is the payment provider enabled for this environment and not already added to this plan?`);
|
|
42
|
-
}
|
|
43
|
-
await providerOption.click();
|
|
44
|
-
await providerAddButton.click();
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Set the external ID of an added payment provider.
|
|
48
|
-
*
|
|
49
|
-
* @param paymentProviderTitle Label for the payment provider. e.g. 'PayPal'
|
|
50
|
-
* @param externalId A value to set as the external Id.
|
|
51
|
-
*/
|
|
52
|
-
async setExternalId(paymentProviderTitle, externalId) {
|
|
53
|
-
const input = this.getLocator(`//*[@data-test-id="payment-provider-config:${paymentProviderTitle}"]//input[contains(@name, "externalId")]`);
|
|
54
|
-
await this.verifyFieldType();
|
|
55
|
-
try {
|
|
56
|
-
await input.waitFor({ state: 'visible' });
|
|
57
|
-
}
|
|
58
|
-
catch (_a) {
|
|
59
|
-
throw new Error(`Could not set 'externalId' for payment provider '${paymentProviderTitle}'. Is the payment provider enabled and not published for this plan?`);
|
|
60
|
-
}
|
|
61
|
-
await input.fill(externalId);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.PaymentProviderSettingsField = PaymentProviderSettingsField;
|
|
65
|
-
//# sourceMappingURL=payment-provider-settings-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;;;;;GAeG;AACH,MAAa,4BAA6B,SAAQ,sCAAY;IAC5D,kBAAkB;IAClB,IAAuB,kBAAkB;QACvC,OAAO,qGAAqG,CAAC;IAC/G,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,kBAAkB,CAAC,oBAA4B;QACnD,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mCAAmC,CAAC,CAAC;QAC5E,MAAM,cAAc,GAAG,IAAI,CAA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