File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,6 +142,10 @@ abstract final class AppDataRoot {
142142
143143 @visibleForTesting
144144 static Future <List <Directory >> legacySupportCandidates () async {
145+ if (Platform .environment.containsKey ('FLUTTER_TEST' )) {
146+ return mockLegacySupportCandidates ?? const [];
147+ }
148+
145149 final home = _env['HOME' ] ?? _env['USERPROFILE' ];
146150 if (home == null || home.isEmpty) return const [];
147151
Original file line number Diff line number Diff line change 11import 'dart:async' ;
22
3+ import 'package:querya_desktop/core/storage/app_data_root.dart' ;
34import 'package:querya_desktop/core/storage/connection_secrets_store.dart' ;
45
56import 'memory_secrets_backend.dart' ;
@@ -8,5 +9,8 @@ import 'memory_secrets_backend.dart';
89Future <void > testExecutable (FutureOr <void > Function () testMain) async {
910 ConnectionSecretsStore .backend = testMemorySecrets;
1011 testMemorySecrets.clear ();
12+ // Avoid copying the developer's real legacy profile into test temp dirs.
13+ AppDataRoot .mockLegacySupportCandidates = const [];
1114 await testMain ();
15+ AppDataRoot .resetMocks ();
1216}
You can’t perform that action at this time.
0 commit comments