@nocobase/plugin-workflow-test 0.17.0-alpha.7 → 0.18.0-alpha.8

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.
@@ -0,0 +1,4 @@
1
+ export * from './e2eCollectionModel';
2
+ export * from './e2ePageObjectModel';
3
+ export { default } from './e2ePageObjectModel';
4
+ export * from './e2eUtils';
@@ -55,24 +55,24 @@ export async function getApp({
55
55
  ...options,
56
56
  autoStart,
57
57
  cleanDb,
58
- plugins: ['workflow', 'workflow-test', ...plugins],
58
+ plugins: [
59
+ [
60
+ 'workflow',
61
+ {
62
+ instructions,
63
+ functions,
64
+ },
65
+ ],
66
+ WorkflowTestPlugin,
67
+ ...plugins,
68
+ ],
59
69
  });
60
70
  }
61
71
 
62
- export default class extends Plugin {
72
+ export default class WorkflowTestPlugin extends Plugin {
63
73
  async load() {
64
74
  await this.db.import({
65
75
  directory: path.resolve(__dirname, 'collections'),
66
76
  });
67
-
68
- const workflow = this.app.getPlugin<any>('workflow');
69
-
70
- for (const [key, instruction] of Object.entries(instructions)) {
71
- workflow.instructions.register(key, instruction);
72
- }
73
-
74
- for (const [key, func] of Object.entries(functions)) {
75
- workflow.functions.register(key, func);
76
- }
77
77
  }
78
78
  }
@@ -13,6 +13,7 @@ export default {
13
13
  error: {
14
14
  run(node, input, processor) {
15
15
  throw new Error('definite error');
16
+ return null;
16
17
  },
17
18
  },
18
19
 
@@ -45,6 +46,7 @@ export default {
45
46
  },
46
47
  resume(node, input, processor) {
47
48
  throw new Error('input failed');
49
+ return null;
48
50
  },
49
51
  },
50
52