@nocobase/plugin-workflow-test 0.19.0-alpha.3 → 0.19.0-alpha.4
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.d.ts +2 -0
- package/dist/e2e/e2ePageObjectModel.js +4 -0
- package/dist/externalVersion.js +5 -5
- package/dist/server/index.js +2 -0
- package/dist/server/instructions.d.ts +1 -1
- package/dist/server/instructions.js +0 -1
- package/dist/server/triggers.d.ts +18 -0
- package/dist/server/triggers.js +43 -0
- package/package.json +2 -2
- package/src/e2e/e2ePageObjectModel.ts +4 -0
- package/src/server/index.ts +2 -0
- package/src/server/instructions.ts +0 -1
- package/src/server/triggers.ts +13 -0
|
@@ -221,6 +221,7 @@ export declare class ConditionYesNode {
|
|
|
221
221
|
basicRadio: Locator;
|
|
222
222
|
mathRadio: Locator;
|
|
223
223
|
formulaRadio: Locator;
|
|
224
|
+
conditionExpressionEditBox: Locator;
|
|
224
225
|
submitButton: Locator;
|
|
225
226
|
cancelButton: Locator;
|
|
226
227
|
addNodeButton: Locator;
|
|
@@ -234,6 +235,7 @@ export declare class ConditionBranchNode {
|
|
|
234
235
|
basicRadio: Locator;
|
|
235
236
|
mathRadio: Locator;
|
|
236
237
|
formulaRadio: Locator;
|
|
238
|
+
conditionExpressionEditBox: Locator;
|
|
237
239
|
submitButton: Locator;
|
|
238
240
|
cancelButton: Locator;
|
|
239
241
|
addNoBranchNode: Locator;
|
|
@@ -449,6 +449,7 @@ class ConditionYesNode {
|
|
|
449
449
|
basicRadio;
|
|
450
450
|
mathRadio;
|
|
451
451
|
formulaRadio;
|
|
452
|
+
conditionExpressionEditBox;
|
|
452
453
|
submitButton;
|
|
453
454
|
cancelButton;
|
|
454
455
|
addNodeButton;
|
|
@@ -457,6 +458,7 @@ class ConditionYesNode {
|
|
|
457
458
|
this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
|
|
458
459
|
this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
459
460
|
this.nodeConfigure = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
|
|
461
|
+
this.conditionExpressionEditBox = page.getByLabel("textbox");
|
|
460
462
|
this.basicRadio = page.getByLabel("Basic");
|
|
461
463
|
this.mathRadio = page.getByLabel("Math.js");
|
|
462
464
|
this.formulaRadio = page.getByLabel("Formula.js");
|
|
@@ -473,6 +475,7 @@ class ConditionBranchNode {
|
|
|
473
475
|
basicRadio;
|
|
474
476
|
mathRadio;
|
|
475
477
|
formulaRadio;
|
|
478
|
+
conditionExpressionEditBox;
|
|
476
479
|
submitButton;
|
|
477
480
|
cancelButton;
|
|
478
481
|
addNoBranchNode;
|
|
@@ -483,6 +486,7 @@ class ConditionBranchNode {
|
|
|
483
486
|
this.node = page.getByLabel(`Condition-${nodeName}`, { exact: true });
|
|
484
487
|
this.nodeTitle = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("textbox");
|
|
485
488
|
this.nodeConfigure = page.getByLabel(`Condition-${nodeName}`, { exact: true }).getByRole("button", { name: "Configure" });
|
|
489
|
+
this.conditionExpressionEditBox = page.getByLabel("textbox");
|
|
486
490
|
this.submitButton = page.getByLabel("action-Action-Submit-workflows");
|
|
487
491
|
this.cancelButton = page.getByLabel("action-Action-Cancel-workflows");
|
|
488
492
|
this.addNodeButton = page.getByLabel(`add-button-condition-${nodeName}`, { exact: true });
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.19.0-alpha.
|
|
3
|
-
"@nocobase/utils": "0.19.0-alpha.
|
|
2
|
+
"@nocobase/client": "0.19.0-alpha.4",
|
|
3
|
+
"@nocobase/utils": "0.19.0-alpha.4",
|
|
4
4
|
"lodash": "4.17.21",
|
|
5
|
-
"@nocobase/test": "0.19.0-alpha.
|
|
6
|
-
"@nocobase/server": "0.19.0-alpha.
|
|
7
|
-
"@nocobase/database": "0.19.0-alpha.
|
|
5
|
+
"@nocobase/test": "0.19.0-alpha.4",
|
|
6
|
+
"@nocobase/server": "0.19.0-alpha.4",
|
|
7
|
+
"@nocobase/database": "0.19.0-alpha.4"
|
|
8
8
|
};
|
package/dist/server/index.js
CHANGED
|
@@ -36,6 +36,7 @@ var import_path = __toESM(require("path"));
|
|
|
36
36
|
var import_server = require("@nocobase/server");
|
|
37
37
|
var import_test = require("@nocobase/test");
|
|
38
38
|
var import_functions = __toESM(require("./functions"));
|
|
39
|
+
var import_triggers = __toESM(require("./triggers"));
|
|
39
40
|
var import_instructions = __toESM(require("./instructions"));
|
|
40
41
|
function sleep(ms) {
|
|
41
42
|
return new Promise((resolve) => {
|
|
@@ -57,6 +58,7 @@ async function getApp(options = {}) {
|
|
|
57
58
|
[
|
|
58
59
|
"workflow",
|
|
59
60
|
{
|
|
61
|
+
triggers: import_triggers.default,
|
|
60
62
|
instructions: import_instructions.default,
|
|
61
63
|
functions: import_functions.default
|
|
62
64
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
syncTrigger: {
|
|
3
|
+
new (workflow: any): {
|
|
4
|
+
readonly workflow: any;
|
|
5
|
+
on(): void;
|
|
6
|
+
off(): void;
|
|
7
|
+
sync: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
asyncTrigger: {
|
|
11
|
+
new (workflow: any): {
|
|
12
|
+
readonly workflow: any;
|
|
13
|
+
on(): void;
|
|
14
|
+
off(): void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var triggers_exports = {};
|
|
19
|
+
__export(triggers_exports, {
|
|
20
|
+
default: () => triggers_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(triggers_exports);
|
|
23
|
+
var triggers_default = {
|
|
24
|
+
syncTrigger: class {
|
|
25
|
+
constructor(workflow) {
|
|
26
|
+
this.workflow = workflow;
|
|
27
|
+
}
|
|
28
|
+
on() {
|
|
29
|
+
}
|
|
30
|
+
off() {
|
|
31
|
+
}
|
|
32
|
+
sync = true;
|
|
33
|
+
},
|
|
34
|
+
asyncTrigger: class {
|
|
35
|
+
constructor(workflow) {
|
|
36
|
+
this.workflow = workflow;
|
|
37
|
+
}
|
|
38
|
+
on() {
|
|
39
|
+
}
|
|
40
|
+
off() {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
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": "0.19.0-alpha.
|
|
5
|
+
"version": "0.19.0-alpha.4",
|
|
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": "0.x",
|
|
12
12
|
"@nocobase/test": "0.x"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "9583023f7bea828da5192384a5c002782c341b65"
|
|
15
15
|
}
|
|
@@ -454,6 +454,7 @@ export class ConditionYesNode {
|
|
|
454
454
|
basicRadio: Locator;
|
|
455
455
|
mathRadio: Locator;
|
|
456
456
|
formulaRadio: Locator;
|
|
457
|
+
conditionExpressionEditBox: Locator;
|
|
457
458
|
submitButton: Locator;
|
|
458
459
|
cancelButton: Locator;
|
|
459
460
|
addNodeButton: Locator;
|
|
@@ -464,6 +465,7 @@ export class ConditionYesNode {
|
|
|
464
465
|
this.nodeConfigure = page
|
|
465
466
|
.getByLabel(`Condition-${nodeName}`, { exact: true })
|
|
466
467
|
.getByRole('button', { name: 'Configure' });
|
|
468
|
+
this.conditionExpressionEditBox = page.getByLabel('textbox');
|
|
467
469
|
// await page.getByLabel('variable-constant').first().click();
|
|
468
470
|
// await page.getByLabel('variable-button').first().click();
|
|
469
471
|
// await page.getByLabel('select-operator-calc').first().click();
|
|
@@ -487,6 +489,7 @@ export class ConditionBranchNode {
|
|
|
487
489
|
basicRadio: Locator;
|
|
488
490
|
mathRadio: Locator;
|
|
489
491
|
formulaRadio: Locator;
|
|
492
|
+
conditionExpressionEditBox: Locator;
|
|
490
493
|
submitButton: Locator;
|
|
491
494
|
cancelButton: Locator;
|
|
492
495
|
addNoBranchNode: Locator;
|
|
@@ -499,6 +502,7 @@ export class ConditionBranchNode {
|
|
|
499
502
|
this.nodeConfigure = page
|
|
500
503
|
.getByLabel(`Condition-${nodeName}`, { exact: true })
|
|
501
504
|
.getByRole('button', { name: 'Configure' });
|
|
505
|
+
this.conditionExpressionEditBox = page.getByLabel('textbox');
|
|
502
506
|
this.submitButton = page.getByLabel('action-Action-Submit-workflows');
|
|
503
507
|
this.cancelButton = page.getByLabel('action-Action-Cancel-workflows');
|
|
504
508
|
this.addNodeButton = page.getByLabel(`add-button-condition-${nodeName}`, { exact: true });
|
package/src/server/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ApplicationOptions, Plugin } from '@nocobase/server';
|
|
|
4
4
|
import { MockServer, createMockServer } from '@nocobase/test';
|
|
5
5
|
|
|
6
6
|
import functions from './functions';
|
|
7
|
+
import triggers from './triggers';
|
|
7
8
|
import instructions from './instructions';
|
|
8
9
|
|
|
9
10
|
export interface MockServerOptions extends ApplicationOptions {
|
|
@@ -38,6 +39,7 @@ export async function getApp(options: MockServerOptions = {}): Promise<MockServe
|
|
|
38
39
|
[
|
|
39
40
|
'workflow',
|
|
40
41
|
{
|
|
42
|
+
triggers,
|
|
41
43
|
instructions,
|
|
42
44
|
functions,
|
|
43
45
|
},
|