@nocobase/plugin-workflow-test 1.7.0-beta.9 → 1.8.0-alpha.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/client/index.js +1 -1
- package/dist/e2e/e2eCollectionModel.js +1 -1
- package/dist/e2e/e2ePageObjectModel.js +2 -2
- package/dist/e2e/e2eUtils.js +6 -3
- package/dist/externalVersion.js +6 -6
- package/dist/server/index.js +2 -0
- package/dist/server/instructions.d.ts +13 -0
- package/dist/server/instructions.js +18 -0
- package/package.json +2 -2
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-test",["@nocobase/client"],e):"object"==typeof exports?exports["@nocobase/plugin-workflow-test"]=e(require("@nocobase/client")):t["@nocobase/plugin-workflow-test"]=e(t["@nocobase/client"])}(self,function(t){return function(){"use strict";var e={772:function(e){e.exports=t}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var u=n[t]={exports:{}};return e[t](u,u.exports,o),u.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{default:function(){return
|
|
10
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-test",["@nocobase/client"],e):"object"==typeof exports?exports["@nocobase/plugin-workflow-test"]=e(require("@nocobase/client")):t["@nocobase/plugin-workflow-test"]=e(t["@nocobase/client"])}(self,function(t){return function(){"use strict";var e={772:function(e){e.exports=t}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var u=n[t]={exports:{}};return e[t](u,u.exports,o),u.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return!function(){o.r(r),o.d(r,{default:function(){return f}});var t=o(772);function e(t,n,o){return(e=i()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);var r=new(Function.bind.apply(t,o));return n&&u(r,n.prototype),r}).apply(null,arguments)}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var o="function"==typeof Map?new Map:void 0;return(c=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==o){if(o.has(t))return o.get(t);o.set(t,r)}function r(){return e(t,arguments,n(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)})(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}var f=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function e(){var t,o;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");return t=e,o=arguments,t=n(t),function(t,e){var n;if(e&&("object"==((n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof e))return e;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,i()?Reflect.construct(t,o||[],n(this).constructor):t.apply(this,o))}return e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t),e}(c(t.Plugin))}(),r}()});
|
|
@@ -888,7 +888,7 @@ const builtinExpression = {
|
|
|
888
888
|
value: "formula.js",
|
|
889
889
|
label: "Formula.js",
|
|
890
890
|
tooltip: '{{t("Formula.js supports most Microsoft Excel formula functions.")}}',
|
|
891
|
-
link: "https://
|
|
891
|
+
link: "https://docs.nocobase.com/handbook/calculation-engines/formula"
|
|
892
892
|
}
|
|
893
893
|
],
|
|
894
894
|
default: "formula.js"
|
|
@@ -217,7 +217,7 @@ class ApprovalPassthroughModeNode {
|
|
|
217
217
|
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
218
218
|
`schema-initializer-Grid-details:configureFields-${collectionName}`
|
|
219
219
|
);
|
|
220
|
-
this.addActionsMenu = page.getByRole("menuitem", { name: "Process form" })
|
|
220
|
+
this.addActionsMenu = page.getByRole("menuitem", { name: "Process form" });
|
|
221
221
|
this.actionsConfigureFieldsButton = page.getByLabel("schema-initializer-Grid-FormItemInitializers-approvalRecords");
|
|
222
222
|
this.actionsConfigureActionsButton = page.getByLabel(
|
|
223
223
|
"schema-initializer-ActionBar-ApprovalProcessAddActionButton-"
|
|
@@ -285,7 +285,7 @@ class ApprovalBranchModeNode {
|
|
|
285
285
|
this.detailsConfigureFieldsButton = page.getByLabel(
|
|
286
286
|
`schema-initializer-Grid-details:configureFields-${collectionName}`
|
|
287
287
|
);
|
|
288
|
-
this.addActionsMenu = page.getByRole("menuitem", { name: "Process form" })
|
|
288
|
+
this.addActionsMenu = page.getByRole("menuitem", { name: "Process form" });
|
|
289
289
|
this.actionsConfigureFieldsButton = page.getByLabel("schema-initializer-Grid-FormItemInitializers-approvalRecords");
|
|
290
290
|
this.actionsConfigureActionsButton = page.getByLabel("schema-initializer-ActionBar-");
|
|
291
291
|
this.addApproveButton = page.getByRole("menuitem", { name: "Approve" }).getByRole("switch");
|
package/dist/e2e/e2eUtils.js
CHANGED
|
@@ -104,9 +104,12 @@ const apiGetWorkflow = async (id) => {
|
|
|
104
104
|
});
|
|
105
105
|
const state = await api.storageState();
|
|
106
106
|
const headers = getHeaders(state);
|
|
107
|
-
const result = await api.get(
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
const result = await api.get(
|
|
108
|
+
`/api/workflows:get?filterByTk=${id}&appends[]=stats.executed&appends[]=versionStats.executed`,
|
|
109
|
+
{
|
|
110
|
+
headers
|
|
111
|
+
}
|
|
112
|
+
);
|
|
110
113
|
if (!result.ok()) {
|
|
111
114
|
throw new Error(await result.text());
|
|
112
115
|
}
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.
|
|
12
|
-
"@nocobase/utils": "1.
|
|
11
|
+
"@nocobase/client": "1.8.0-alpha.1",
|
|
12
|
+
"@nocobase/utils": "1.8.0-alpha.1",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
|
-
"@nocobase/test": "1.
|
|
15
|
-
"@nocobase/server": "1.
|
|
16
|
-
"@nocobase/data-source-manager": "1.
|
|
17
|
-
"@nocobase/database": "1.
|
|
14
|
+
"@nocobase/test": "1.8.0-alpha.1",
|
|
15
|
+
"@nocobase/server": "1.8.0-alpha.1",
|
|
16
|
+
"@nocobase/data-source-manager": "1.8.0-alpha.1",
|
|
17
|
+
"@nocobase/database": "1.8.0-alpha.1"
|
|
18
18
|
};
|
package/dist/server/index.js
CHANGED
|
@@ -67,6 +67,7 @@ async function getApp({
|
|
|
67
67
|
...options,
|
|
68
68
|
plugins: [
|
|
69
69
|
"field-sort",
|
|
70
|
+
"system-settings",
|
|
70
71
|
[
|
|
71
72
|
"workflow",
|
|
72
73
|
{
|
|
@@ -104,6 +105,7 @@ async function getCluster({ plugins = [], collectionsPath, ...options }) {
|
|
|
104
105
|
return (0, import_test.createMockCluster)({
|
|
105
106
|
...options,
|
|
106
107
|
plugins: [
|
|
108
|
+
"field-sort",
|
|
107
109
|
[
|
|
108
110
|
"workflow",
|
|
109
111
|
{
|
|
@@ -53,6 +53,19 @@ declare const _default: {
|
|
|
53
53
|
run(node: any, input: any, processor: any): Promise<any>;
|
|
54
54
|
resume(node: any, job: any, processor: any): any;
|
|
55
55
|
};
|
|
56
|
+
timeConsume: {
|
|
57
|
+
run({ config }: {
|
|
58
|
+
config: any;
|
|
59
|
+
}, input: any, processor: any): Promise<{
|
|
60
|
+
status: number;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
recordAppName: {
|
|
64
|
+
run(node: any, input: any, processor: any): {
|
|
65
|
+
status: number;
|
|
66
|
+
result: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
56
69
|
customizedSuccess: {
|
|
57
70
|
run(node: any, input: any, processor: any): {
|
|
58
71
|
status: number;
|
|
@@ -29,6 +29,7 @@ __export(instructions_exports, {
|
|
|
29
29
|
default: () => instructions_default
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(instructions_exports);
|
|
32
|
+
var import_test = require("@nocobase/test");
|
|
32
33
|
var import_utils = require("@nocobase/utils");
|
|
33
34
|
var instructions_default = {
|
|
34
35
|
echo: {
|
|
@@ -119,6 +120,23 @@ var instructions_default = {
|
|
|
119
120
|
return job;
|
|
120
121
|
}
|
|
121
122
|
},
|
|
123
|
+
timeConsume: {
|
|
124
|
+
async run({ config }, input, processor) {
|
|
125
|
+
const { duration = 1e3 } = config;
|
|
126
|
+
await (0, import_test.sleep)(duration);
|
|
127
|
+
return {
|
|
128
|
+
status: 1
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
recordAppName: {
|
|
133
|
+
run(node, input, processor) {
|
|
134
|
+
return {
|
|
135
|
+
status: 1,
|
|
136
|
+
result: processor.options.plugin.app.name
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
},
|
|
122
140
|
customizedSuccess: {
|
|
123
141
|
run(node, input, processor) {
|
|
124
142
|
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.
|
|
5
|
+
"version": "1.8.0-alpha.1",
|
|
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": "bc81ea73ed91b18dfb7cfad0f353b825881b4cc7"
|
|
15
15
|
}
|