@nocobase/plugin-workflow-test 1.3.0-alpha.20240724142600 → 1.3.0-alpha.20240807100243
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;
|
|
@@ -172,6 +174,18 @@ export declare class FormEventTriggerNode {
|
|
|
172
174
|
addNodeButton: Locator;
|
|
173
175
|
constructor(page: Page, triggerName: string, collectionName: string);
|
|
174
176
|
}
|
|
177
|
+
export declare class CustomActionEventTriggerNode {
|
|
178
|
+
readonly page: Page;
|
|
179
|
+
node: Locator;
|
|
180
|
+
nodeTitle: Locator;
|
|
181
|
+
nodeConfigure: Locator;
|
|
182
|
+
collectionDropDown: Locator;
|
|
183
|
+
relationalDataDropdown: Locator;
|
|
184
|
+
submitButton: Locator;
|
|
185
|
+
cancelButton: Locator;
|
|
186
|
+
addNodeButton: Locator;
|
|
187
|
+
constructor(page: Page, triggerName: string, collectionName: string);
|
|
188
|
+
}
|
|
175
189
|
export declare class CalculationNode {
|
|
176
190
|
readonly page: Page;
|
|
177
191
|
node: Locator;
|
|
@@ -355,5 +369,6 @@ declare const _default: {
|
|
|
355
369
|
SQLNode: typeof SQLNode;
|
|
356
370
|
ParallelBranchNode: typeof ParallelBranchNode;
|
|
357
371
|
ApprovalBranchModeNode: typeof ApprovalBranchModeNode;
|
|
372
|
+
CustomActionEventTriggerNode: typeof CustomActionEventTriggerNode;
|
|
358
373
|
};
|
|
359
374
|
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");
|
|
@@ -372,6 +377,28 @@ class FormEventTriggerNode {
|
|
|
372
377
|
this.addNodeButton = page.getByLabel("add-button", { exact: true });
|
|
373
378
|
}
|
|
374
379
|
}
|
|
380
|
+
class CustomActionEventTriggerNode {
|
|
381
|
+
page;
|
|
382
|
+
node;
|
|
383
|
+
nodeTitle;
|
|
384
|
+
nodeConfigure;
|
|
385
|
+
collectionDropDown;
|
|
386
|
+
relationalDataDropdown;
|
|
387
|
+
submitButton;
|
|
388
|
+
cancelButton;
|
|
389
|
+
addNodeButton;
|
|
390
|
+
constructor(page, triggerName, collectionName) {
|
|
391
|
+
this.page = page;
|
|
392
|
+
this.node = page.getByLabel(`Trigger-${triggerName}`);
|
|
393
|
+
this.nodeTitle = page.getByLabel(`Trigger-${triggerName}`).getByRole("textbox");
|
|
394
|
+
this.nodeConfigure = page.getByLabel(`Trigger-${triggerName}`).getByRole("button", { name: "Configure" });
|
|
395
|
+
this.collectionDropDown = page.getByLabel("block-item-DataSourceCollectionCascader-workflows-Collection").locator(".ant-select-selection-search-input");
|
|
396
|
+
this.relationalDataDropdown = page.getByTestId("select-field-Preload associations");
|
|
397
|
+
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
398
|
+
this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
|
|
399
|
+
this.addNodeButton = page.getByLabel("add-button", { exact: true });
|
|
400
|
+
}
|
|
401
|
+
}
|
|
375
402
|
class CalculationNode {
|
|
376
403
|
page;
|
|
377
404
|
node;
|
|
@@ -696,7 +723,8 @@ var e2ePageObjectModel_default = module.exports = {
|
|
|
696
723
|
ConditionBranchNode,
|
|
697
724
|
SQLNode,
|
|
698
725
|
ParallelBranchNode,
|
|
699
|
-
ApprovalBranchModeNode
|
|
726
|
+
ApprovalBranchModeNode,
|
|
727
|
+
CustomActionEventTriggerNode
|
|
700
728
|
};
|
|
701
729
|
// Annotate the CommonJS export names for ESM import in node:
|
|
702
730
|
0 && (module.exports = {
|
|
@@ -710,6 +738,7 @@ var e2ePageObjectModel_default = module.exports = {
|
|
|
710
738
|
ConditionYesNode,
|
|
711
739
|
CreateRecordNode,
|
|
712
740
|
CreateWorkFlow,
|
|
741
|
+
CustomActionEventTriggerNode,
|
|
713
742
|
DeleteRecordNode,
|
|
714
743
|
EditWorkFlow,
|
|
715
744
|
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,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.3.0-alpha.
|
|
12
|
-
"@nocobase/utils": "1.3.0-alpha.
|
|
11
|
+
"@nocobase/client": "1.3.0-alpha.20240807100243",
|
|
12
|
+
"@nocobase/utils": "1.3.0-alpha.20240807100243",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
|
-
"@nocobase/test": "1.3.0-alpha.
|
|
15
|
-
"@nocobase/server": "1.3.0-alpha.
|
|
16
|
-
"@nocobase/data-source-manager": "1.3.0-alpha.
|
|
17
|
-
"@nocobase/database": "1.3.0-alpha.
|
|
14
|
+
"@nocobase/test": "1.3.0-alpha.20240807100243",
|
|
15
|
+
"@nocobase/server": "1.3.0-alpha.20240807100243",
|
|
16
|
+
"@nocobase/data-source-manager": "1.3.0-alpha.20240807100243",
|
|
17
|
+
"@nocobase/database": "1.3.0-alpha.20240807100243"
|
|
18
18
|
};
|
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.3.0-alpha.
|
|
5
|
+
"version": "1.3.0-alpha.20240807100243",
|
|
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": "540c3fe4cfb7c20de0e6639f935a98b736d7b754"
|
|
15
15
|
}
|