@nocobase/plugin-workflow-test 1.2.25-alpha → 1.2.27-alpha
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.
|
@@ -11,6 +11,8 @@ export declare class CreateWorkFlow {
|
|
|
11
11
|
readonly page: Page;
|
|
12
12
|
name: Locator;
|
|
13
13
|
triggerType: Locator;
|
|
14
|
+
synchronouslyRadio: Locator;
|
|
15
|
+
asynchronouslyRadio: Locator;
|
|
14
16
|
description: Locator;
|
|
15
17
|
autoDeleteHistory: Locator;
|
|
16
18
|
submitButton: Locator;
|
|
@@ -171,6 +173,18 @@ export declare class FormEventTriggerNode {
|
|
|
171
173
|
addNodeButton: Locator;
|
|
172
174
|
constructor(page: Page, triggerName: string, collectionName: string);
|
|
173
175
|
}
|
|
176
|
+
export declare class CustomActionEventTriggerNode {
|
|
177
|
+
readonly page: Page;
|
|
178
|
+
node: Locator;
|
|
179
|
+
nodeTitle: Locator;
|
|
180
|
+
nodeConfigure: Locator;
|
|
181
|
+
collectionDropDown: Locator;
|
|
182
|
+
relationalDataDropdown: Locator;
|
|
183
|
+
submitButton: Locator;
|
|
184
|
+
cancelButton: Locator;
|
|
185
|
+
addNodeButton: Locator;
|
|
186
|
+
constructor(page: Page, triggerName: string, collectionName: string);
|
|
187
|
+
}
|
|
174
188
|
export declare class CalculationNode {
|
|
175
189
|
readonly page: Page;
|
|
176
190
|
node: Locator;
|
|
@@ -354,5 +368,6 @@ declare const _default: {
|
|
|
354
368
|
SQLNode: typeof SQLNode;
|
|
355
369
|
ParallelBranchNode: typeof ParallelBranchNode;
|
|
356
370
|
ApprovalBranchModeNode: typeof ApprovalBranchModeNode;
|
|
371
|
+
CustomActionEventTriggerNode: typeof CustomActionEventTriggerNode;
|
|
357
372
|
};
|
|
358
373
|
export default _default;
|
|
@@ -36,6 +36,7 @@ __export(e2ePageObjectModel_exports, {
|
|
|
36
36
|
ConditionYesNode: () => ConditionYesNode,
|
|
37
37
|
CreateRecordNode: () => CreateRecordNode,
|
|
38
38
|
CreateWorkFlow: () => CreateWorkFlow,
|
|
39
|
+
CustomActionEventTriggerNode: () => CustomActionEventTriggerNode,
|
|
39
40
|
DeleteRecordNode: () => DeleteRecordNode,
|
|
40
41
|
EditWorkFlow: () => EditWorkFlow,
|
|
41
42
|
FormEventTriggerNode: () => FormEventTriggerNode,
|
|
@@ -54,6 +55,8 @@ class CreateWorkFlow {
|
|
|
54
55
|
page;
|
|
55
56
|
name;
|
|
56
57
|
triggerType;
|
|
58
|
+
synchronouslyRadio;
|
|
59
|
+
asynchronouslyRadio;
|
|
57
60
|
description;
|
|
58
61
|
autoDeleteHistory;
|
|
59
62
|
submitButton;
|
|
@@ -62,6 +65,8 @@ class CreateWorkFlow {
|
|
|
62
65
|
this.page = page;
|
|
63
66
|
this.name = page.getByLabel("block-item-CollectionField-workflows-Name").getByRole("textbox");
|
|
64
67
|
this.triggerType = page.getByTestId("select-single");
|
|
68
|
+
this.synchronouslyRadio = page.getByLabel("Synchronously", { exact: true });
|
|
69
|
+
this.asynchronouslyRadio = page.getByLabel("Asynchronously", { exact: true });
|
|
65
70
|
this.description = page.getByTestId("description-item").getByRole("textbox");
|
|
66
71
|
this.autoDeleteHistory = page.getByTestId("select-multiple");
|
|
67
72
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
@@ -150,7 +155,9 @@ class ApprovalTriggerNode {
|
|
|
150
155
|
this.addBlockButton = page.getByLabel(`schema-initializer-Grid-ApprovalApplyAddBlockButton-${collectionName}`);
|
|
151
156
|
this.addApplyFormMenu = page.getByRole("menuitem", { name: "Apply form" });
|
|
152
157
|
this.configureFieldsButton = page.getByLabel(`schema-initializer-Grid-form:configureFields-${collectionName}`);
|
|
153
|
-
this.configureActionsButton = page.getByLabel(
|
|
158
|
+
this.configureActionsButton = page.getByLabel(
|
|
159
|
+
`schema-initializer-ActionBar-ApprovalApplyAddActionButton-${collectionName}`
|
|
160
|
+
);
|
|
154
161
|
this.saveDraftSwitch = page.getByRole("menuitem", { name: "Save draft" }).getByRole("switch");
|
|
155
162
|
this.preloadAssociationsDropDown = page.getByTestId("select-field-Preload associations");
|
|
156
163
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
@@ -205,7 +212,9 @@ class ApprovalPassthroughModeNode {
|
|
|
205
212
|
this.goToconfigureButton = page.getByRole("button", { name: "Go to configure" });
|
|
206
213
|
this.addBlockButton = page.getByLabel("schema-initializer-Grid-ApprovalProcessAddBlockButton-workflows");
|
|
207
214
|
this.addDetailsMenu = page.getByRole("menuitem", { name: "Details" });
|
|
208
|
-
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
215
|
+
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
216
|
+
`schema-initializer-Grid-details:configureFields-${collectionName}`
|
|
217
|
+
);
|
|
209
218
|
this.addActionsMenu = page.getByRole("menuitem", { name: "Actions" }).getByRole("switch");
|
|
210
219
|
this.actionsConfigureFieldsButton = page.getByLabel("schema-initializer-Grid-FormItemInitializers-approvalRecords");
|
|
211
220
|
this.actionsConfigureActionsButton = page.getByLabel(
|
|
@@ -271,7 +280,9 @@ class ApprovalBranchModeNode {
|
|
|
271
280
|
this.goToconfigureButton = page.getByRole("button", { name: "Go to configure" });
|
|
272
281
|
this.addBlockButton = page.getByLabel("schema-initializer-Grid-ApprovalProcessAddBlockButton-workflows");
|
|
273
282
|
this.addDetailsMenu = page.getByRole("menuitem", { name: "Details" });
|
|
274
|
-
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
283
|
+
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
284
|
+
`schema-initializer-Grid-details:configureFields-${collectionName}`
|
|
285
|
+
);
|
|
275
286
|
this.addActionsMenu = page.getByRole("menuitem", { name: "Actions" }).getByRole("switch");
|
|
276
287
|
this.actionsConfigureFieldsButton = page.getByLabel("schema-initializer-Grid-FormItemInitializers-approvalRecords");
|
|
277
288
|
this.actionsConfigureActionsButton = page.getByLabel(
|
|
@@ -364,6 +375,28 @@ class FormEventTriggerNode {
|
|
|
364
375
|
this.addNodeButton = page.getByLabel("add-button", { exact: true });
|
|
365
376
|
}
|
|
366
377
|
}
|
|
378
|
+
class CustomActionEventTriggerNode {
|
|
379
|
+
page;
|
|
380
|
+
node;
|
|
381
|
+
nodeTitle;
|
|
382
|
+
nodeConfigure;
|
|
383
|
+
collectionDropDown;
|
|
384
|
+
relationalDataDropdown;
|
|
385
|
+
submitButton;
|
|
386
|
+
cancelButton;
|
|
387
|
+
addNodeButton;
|
|
388
|
+
constructor(page, triggerName, collectionName) {
|
|
389
|
+
this.page = page;
|
|
390
|
+
this.node = page.getByLabel(`Trigger-${triggerName}`);
|
|
391
|
+
this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
|
|
392
|
+
this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
|
|
393
|
+
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
394
|
+
this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
|
|
395
|
+
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
396
|
+
this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
|
|
397
|
+
this.addNodeButton = page.getByLabel("add-button", { exact: true });
|
|
398
|
+
}
|
|
399
|
+
}
|
|
367
400
|
class CalculationNode {
|
|
368
401
|
page;
|
|
369
402
|
node;
|
|
@@ -688,7 +721,8 @@ var e2ePageObjectModel_default = module.exports = {
|
|
|
688
721
|
ConditionBranchNode,
|
|
689
722
|
SQLNode,
|
|
690
723
|
ParallelBranchNode,
|
|
691
|
-
ApprovalBranchModeNode
|
|
724
|
+
ApprovalBranchModeNode,
|
|
725
|
+
CustomActionEventTriggerNode
|
|
692
726
|
};
|
|
693
727
|
// Annotate the CommonJS export names for ESM import in node:
|
|
694
728
|
0 && (module.exports = {
|
|
@@ -702,6 +736,7 @@ var e2ePageObjectModel_default = module.exports = {
|
|
|
702
736
|
ConditionYesNode,
|
|
703
737
|
CreateRecordNode,
|
|
704
738
|
CreateWorkFlow,
|
|
739
|
+
CustomActionEventTriggerNode,
|
|
705
740
|
DeleteRecordNode,
|
|
706
741
|
EditWorkFlow,
|
|
707
742
|
FormEventTriggerNode,
|
package/dist/e2e/e2eUtils.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const apiCreateRecordTriggerFormEvent: (collectionName: string, t
|
|
|
24
24
|
export declare const apiSubmitRecordTriggerFormEvent: (triggerWorkflows: string, data: any) => Promise<any>;
|
|
25
25
|
export declare const apiGetDataSourceCount: () => Promise<any>;
|
|
26
26
|
export declare const apiCreateRecordTriggerActionEvent: (collectionName: string, triggerWorkflows: string, data: any) => Promise<any>;
|
|
27
|
+
export declare const apiTriggerCustomActionEvent: (collectionName: string, triggerWorkflows: string, data: any) => Promise<any>;
|
|
27
28
|
export declare const apiApplyApprovalEvent: (data: any) => Promise<any>;
|
|
28
29
|
export declare const apiCreateField: (collectionName: string, data: any) => Promise<any>;
|
|
29
30
|
export declare const userLogin: (browser: Browser, approvalUserEmail: string, approvalUser: string) => Promise<import("playwright-core").BrowserContext>;
|
|
@@ -48,5 +49,6 @@ declare const _default: {
|
|
|
48
49
|
apiApplyApprovalEvent: (data: any) => Promise<any>;
|
|
49
50
|
userLogin: (browser: Browser, approvalUserEmail: string, approvalUser: string) => Promise<import("playwright-core").BrowserContext>;
|
|
50
51
|
apiCreateField: (collectionName: string, data: any) => Promise<any>;
|
|
52
|
+
apiTriggerCustomActionEvent: (collectionName: string, triggerWorkflows: string, data: any) => Promise<any>;
|
|
51
53
|
};
|
|
52
54
|
export default _default;
|
package/dist/e2e/e2eUtils.js
CHANGED
|
@@ -41,6 +41,7 @@ __export(e2eUtils_exports, {
|
|
|
41
41
|
apiGetWorkflowNode: () => apiGetWorkflowNode,
|
|
42
42
|
apiGetWorkflowNodeExecutions: () => apiGetWorkflowNodeExecutions,
|
|
43
43
|
apiSubmitRecordTriggerFormEvent: () => apiSubmitRecordTriggerFormEvent,
|
|
44
|
+
apiTriggerCustomActionEvent: () => apiTriggerCustomActionEvent,
|
|
44
45
|
apiUpdateRecord: () => apiUpdateRecord,
|
|
45
46
|
apiUpdateWorkflow: () => apiUpdateWorkflow,
|
|
46
47
|
apiUpdateWorkflowNode: () => apiUpdateWorkflowNode,
|
|
@@ -300,6 +301,21 @@ const apiCreateRecordTriggerActionEvent = async (collectionName, triggerWorkflow
|
|
|
300
301
|
}
|
|
301
302
|
return (await result.json()).data;
|
|
302
303
|
};
|
|
304
|
+
const apiTriggerCustomActionEvent = async (collectionName, triggerWorkflows, data) => {
|
|
305
|
+
const api = await import_e2e.request.newContext({
|
|
306
|
+
storageState: process.env.PLAYWRIGHT_AUTH_FILE
|
|
307
|
+
});
|
|
308
|
+
const state = await api.storageState();
|
|
309
|
+
const headers = getHeaders(state);
|
|
310
|
+
const result = await api.post(`/api/${collectionName}:trigger?triggerWorkflows=${triggerWorkflows}`, {
|
|
311
|
+
headers,
|
|
312
|
+
data
|
|
313
|
+
});
|
|
314
|
+
if (!result.ok()) {
|
|
315
|
+
throw new Error(await result.text());
|
|
316
|
+
}
|
|
317
|
+
return (await result.json()).data;
|
|
318
|
+
};
|
|
303
319
|
const apiApplyApprovalEvent = async (data) => {
|
|
304
320
|
const api = await import_e2e.request.newContext({
|
|
305
321
|
storageState: process.env.PLAYWRIGHT_AUTH_FILE
|
|
@@ -401,7 +417,8 @@ var e2eUtils_default = module.exports = {
|
|
|
401
417
|
apiCreateRecordTriggerActionEvent,
|
|
402
418
|
apiApplyApprovalEvent,
|
|
403
419
|
userLogin,
|
|
404
|
-
apiCreateField
|
|
420
|
+
apiCreateField,
|
|
421
|
+
apiTriggerCustomActionEvent
|
|
405
422
|
};
|
|
406
423
|
// Annotate the CommonJS export names for ESM import in node:
|
|
407
424
|
0 && (module.exports = {
|
|
@@ -420,6 +437,7 @@ var e2eUtils_default = module.exports = {
|
|
|
420
437
|
apiGetWorkflowNode,
|
|
421
438
|
apiGetWorkflowNodeExecutions,
|
|
422
439
|
apiSubmitRecordTriggerFormEvent,
|
|
440
|
+
apiTriggerCustomActionEvent,
|
|
423
441
|
apiUpdateRecord,
|
|
424
442
|
apiUpdateWorkflow,
|
|
425
443
|
apiUpdateWorkflowNode,
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.2.
|
|
12
|
-
"@nocobase/utils": "1.2.
|
|
11
|
+
"@nocobase/client": "1.2.27-alpha",
|
|
12
|
+
"@nocobase/utils": "1.2.27-alpha",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
|
-
"@nocobase/test": "1.2.
|
|
15
|
-
"@nocobase/server": "1.2.
|
|
16
|
-
"@nocobase/resourcer": "1.2.
|
|
17
|
-
"@nocobase/data-source-manager": "1.2.
|
|
18
|
-
"@nocobase/database": "1.2.
|
|
14
|
+
"@nocobase/test": "1.2.27-alpha",
|
|
15
|
+
"@nocobase/server": "1.2.27-alpha",
|
|
16
|
+
"@nocobase/resourcer": "1.2.27-alpha",
|
|
17
|
+
"@nocobase/data-source-manager": "1.2.27-alpha",
|
|
18
|
+
"@nocobase/database": "1.2.27-alpha"
|
|
19
19
|
};
|
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.2.
|
|
5
|
+
"version": "1.2.27-alpha",
|
|
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": "b40e402f6ffd57c89475af21c56fdf99d3bbc931"
|
|
15
15
|
}
|