diff --git a/integration_test/guide_shots_test.dart b/integration_test/guide_shots_test.dart index 77c88fe..f1c7dc7 100644 --- a/integration_test/guide_shots_test.dart +++ b/integration_test/guide_shots_test.dart @@ -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({});