Isolate root connection tests from native update network probes

This commit is contained in:
2026-11-08 16:51:54 +00:00
parent 761ff021fe
commit fdc411716f
4 changed files with 17 additions and 0 deletions
+5
View File
@@ -33,6 +33,7 @@ class PipelinesRoot extends StatefulWidget {
this.catalogStore = const SharedPreferencesServerCatalogStore(),
this.web = kIsWeb,
this.clientFactory,
this.nativeUpdatesSupported,
});
final ServerEndpoint server;
@@ -46,6 +47,9 @@ class PipelinesRoot extends StatefulWidget {
final SettingsStore settingsStore;
final ServerCatalogStore catalogStore;
final bool web;
/// Optional capability override for platform hosts and isolated widget tests.
final bool? nativeUpdatesSupported;
final PipelinesClient Function()? clientFactory;
@override
@@ -275,6 +279,7 @@ class _PipelinesRootState extends State<PipelinesRoot> {
}
if (!_onboarding) {
return PipelinesApp(
androidSupported: widget.nativeUpdatesSupported,
key: ValueKey(_generation),
server: _server,
client: _client,
+7
View File
@@ -37,3 +37,10 @@ is not claimed by these captures.
Final suite `/tmp/memwatch/out.6XWDNJ`: 36 passed; analyzer clean at
`/var/folders/jp/q0qvjyg54fl_c5vhhk1ylz2m0000gn/T/flutter-analyze.zQ46R4`.
Display names subsequently polished to Linux/macOS (feed values unchanged).
Manager integration: combined server-selection/creation, updater/session,
server scopes and chat automation suite passed 89 tests after adding an explicit
native-update capability override to the Root test host. Existing server-switch
fixtures disable native network probing; production defaults still enable all
supported native platforms. This resolved two pending-timer fixture failures
introduced when Linux became supported. Analyzer clean (9sOpy3).
@@ -35,6 +35,7 @@ void main() {
(tester) async {
await tester.pumpWidget(
PipelinesRoot(
nativeUpdatesSupported: false,
server: _server(''),
buildDefault: 'wss://build.example/connect',
check: (_) async => SessionState.signedOut,
@@ -54,6 +55,7 @@ void main() {
) async {
await tester.pumpWidget(
PipelinesRoot(
nativeUpdatesSupported: false,
server: _server('wss://home.example/connect'),
// A saved server with no kept session goes to onboarding directly.
signedIn: false,
@@ -57,6 +57,7 @@ void main() {
await ServerSession.load();
await tester.pumpWidget(
PipelinesRoot(
nativeUpdatesSupported: false,
server: ServerEndpoint.resolve(
base: Uri.parse('file:///'),
web: false,
@@ -119,6 +120,7 @@ void main() {
);
await tester.pumpWidget(
PipelinesRoot(
nativeUpdatesSupported: false,
server: server,
catalogStore: store,
clientFactory: factory,
@@ -207,6 +209,7 @@ void main() {
);
await tester.pumpWidget(
PipelinesRoot(
nativeUpdatesSupported: false,
server: ServerEndpoint.resolve(
base: Uri.parse('file:///'),
web: false,