Isolate root connection tests from native update network probes
This commit is contained in:
@@ -33,6 +33,7 @@ class PipelinesRoot extends StatefulWidget {
|
|||||||
this.catalogStore = const SharedPreferencesServerCatalogStore(),
|
this.catalogStore = const SharedPreferencesServerCatalogStore(),
|
||||||
this.web = kIsWeb,
|
this.web = kIsWeb,
|
||||||
this.clientFactory,
|
this.clientFactory,
|
||||||
|
this.nativeUpdatesSupported,
|
||||||
});
|
});
|
||||||
|
|
||||||
final ServerEndpoint server;
|
final ServerEndpoint server;
|
||||||
@@ -46,6 +47,9 @@ class PipelinesRoot extends StatefulWidget {
|
|||||||
final SettingsStore settingsStore;
|
final SettingsStore settingsStore;
|
||||||
final ServerCatalogStore catalogStore;
|
final ServerCatalogStore catalogStore;
|
||||||
final bool web;
|
final bool web;
|
||||||
|
|
||||||
|
/// Optional capability override for platform hosts and isolated widget tests.
|
||||||
|
final bool? nativeUpdatesSupported;
|
||||||
final PipelinesClient Function()? clientFactory;
|
final PipelinesClient Function()? clientFactory;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -275,6 +279,7 @@ class _PipelinesRootState extends State<PipelinesRoot> {
|
|||||||
}
|
}
|
||||||
if (!_onboarding) {
|
if (!_onboarding) {
|
||||||
return PipelinesApp(
|
return PipelinesApp(
|
||||||
|
androidSupported: widget.nativeUpdatesSupported,
|
||||||
key: ValueKey(_generation),
|
key: ValueKey(_generation),
|
||||||
server: _server,
|
server: _server,
|
||||||
client: _client,
|
client: _client,
|
||||||
|
|||||||
@@ -37,3 +37,10 @@ is not claimed by these captures.
|
|||||||
Final suite `/tmp/memwatch/out.6XWDNJ`: 36 passed; analyzer clean at
|
Final suite `/tmp/memwatch/out.6XWDNJ`: 36 passed; analyzer clean at
|
||||||
`/var/folders/jp/q0qvjyg54fl_c5vhhk1ylz2m0000gn/T/flutter-analyze.zQ46R4`.
|
`/var/folders/jp/q0qvjyg54fl_c5vhhk1ylz2m0000gn/T/flutter-analyze.zQ46R4`.
|
||||||
Display names subsequently polished to Linux/macOS (feed values unchanged).
|
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 {
|
(tester) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
PipelinesRoot(
|
PipelinesRoot(
|
||||||
|
nativeUpdatesSupported: false,
|
||||||
server: _server(''),
|
server: _server(''),
|
||||||
buildDefault: 'wss://build.example/connect',
|
buildDefault: 'wss://build.example/connect',
|
||||||
check: (_) async => SessionState.signedOut,
|
check: (_) async => SessionState.signedOut,
|
||||||
@@ -54,6 +55,7 @@ void main() {
|
|||||||
) async {
|
) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
PipelinesRoot(
|
PipelinesRoot(
|
||||||
|
nativeUpdatesSupported: false,
|
||||||
server: _server('wss://home.example/connect'),
|
server: _server('wss://home.example/connect'),
|
||||||
// A saved server with no kept session goes to onboarding directly.
|
// A saved server with no kept session goes to onboarding directly.
|
||||||
signedIn: false,
|
signedIn: false,
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ void main() {
|
|||||||
await ServerSession.load();
|
await ServerSession.load();
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
PipelinesRoot(
|
PipelinesRoot(
|
||||||
|
nativeUpdatesSupported: false,
|
||||||
server: ServerEndpoint.resolve(
|
server: ServerEndpoint.resolve(
|
||||||
base: Uri.parse('file:///'),
|
base: Uri.parse('file:///'),
|
||||||
web: false,
|
web: false,
|
||||||
@@ -119,6 +120,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
PipelinesRoot(
|
PipelinesRoot(
|
||||||
|
nativeUpdatesSupported: false,
|
||||||
server: server,
|
server: server,
|
||||||
catalogStore: store,
|
catalogStore: store,
|
||||||
clientFactory: factory,
|
clientFactory: factory,
|
||||||
@@ -207,6 +209,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
PipelinesRoot(
|
PipelinesRoot(
|
||||||
|
nativeUpdatesSupported: false,
|
||||||
server: ServerEndpoint.resolve(
|
server: ServerEndpoint.resolve(
|
||||||
base: Uri.parse('file:///'),
|
base: Uri.parse('file:///'),
|
||||||
web: false,
|
web: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user