@nocobase/plugin-workflow-test 1.6.0-alpha.9 → 1.6.0-beta.2

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.
@@ -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 = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
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,7 +200,7 @@ 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 = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
203
+ this.nodeConfigure = this.node.locator(">div").first();
204
204
  this.addAssigneesButton = page.getByRole("button", { name: "plus Add assignee" });
205
205
  this.addSelectAssigneesMenu = page.getByRole("button", { name: "Select assignees" });
206
206
  this.addQueryAssigneesMenu = page.getByRole("button", { name: "Query assignees" });
@@ -268,7 +268,7 @@ 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 = page.getByLabel(`Approval-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
271
+ this.nodeConfigure = this.node.locator(">div").first();
272
272
  this.addAssigneesButton = page.getByRole("button", { name: "plus Add assignee" });
273
273
  this.addSelectAssigneesMenu = page.getByRole("button", { name: "Select assignees" });
274
274
  this.addQueryAssigneesMenu = page.getByRole("button", { name: "Query assignees" });
@@ -319,9 +319,9 @@ class ScheduleTriggerNode {
319
319
  addNodeButton;
320
320
  constructor(page, triggerName, collectionName) {
321
321
  this.page = page;
322
- this.node = page.getByText("TriggeraConfigure");
322
+ this.node = page.getByLabel(`Trigger-${triggerName}`);
323
323
  this.nodeTitle = page.locator("textarea").filter({ hasText: triggerName });
324
- this.nodeConfigure = page.getByRole("button", { name: "Configure" });
324
+ this.nodeConfigure = this.node.locator(">div").first();
325
325
  this.customTimeTriggerOptions = page.getByLabel("Based on certain date");
326
326
  this.startTimeEntryBox = page.getByPlaceholder("Select date");
327
327
  this.RrpeatModeDropdown = page.getByLabel("block-item-RepeatField-workflows-Repeat mode");
@@ -347,7 +347,7 @@ class CollectionTriggerNode {
347
347
  this.page = page;
348
348
  this.node = page.getByLabel(`Trigger-${triggerName}`);
349
349
  this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
350
- this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
350
+ this.nodeConfigure = this.node.locator(">div").first();
351
351
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
352
352
  this.triggerOnDropdown = page.getByLabel("block-item-Select-workflows-Trigger on").getByRole("button", { name: "Trigger on" });
353
353
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -369,7 +369,7 @@ class FormEventTriggerNode {
369
369
  this.page = page;
370
370
  this.node = page.getByLabel(`Trigger-${triggerName}`);
371
371
  this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
372
- this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
372
+ this.nodeConfigure = this.node.locator(">div").first();
373
373
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
374
374
  this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
375
375
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -391,7 +391,7 @@ class CustomActionEventTriggerNode {
391
391
  this.page = page;
392
392
  this.node = page.getByLabel(`Trigger-${triggerName}`);
393
393
  this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
394
- this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
394
+ this.nodeConfigure = this.node.locator(">div").first();
395
395
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
396
396
  this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
397
397
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -414,7 +414,7 @@ class CalculationNode {
414
414
  this.page = page;
415
415
  this.node = page.getByLabel(`Calculation-${nodeName}`, { exact: true });
416
416
  this.nodeTitle = page.getByLabel(`Calculation-${nodeName}`, { exact: true }).getByRole("textbox");
417
- this.nodeConfigure = page.getByLabel(`Calculation-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
417
+ this.nodeConfigure = this.node.locator(">div").first();
418
418
  this.mathCalculationEngine = page.getByLabel("Math.js");
419
419
  this.formulaCalculationEngine = page.getByLabel("Formula.js");
420
420
  this.calculationExpression = page.getByLabel("textbox");
@@ -444,7 +444,7 @@ class QueryRecordNode {
444
444
  this.page = page;
445
445
  this.node = page.getByLabel(`Query record-${nodeName}`, { exact: true });
446
446
  this.nodeTitle = page.getByLabel(`Query record-${nodeName}`, { exact: true }).getByRole("textbox");
447
- this.nodeConfigure = page.getByLabel(`Query record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
447
+ this.nodeConfigure = this.node.locator(">div").first();
448
448
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
449
449
  this.singleRecordRadioButton = page.getByLabel("block-item-RadioWithTooltip-").getByLabel("Single record");
450
450
  this.multipleRecordsRadioButton = page.getByLabel("block-item-RadioWithTooltip-").getByLabel("Multiple records");
@@ -472,7 +472,7 @@ class CreateRecordNode {
472
472
  this.page = page;
473
473
  this.node = page.getByLabel(`Create record-${nodeName}`, { exact: true });
474
474
  this.nodeTitle = page.getByLabel(`Create record-${nodeName}`, { exact: true }).getByRole("textbox");
475
- this.nodeConfigure = page.getByLabel(`Create record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
475
+ this.nodeConfigure = this.node.locator(">div").first();
476
476
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
477
477
  this.addFieldsButton = page.getByLabel("schema-initializer-Grid-assignFieldValuesForm:configureFields");
478
478
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
@@ -496,7 +496,7 @@ class UpdateRecordNode {
496
496
  this.page = page;
497
497
  this.node = page.getByLabel(`Update record-${nodeName}`, { exact: true });
498
498
  this.nodeTitle = page.getByLabel(`Update record-${nodeName}`, { exact: true }).getByRole("textbox");
499
- this.nodeConfigure = page.getByLabel(`Update record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
499
+ this.nodeConfigure = this.node.locator(">div").first();
500
500
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
501
501
  this.batchUpdateModeRadio = page.getByLabel("block-item-RadioWithTooltip-workflows-Update mode").getByLabel("Update in a batch");
502
502
  this.articleByArticleUpdateModeRadio = page.getByLabel("block-item-RadioWithTooltip-workflows-Update mode").getByLabel("Update one by one");
@@ -519,7 +519,7 @@ class DeleteRecordNode {
519
519
  this.page = page;
520
520
  this.node = page.getByLabel(`Delete record-${nodeName}`, { exact: true });
521
521
  this.nodeTitle = page.getByLabel(`Delete record-${nodeName}`, { exact: true }).getByRole("textbox");
522
- this.nodeConfigure = page.getByLabel(`Delete record-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
522
+ this.nodeConfigure = this.node.locator(">div").first();
523
523
  this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
524
524
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
525
525
  this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
@@ -548,7 +548,7 @@ class AggregateNode {
548
548
  this.page = page;
549
549
  this.node = page.getByLabel(`Aggregate-${nodeName}`, { exact: true });
550
550
  this.nodeTitle = page.getByLabel(`Aggregate-${nodeName}`, { exact: true }).getByRole("textbox");
551
- this.nodeConfigure = page.getByLabel(`Aggregate-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
551
+ this.nodeConfigure = this.node.locator(">div").first();
552
552
  this.countRadio = page.getByLabel("COUNT");
553
553
  this.sumRadio = page.getByLabel("SUM", { exact: true });
554
554
  this.avgRadio = page.getByLabel("AVG", { exact: true });
@@ -584,7 +584,7 @@ class ManualNode {
584
584
  this.page = page;
585
585
  this.node = page.getByLabel(`Manual-${nodeName}`, { exact: true });
586
586
  this.nodeTitle = page.getByLabel(`Manual-${nodeName}`, { exact: true }).getByRole("textbox");
587
- this.nodeConfigure = page.getByLabel(`Manual-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
587
+ this.nodeConfigure = this.node.locator(">div").first();
588
588
  this.assigneesDropDown = page.getByTestId("select-single");
589
589
  this.configureUserInterfaceButton = page.getByRole("button", { name: "Configure user interface" });
590
590
  this.addBlockButton = page.getByLabel(
@@ -616,7 +616,7 @@ class ConditionYesNode {
616
616
  this.page = page;
617
617
  this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
618
618
  this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
619
- this.nodeConfigure = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
619
+ this.nodeConfigure = this.node.locator(">div").first();
620
620
  this.conditionExpressionEditBox = page.getByLabel("textbox");
621
621
  this.basicRadio = page.getByLabel("Basic");
622
622
  this.mathRadio = page.getByLabel("Math.js");
@@ -644,7 +644,7 @@ class ConditionBranchNode {
644
644
  this.page = page;
645
645
  this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
646
646
  this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
647
- this.nodeConfigure = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
647
+ this.nodeConfigure = this.node.locator(">div").first();
648
648
  this.conditionExpressionEditBox = page.getByLabel("textbox");
649
649
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
650
650
  this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
@@ -669,7 +669,7 @@ class SQLNode {
669
669
  this.page = page;
670
670
  this.node = page.getByLabel(`SQL action-${nodeName}`, { exact: true });
671
671
  this.nodeTitle = page.getByLabel(`SQL action-${nodeName}`, { exact: true }).getByRole("textbox");
672
- this.nodeConfigure = page.getByLabel(`SQL action-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
672
+ this.nodeConfigure = this.node.locator(">div").first();
673
673
  this.sqlEditBox = page.getByLabel("block-item-WorkflowVariableRawTextArea-workflows-SQL").getByRole("textbox");
674
674
  this.submitButton = page.getByLabel("action-Action-Submit-workflows");
675
675
  this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
@@ -692,7 +692,7 @@ class ParallelBranchNode {
692
692
  this.page = page;
693
693
  this.node = page.getByLabel(`Parallel branch-${nodeName}`, { exact: true });
694
694
  this.nodeTitle = page.locator("textarea").filter({ hasText: nodeName });
695
- this.nodeConfigure = page.getByLabel(`Parallel branch-${nodeName}`).getByRole("button", { name: "Configure" });
695
+ this.nodeConfigure = this.node.locator(">div").first();
696
696
  this.addBranchButton = page.getByLabel(`add-button-parallel-${nodeName}-add-branch`, { exact: true });
697
697
  this.allSucceededRadio = page.getByLabel("All succeeded", { exact: true });
698
698
  this.anySucceededRadio = page.getByLabel("Any succeeded", { exact: true });
@@ -8,11 +8,11 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.6.0-alpha.9",
12
- "@nocobase/utils": "1.6.0-alpha.9",
11
+ "@nocobase/client": "1.6.0-beta.2",
12
+ "@nocobase/utils": "1.6.0-beta.2",
13
13
  "lodash": "4.17.21",
14
- "@nocobase/test": "1.6.0-alpha.9",
15
- "@nocobase/server": "1.6.0-alpha.9",
16
- "@nocobase/data-source-manager": "1.6.0-alpha.9",
17
- "@nocobase/database": "1.6.0-alpha.9"
14
+ "@nocobase/test": "1.6.0-beta.2",
15
+ "@nocobase/server": "1.6.0-beta.2",
16
+ "@nocobase/data-source-manager": "1.6.0-beta.2",
17
+ "@nocobase/database": "1.6.0-beta.2"
18
18
  };
@@ -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 }) {
@@ -48,6 +48,10 @@ declare const _default: {
48
48
  };
49
49
  resume(node: any, input: any, processor: any): any;
50
50
  };
51
+ asyncResume: {
52
+ run(node: any, input: any, processor: any): Promise<any>;
53
+ resume(node: any, job: any, processor: any): any;
54
+ };
51
55
  customizedSuccess: {
52
56
  run(node: any, input: any, processor: any): {
53
57
  status: number;
@@ -93,6 +93,26 @@ var instructions_default = {
93
93
  return null;
94
94
  }
95
95
  },
96
+ asyncResume: {
97
+ async run(node, input, processor) {
98
+ const job = await processor.saveJob({
99
+ status: 0,
100
+ nodeId: node.id,
101
+ nodeKey: node.key,
102
+ upstreamId: (input == null ? void 0 : input.id) ?? null
103
+ });
104
+ setTimeout(() => {
105
+ job.set({
106
+ status: 1
107
+ });
108
+ processor.options.plugin.resume(job);
109
+ }, 100);
110
+ return null;
111
+ },
112
+ resume(node, job, processor) {
113
+ return job;
114
+ }
115
+ },
96
116
  customizedSuccess: {
97
117
  run(node, input, processor) {
98
118
  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.9",
5
+ "version": "1.6.0-beta.2",
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": "c6136fc6c9a2daab33fb1a20716cd9768e9a147f"
14
+ "gitHead": "476ab2f424d86f585c8fba1459568c8aec49a5c6"
15
15
  }