@nocobase/plugin-workflow-test 1.6.0-alpha.3 → 1.6.0-alpha.31
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/e2e/e2ePageObjectModel.js +30 -32
- package/dist/e2e/e2eUtils.d.ts +2 -0
- package/dist/e2e/e2eUtils.js +7 -3
- package/dist/externalVersion.js +6 -6
- package/dist/server/collections/categories.js +8 -0
- package/dist/server/collections/comments.js +10 -0
- package/dist/server/collections/posts.js +13 -0
- package/dist/server/collections/replies.d.ts +2 -0
- package/dist/server/collections/replies.js +10 -0
- package/dist/server/collections/tags.js +10 -0
- package/dist/server/index.js +1 -1
- package/dist/server/instructions.d.ts +5 -0
- package/dist/server/instructions.js +26 -0
- package/package.json +2 -2
|
@@ -145,7 +145,7 @@ class ApprovalTriggerNode {
|
|
|
145
145
|
this.page = page;
|
|
146
146
|
this.node = page.getByLabel(`Trigger-${triggerName}`);
|
|
147
147
|
this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
|
|
148
|
-
this.nodeConfigure =
|
|
148
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
149
149
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
150
150
|
this.dataBlocksInitiationRadio = page.getByLabel("Initiate and approve in data blocks only");
|
|
151
151
|
this.dataBlocksAndGlobalApprovalBlocksInitiationRadio = page.getByLabel(
|
|
@@ -200,27 +200,27 @@ class ApprovalPassthroughModeNode {
|
|
|
200
200
|
this.page = page;
|
|
201
201
|
this.node = page.getByLabel(`Approval-${nodeName}`, { exact: true });
|
|
202
202
|
this.nodeTitle = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
203
|
-
this.nodeConfigure =
|
|
204
|
-
this.addAssigneesButton = page.getByRole("button", { name: "plus Add
|
|
203
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
204
|
+
this.addAssigneesButton = page.getByLabel("block-item-ArrayItems-workflows-Assignees").getByRole("button", { name: "plus Add" });
|
|
205
205
|
this.addSelectAssigneesMenu = page.getByRole("button", { name: "Select assignees" });
|
|
206
206
|
this.addQueryAssigneesMenu = page.getByRole("button", { name: "Query assignees" });
|
|
207
207
|
this.assigneesDropDown = page.getByTestId("select-single");
|
|
208
208
|
this.OrRadio = page.getByLabel("Or", { exact: true });
|
|
209
209
|
this.AndRadio = page.getByLabel("And", { exact: true });
|
|
210
210
|
this.votingRadio = page.getByLabel("Voting", { exact: true });
|
|
211
|
-
this.votingThresholdEditBox = page.getByLabel("block-item-
|
|
211
|
+
this.votingThresholdEditBox = page.getByLabel("block-item-Negotiation-workflows-Negotiation mode").getByRole("spinbutton");
|
|
212
212
|
this.parallellyRadio = page.getByLabel("Parallelly", { exact: true });
|
|
213
213
|
this.sequentiallyRadio = page.getByLabel("Sequentially", { exact: true });
|
|
214
214
|
this.goToconfigureButton = page.getByRole("button", { name: "Go to configure" });
|
|
215
215
|
this.addBlockButton = page.getByLabel("schema-initializer-Grid-ApprovalProcessAddBlockButton-workflows");
|
|
216
|
-
this.addDetailsMenu = page.getByRole("menuitem", { name: "
|
|
216
|
+
this.addDetailsMenu = page.getByRole("menuitem", { name: "Original application content" });
|
|
217
217
|
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
218
218
|
`schema-initializer-Grid-details:configureFields-${collectionName}`
|
|
219
219
|
);
|
|
220
|
-
this.addActionsMenu = page.getByRole("menuitem", { name: "
|
|
220
|
+
this.addActionsMenu = page.getByRole("menuitem", { name: "Process form" }).getByRole("switch");
|
|
221
221
|
this.actionsConfigureFieldsButton = page.getByLabel("schema-initializer-Grid-FormItemInitializers-approvalRecords");
|
|
222
222
|
this.actionsConfigureActionsButton = page.getByLabel(
|
|
223
|
-
"schema-initializer-ActionBar-ApprovalProcessAddActionButton-
|
|
223
|
+
"schema-initializer-ActionBar-ApprovalProcessAddActionButton-"
|
|
224
224
|
);
|
|
225
225
|
this.addApproveButton = page.getByRole("menuitem", { name: "Approve" }).getByRole("switch");
|
|
226
226
|
this.addRejectButton = page.getByRole("menuitem", { name: "Reject" }).getByRole("switch");
|
|
@@ -268,28 +268,26 @@ class ApprovalBranchModeNode {
|
|
|
268
268
|
this.page = page;
|
|
269
269
|
this.node = page.getByLabel(`Approval-${nodeName}`, { exact: true });
|
|
270
270
|
this.nodeTitle = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
271
|
-
this.nodeConfigure =
|
|
272
|
-
this.addAssigneesButton = page.getByRole("button", { name: "plus Add
|
|
271
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
272
|
+
this.addAssigneesButton = page.getByLabel("block-item-ArrayItems-workflows-Assignees").getByRole("button", { name: "plus Add" });
|
|
273
273
|
this.addSelectAssigneesMenu = page.getByRole("button", { name: "Select assignees" });
|
|
274
274
|
this.addQueryAssigneesMenu = page.getByRole("button", { name: "Query assignees" });
|
|
275
275
|
this.assigneesDropDown = page.getByTestId("select-single");
|
|
276
276
|
this.OrRadio = page.getByLabel("Or", { exact: true });
|
|
277
277
|
this.AndRadio = page.getByLabel("And", { exact: true });
|
|
278
278
|
this.votingRadio = page.getByLabel("Voting", { exact: true });
|
|
279
|
-
this.votingThresholdEditBox = page.getByLabel("block-item-
|
|
279
|
+
this.votingThresholdEditBox = page.getByLabel("block-item-Negotiation-workflows-Negotiation mode").getByRole("spinbutton");
|
|
280
280
|
this.parallellyRadio = page.getByLabel("Parallelly", { exact: true });
|
|
281
281
|
this.sequentiallyRadio = page.getByLabel("Sequentially", { exact: true });
|
|
282
282
|
this.goToconfigureButton = page.getByRole("button", { name: "Go to configure" });
|
|
283
283
|
this.addBlockButton = page.getByLabel("schema-initializer-Grid-ApprovalProcessAddBlockButton-workflows");
|
|
284
|
-
this.addDetailsMenu = page.getByRole("menuitem", { name: "
|
|
284
|
+
this.addDetailsMenu = page.getByRole("menuitem", { name: "Original application content" });
|
|
285
285
|
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
286
286
|
`schema-initializer-Grid-details:configureFields-${collectionName}`
|
|
287
287
|
);
|
|
288
|
-
this.addActionsMenu = page.getByRole("menuitem", { name: "
|
|
288
|
+
this.addActionsMenu = page.getByRole("menuitem", { name: "Process form" }).getByRole("switch");
|
|
289
289
|
this.actionsConfigureFieldsButton = page.getByLabel("schema-initializer-Grid-FormItemInitializers-approvalRecords");
|
|
290
|
-
this.actionsConfigureActionsButton = page.getByLabel(
|
|
291
|
-
"schema-initializer-ActionBar-ApprovalProcessAddActionButton-approvalRecords"
|
|
292
|
-
);
|
|
290
|
+
this.actionsConfigureActionsButton = page.getByLabel("schema-initializer-ActionBar-");
|
|
293
291
|
this.addApproveButton = page.getByRole("menuitem", { name: "Approve" }).getByRole("switch");
|
|
294
292
|
this.addRejectButton = page.getByRole("menuitem", { name: "Reject" }).getByRole("switch");
|
|
295
293
|
this.addReturnButton = page.getByRole("menuitem", { name: "Return" }).getByRole("switch");
|
|
@@ -319,9 +317,9 @@ class ScheduleTriggerNode {
|
|
|
319
317
|
addNodeButton;
|
|
320
318
|
constructor(page, triggerName, collectionName) {
|
|
321
319
|
this.page = page;
|
|
322
|
-
this.node = page.
|
|
320
|
+
this.node = page.getByLabel(`Trigger-${triggerName}`);
|
|
323
321
|
this.nodeTitle = page.locator("textarea").filter({ hasText: triggerName });
|
|
324
|
-
this.nodeConfigure =
|
|
322
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
325
323
|
this.customTimeTriggerOptions = page.getByLabel("Based on certain date");
|
|
326
324
|
this.startTimeEntryBox = page.getByPlaceholder("Select date");
|
|
327
325
|
this.RrpeatModeDropdown = page.getByLabel("block-item-RepeatField-workflows-Repeat mode");
|
|
@@ -347,7 +345,7 @@ class CollectionTriggerNode {
|
|
|
347
345
|
this.page = page;
|
|
348
346
|
this.node = page.getByLabel(`Trigger-${triggerName}`);
|
|
349
347
|
this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
|
|
350
|
-
this.nodeConfigure =
|
|
348
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
351
349
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
352
350
|
this.triggerOnDropdown = page.getByLabel("block-item-Select-workflows-Trigger on").getByRole("button", { name: "Trigger on" });
|
|
353
351
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
@@ -369,7 +367,7 @@ class FormEventTriggerNode {
|
|
|
369
367
|
this.page = page;
|
|
370
368
|
this.node = page.getByLabel(`Trigger-${triggerName}`);
|
|
371
369
|
this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
|
|
372
|
-
this.nodeConfigure =
|
|
370
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
373
371
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
374
372
|
this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
|
|
375
373
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
@@ -391,7 +389,7 @@ class CustomActionEventTriggerNode {
|
|
|
391
389
|
this.page = page;
|
|
392
390
|
this.node = page.getByLabel(`Trigger-${triggerName}`);
|
|
393
391
|
this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
|
|
394
|
-
this.nodeConfigure =
|
|
392
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
395
393
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
396
394
|
this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
|
|
397
395
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
@@ -414,7 +412,7 @@ class CalculationNode {
|
|
|
414
412
|
this.page = page;
|
|
415
413
|
this.node = page.getByLabel(`Calculation-${nodeName}`, { exact: true });
|
|
416
414
|
this.nodeTitle = page.getByLabel(`Calculation-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
417
|
-
this.nodeConfigure =
|
|
415
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
418
416
|
this.mathCalculationEngine = page.getByLabel("Math.js");
|
|
419
417
|
this.formulaCalculationEngine = page.getByLabel("Formula.js");
|
|
420
418
|
this.calculationExpression = page.getByLabel("textbox");
|
|
@@ -444,7 +442,7 @@ class QueryRecordNode {
|
|
|
444
442
|
this.page = page;
|
|
445
443
|
this.node = page.getByLabel(`Query record-${nodeName}`, { exact: true });
|
|
446
444
|
this.nodeTitle = page.getByLabel(`Query record-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
447
|
-
this.nodeConfigure =
|
|
445
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
448
446
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
449
447
|
this.singleRecordRadioButton = page.getByLabel("block-item-RadioWithTooltip-").getByLabel("Single record");
|
|
450
448
|
this.multipleRecordsRadioButton = page.getByLabel("block-item-RadioWithTooltip-").getByLabel("Multiple records");
|
|
@@ -472,7 +470,7 @@ class CreateRecordNode {
|
|
|
472
470
|
this.page = page;
|
|
473
471
|
this.node = page.getByLabel(`Create record-${nodeName}`, { exact: true });
|
|
474
472
|
this.nodeTitle = page.getByLabel(`Create record-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
475
|
-
this.nodeConfigure =
|
|
473
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
476
474
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
477
475
|
this.addFieldsButton = page.getByLabel("schema-initializer-Grid-assignFieldValuesForm:configureFields");
|
|
478
476
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
@@ -496,7 +494,7 @@ class UpdateRecordNode {
|
|
|
496
494
|
this.page = page;
|
|
497
495
|
this.node = page.getByLabel(`Update record-${nodeName}`, { exact: true });
|
|
498
496
|
this.nodeTitle = page.getByLabel(`Update record-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
499
|
-
this.nodeConfigure =
|
|
497
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
500
498
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
501
499
|
this.batchUpdateModeRadio = page.getByLabel("block-item-RadioWithTooltip-workflows-Update mode").getByLabel("Update in a batch");
|
|
502
500
|
this.articleByArticleUpdateModeRadio = page.getByLabel("block-item-RadioWithTooltip-workflows-Update mode").getByLabel("Update one by one");
|
|
@@ -519,7 +517,7 @@ class DeleteRecordNode {
|
|
|
519
517
|
this.page = page;
|
|
520
518
|
this.node = page.getByLabel(`Delete record-${nodeName}`, { exact: true });
|
|
521
519
|
this.nodeTitle = page.getByLabel(`Delete record-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
522
|
-
this.nodeConfigure =
|
|
520
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
523
521
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
524
522
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
525
523
|
this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
|
|
@@ -548,7 +546,7 @@ class AggregateNode {
|
|
|
548
546
|
this.page = page;
|
|
549
547
|
this.node = page.getByLabel(`Aggregate-${nodeName}`, { exact: true });
|
|
550
548
|
this.nodeTitle = page.getByLabel(`Aggregate-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
551
|
-
this.nodeConfigure =
|
|
549
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
552
550
|
this.countRadio = page.getByLabel("COUNT");
|
|
553
551
|
this.sumRadio = page.getByLabel("SUM", { exact: true });
|
|
554
552
|
this.avgRadio = page.getByLabel("AVG", { exact: true });
|
|
@@ -558,7 +556,7 @@ class AggregateNode {
|
|
|
558
556
|
this.linkedDataTableDataRadio = page.getByLabel("Data of associated collection");
|
|
559
557
|
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Data of collection").locator(".ant-select-selection-search-input");
|
|
560
558
|
this.aggregatedFieldDropDown = page.getByLabel("block-item-FieldsSelect-workflows-Field to aggregate").locator(".ant-select-selection-search-input");
|
|
561
|
-
this.distinctCheckBox = page.getByLabel("block-item-Checkbox-workflows
|
|
559
|
+
this.distinctCheckBox = page.getByLabel("block-item-Checkbox-workflows").locator('input.ant-checkbox-input[type="checkbox"]');
|
|
562
560
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
563
561
|
this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
|
|
564
562
|
this.addNodeButton = page.getByLabel(`add-button-aggregate-${nodeName}`, { exact: true });
|
|
@@ -584,7 +582,7 @@ class ManualNode {
|
|
|
584
582
|
this.page = page;
|
|
585
583
|
this.node = page.getByLabel(`Manual-${nodeName}`, { exact: true });
|
|
586
584
|
this.nodeTitle = page.getByLabel(`Manual-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
587
|
-
this.nodeConfigure =
|
|
585
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
588
586
|
this.assigneesDropDown = page.getByTestId("select-single");
|
|
589
587
|
this.configureUserInterfaceButton = page.getByRole("button", { name: "Configure user interface" });
|
|
590
588
|
this.addBlockButton = page.getByLabel(
|
|
@@ -616,7 +614,7 @@ class ConditionYesNode {
|
|
|
616
614
|
this.page = page;
|
|
617
615
|
this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
|
|
618
616
|
this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
619
|
-
this.nodeConfigure =
|
|
617
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
620
618
|
this.conditionExpressionEditBox = page.getByLabel("textbox");
|
|
621
619
|
this.basicRadio = page.getByLabel("Basic");
|
|
622
620
|
this.mathRadio = page.getByLabel("Math.js");
|
|
@@ -644,7 +642,7 @@ class ConditionBranchNode {
|
|
|
644
642
|
this.page = page;
|
|
645
643
|
this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
|
|
646
644
|
this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
647
|
-
this.nodeConfigure =
|
|
645
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
648
646
|
this.conditionExpressionEditBox = page.getByLabel("textbox");
|
|
649
647
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
650
648
|
this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
|
|
@@ -669,7 +667,7 @@ class SQLNode {
|
|
|
669
667
|
this.page = page;
|
|
670
668
|
this.node = page.getByLabel(`SQL action-${nodeName}`, { exact: true });
|
|
671
669
|
this.nodeTitle = page.getByLabel(`SQL action-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
672
|
-
this.nodeConfigure =
|
|
670
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
673
671
|
this.sqlEditBox = page.getByLabel("block-item-WorkflowVariableRawTextArea-workflows-SQL").getByRole("textbox");
|
|
674
672
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
675
673
|
this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
|
|
@@ -692,7 +690,7 @@ class ParallelBranchNode {
|
|
|
692
690
|
this.page = page;
|
|
693
691
|
this.node = page.getByLabel(`Parallel branch-${nodeName}`, { exact: true });
|
|
694
692
|
this.nodeTitle = page.locator("textarea").filter({ hasText: nodeName });
|
|
695
|
-
this.nodeConfigure =
|
|
693
|
+
this.nodeConfigure = this.node.locator(">div").first();
|
|
696
694
|
this.addBranchButton = page.getByLabel(`add-button-parallel-${nodeName}-add-branch`, { exact: true });
|
|
697
695
|
this.allSucceededRadio = page.getByLabel("All succeeded", { exact: true });
|
|
698
696
|
this.anySucceededRadio = page.getByLabel("Any succeeded", { exact: true });
|
package/dist/e2e/e2eUtils.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare const apiCreateRecordTriggerActionEvent: (collectionName: string,
|
|
|
27
27
|
export declare const apiTriggerCustomActionEvent: (collectionName: string, triggerWorkflows: string, data: any) => Promise<any>;
|
|
28
28
|
export declare const apiApplyApprovalEvent: (data: any) => Promise<any>;
|
|
29
29
|
export declare const apiCreateField: (collectionName: string, data: any) => Promise<any>;
|
|
30
|
+
export declare const approvalUserPassword = "1a2B3c4#";
|
|
30
31
|
export declare const userLogin: (browser: Browser, approvalUserEmail: string, approvalUser: string) => Promise<import("playwright-core").BrowserContext>;
|
|
31
32
|
declare const _default: {
|
|
32
33
|
apiCreateWorkflow: (data: any) => Promise<any>;
|
|
@@ -50,5 +51,6 @@ declare const _default: {
|
|
|
50
51
|
userLogin: (browser: Browser, approvalUserEmail: string, approvalUser: string) => Promise<import("playwright-core").BrowserContext>;
|
|
51
52
|
apiCreateField: (collectionName: string, data: any) => Promise<any>;
|
|
52
53
|
apiTriggerCustomActionEvent: (collectionName: string, triggerWorkflows: string, data: any) => Promise<any>;
|
|
54
|
+
approvalUserPassword: string;
|
|
53
55
|
};
|
|
54
56
|
export default _default;
|
package/dist/e2e/e2eUtils.js
CHANGED
|
@@ -46,6 +46,7 @@ __export(e2eUtils_exports, {
|
|
|
46
46
|
apiUpdateWorkflow: () => apiUpdateWorkflow,
|
|
47
47
|
apiUpdateWorkflowNode: () => apiUpdateWorkflowNode,
|
|
48
48
|
apiUpdateWorkflowTrigger: () => apiUpdateWorkflowTrigger,
|
|
49
|
+
approvalUserPassword: () => approvalUserPassword,
|
|
49
50
|
default: () => e2eUtils_default,
|
|
50
51
|
userLogin: () => userLogin
|
|
51
52
|
});
|
|
@@ -176,7 +177,7 @@ const apiGetWorkflowNodeExecutions = async (id) => {
|
|
|
176
177
|
});
|
|
177
178
|
const state = await api.storageState();
|
|
178
179
|
const headers = getHeaders(state);
|
|
179
|
-
const url = `/api/executions:list?appends[]=jobs&filter[workflowId]=${id}&fields=id,createdAt,updatedAt,key,status,workflowId
|
|
180
|
+
const url = `/api/executions:list?appends[]=jobs&filter[workflowId]=${id}&fields=id,createdAt,updatedAt,key,status,workflowId`;
|
|
180
181
|
const result = await api.get(url, {
|
|
181
182
|
headers
|
|
182
183
|
});
|
|
@@ -387,12 +388,13 @@ function getHeaders(storageState) {
|
|
|
387
388
|
}
|
|
388
389
|
return headers;
|
|
389
390
|
}
|
|
391
|
+
const approvalUserPassword = "1a2B3c4#";
|
|
390
392
|
const userLogin = async (browser, approvalUserEmail, approvalUser) => {
|
|
391
393
|
const context = await browser.newContext();
|
|
392
394
|
const page = await context.newPage();
|
|
393
395
|
await page.goto("signin");
|
|
394
396
|
await page.getByPlaceholder("Email").fill(approvalUserEmail);
|
|
395
|
-
await page.getByPlaceholder("Password").fill(
|
|
397
|
+
await page.getByPlaceholder("Password").fill(approvalUserPassword);
|
|
396
398
|
await page.getByRole("button", { name: "Sign in" }).click();
|
|
397
399
|
await page.waitForLoadState("load");
|
|
398
400
|
return context;
|
|
@@ -418,7 +420,8 @@ var e2eUtils_default = module.exports = {
|
|
|
418
420
|
apiApplyApprovalEvent,
|
|
419
421
|
userLogin,
|
|
420
422
|
apiCreateField,
|
|
421
|
-
apiTriggerCustomActionEvent
|
|
423
|
+
apiTriggerCustomActionEvent,
|
|
424
|
+
approvalUserPassword
|
|
422
425
|
};
|
|
423
426
|
// Annotate the CommonJS export names for ESM import in node:
|
|
424
427
|
0 && (module.exports = {
|
|
@@ -442,5 +445,6 @@ var e2eUtils_default = module.exports = {
|
|
|
442
445
|
apiUpdateWorkflow,
|
|
443
446
|
apiUpdateWorkflowNode,
|
|
444
447
|
apiUpdateWorkflowTrigger,
|
|
448
|
+
approvalUserPassword,
|
|
445
449
|
userLogin
|
|
446
450
|
});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.6.0-alpha.
|
|
12
|
-
"@nocobase/utils": "1.6.0-alpha.
|
|
11
|
+
"@nocobase/client": "1.6.0-alpha.31",
|
|
12
|
+
"@nocobase/utils": "1.6.0-alpha.31",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
|
-
"@nocobase/test": "1.6.0-alpha.
|
|
15
|
-
"@nocobase/server": "1.6.0-alpha.
|
|
16
|
-
"@nocobase/data-source-manager": "1.6.0-alpha.
|
|
17
|
-
"@nocobase/database": "1.6.0-alpha.
|
|
14
|
+
"@nocobase/test": "1.6.0-alpha.31",
|
|
15
|
+
"@nocobase/server": "1.6.0-alpha.31",
|
|
16
|
+
"@nocobase/data-source-manager": "1.6.0-alpha.31",
|
|
17
|
+
"@nocobase/database": "1.6.0-alpha.31"
|
|
18
18
|
};
|
|
@@ -31,6 +31,8 @@ __export(comments_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(comments_exports);
|
|
32
32
|
var comments_default = {
|
|
33
33
|
name: "comments",
|
|
34
|
+
createdBy: true,
|
|
35
|
+
updatedBy: true,
|
|
34
36
|
fields: [
|
|
35
37
|
{
|
|
36
38
|
type: "belongsTo",
|
|
@@ -48,6 +50,14 @@ var comments_default = {
|
|
|
48
50
|
{
|
|
49
51
|
type: "hasMany",
|
|
50
52
|
name: "replies"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: "date",
|
|
56
|
+
name: "createdAt"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: "date",
|
|
60
|
+
name: "updatedAt"
|
|
51
61
|
}
|
|
52
62
|
]
|
|
53
63
|
};
|
|
@@ -64,6 +64,19 @@ var posts_default = {
|
|
|
64
64
|
type: "integer",
|
|
65
65
|
name: "read",
|
|
66
66
|
defaultValue: 0
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: "double",
|
|
70
|
+
name: "score",
|
|
71
|
+
defaultValue: 0
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: "date",
|
|
75
|
+
name: "createdAt"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: "date",
|
|
79
|
+
name: "updatedAt"
|
|
67
80
|
}
|
|
68
81
|
]
|
|
69
82
|
};
|
|
@@ -31,10 +31,20 @@ __export(replies_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(replies_exports);
|
|
32
32
|
var replies_default = {
|
|
33
33
|
name: "replies",
|
|
34
|
+
createdBy: true,
|
|
35
|
+
updatedBy: true,
|
|
34
36
|
fields: [
|
|
35
37
|
{
|
|
36
38
|
type: "string",
|
|
37
39
|
name: "content"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: "date",
|
|
43
|
+
name: "createdAt"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "date",
|
|
47
|
+
name: "updatedAt"
|
|
38
48
|
}
|
|
39
49
|
]
|
|
40
50
|
};
|
|
@@ -31,6 +31,8 @@ __export(tags_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(tags_exports);
|
|
32
32
|
var tags_default = {
|
|
33
33
|
name: "tags",
|
|
34
|
+
createdBy: true,
|
|
35
|
+
updatedBy: true,
|
|
34
36
|
fields: [
|
|
35
37
|
{
|
|
36
38
|
type: "belongsToMany",
|
|
@@ -39,6 +41,14 @@ var tags_default = {
|
|
|
39
41
|
{
|
|
40
42
|
type: "string",
|
|
41
43
|
name: "name"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "date",
|
|
47
|
+
name: "createdAt"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "date",
|
|
51
|
+
name: "updatedAt"
|
|
42
52
|
}
|
|
43
53
|
]
|
|
44
54
|
};
|
package/dist/server/index.js
CHANGED
|
@@ -97,7 +97,7 @@ async function getApp({
|
|
|
97
97
|
directory: import_path.default.resolve(__dirname, "collections")
|
|
98
98
|
});
|
|
99
99
|
await anotherDB.sync();
|
|
100
|
-
another.acl.allow("*", "*");
|
|
100
|
+
another.acl.allow("*", "*", "loggedIn");
|
|
101
101
|
return app;
|
|
102
102
|
}
|
|
103
103
|
async function getCluster({ plugins = [], collectionsPath, ...options }) {
|
|
@@ -32,6 +32,7 @@ declare const _default: {
|
|
|
32
32
|
run(node: any, input: any, processor: any): {
|
|
33
33
|
status: number;
|
|
34
34
|
};
|
|
35
|
+
resume(node: any, job: any): any;
|
|
35
36
|
test(): {
|
|
36
37
|
status: number;
|
|
37
38
|
};
|
|
@@ -48,6 +49,10 @@ declare const _default: {
|
|
|
48
49
|
};
|
|
49
50
|
resume(node: any, input: any, processor: any): any;
|
|
50
51
|
};
|
|
52
|
+
asyncResume: {
|
|
53
|
+
run(node: any, input: any, processor: any): Promise<any>;
|
|
54
|
+
resume(node: any, job: any, processor: any): any;
|
|
55
|
+
};
|
|
51
56
|
customizedSuccess: {
|
|
52
57
|
run(node: any, input: any, processor: any): {
|
|
53
58
|
status: number;
|
|
@@ -64,6 +64,12 @@ var instructions_default = {
|
|
|
64
64
|
status: 0
|
|
65
65
|
};
|
|
66
66
|
},
|
|
67
|
+
resume(node, job) {
|
|
68
|
+
if (node.config.status != null) {
|
|
69
|
+
job.set("status", node.config.status);
|
|
70
|
+
}
|
|
71
|
+
return job;
|
|
72
|
+
},
|
|
67
73
|
test() {
|
|
68
74
|
return {
|
|
69
75
|
status: 0
|
|
@@ -93,6 +99,26 @@ var instructions_default = {
|
|
|
93
99
|
return null;
|
|
94
100
|
}
|
|
95
101
|
},
|
|
102
|
+
asyncResume: {
|
|
103
|
+
async run(node, input, processor) {
|
|
104
|
+
const job = await processor.saveJob({
|
|
105
|
+
status: 0,
|
|
106
|
+
nodeId: node.id,
|
|
107
|
+
nodeKey: node.key,
|
|
108
|
+
upstreamId: (input == null ? void 0 : input.id) ?? null
|
|
109
|
+
});
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
job.set({
|
|
112
|
+
status: 1
|
|
113
|
+
});
|
|
114
|
+
processor.options.plugin.resume(job);
|
|
115
|
+
}, 100);
|
|
116
|
+
return null;
|
|
117
|
+
},
|
|
118
|
+
resume(node, job, processor) {
|
|
119
|
+
return job;
|
|
120
|
+
}
|
|
121
|
+
},
|
|
96
122
|
customizedSuccess: {
|
|
97
123
|
run(node, input, processor) {
|
|
98
124
|
return {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@nocobase/plugin-workflow-test",
|
|
3
3
|
"displayName": "Workflow: test kit",
|
|
4
4
|
"displayName.zh-CN": "工作流:测试工具包",
|
|
5
|
-
"version": "1.6.0-alpha.
|
|
5
|
+
"version": "1.6.0-alpha.31",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
7
7
|
"main": "dist/server/index.js",
|
|
8
8
|
"types": "./dist/server/index.d.ts",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
"@nocobase/server": "1.x",
|
|
12
12
|
"@nocobase/test": "1.x"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "2f118f0a0691dd51c437f208b1166258a615b6a8"
|
|
15
15
|
}
|