test(shots): seed demo flows so the flows page proves module logic both ways
hello.yaml needs debug.echo (not installed on the fixture hub) and must carry the missing-module note; genehmigung-demo.yaml only uses the hub builtin system.approval and must show a plain play button. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
dd0737b8b1
commit
79e08c8d17
1 changed files with 36 additions and 0 deletions
|
|
@ -187,6 +187,42 @@ void main() {
|
|||
]);
|
||||
}
|
||||
|
||||
// Seed two demo flows so the Flows page shows the real list
|
||||
// instead of its empty state (and proves the missing-module
|
||||
// logic both ways): hello needs debug.echo — not installed on
|
||||
// the fixture hub, so it must carry the "1 module missing"
|
||||
// note; the approval flow only uses the hub builtin
|
||||
// system.approval and must show a plain play button.
|
||||
final flowsDir = Directory(
|
||||
'${Platform.environment['HOME']}/.chain/data/flows',
|
||||
)..createSync(recursive: true);
|
||||
File('${flowsDir.path}/hello.yaml').writeAsStringSync(
|
||||
'# F∆I sample flow\n'
|
||||
'inputs:\n'
|
||||
' name:\n'
|
||||
' type: string\n'
|
||||
'steps:\n'
|
||||
' - id: echo\n'
|
||||
' use: debug.echo@^0\n'
|
||||
' with:\n'
|
||||
' text: "Hello, {{ inputs.name }}!"\n'
|
||||
'outputs:\n'
|
||||
' greeting: "{{ steps.echo.text }}"\n',
|
||||
);
|
||||
File('${flowsDir.path}/genehmigung-demo.yaml').writeAsStringSync(
|
||||
'# F∆I sample flow\n'
|
||||
'inputs:\n'
|
||||
' antrag:\n'
|
||||
' type: string\n'
|
||||
'steps:\n'
|
||||
' - id: freigabe\n'
|
||||
' use: system.approval@^0\n'
|
||||
' with:\n'
|
||||
' show: "{{ inputs.antrag }}"\n'
|
||||
'outputs:\n'
|
||||
' entscheidung: "{{ steps.freigabe.decision }}"\n',
|
||||
);
|
||||
|
||||
// Hermetic prefs: never read or write the operator's real ones.
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue