remove OsBridge openURL/reveal tests — they spawn OS popups
test / unit + widget + golden + a11y (push) Failing after 29s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s

services_bigger_test.dart's openURL + reveal tests called the real
OsBridge methods, which Process.run xdg-open / open / explorer.
On a desktop session the OS dispatcher (KIO on KDE, etc.) surfaces
a "Could not read file …" error dialog for the bogus URL, owned by
the desktop session not the test process — it persists after the
test exits and a fresh run spawns another one. The user has to
manually close each popup, blocking CI from running unattended.

Coverage value was minimal (anyOf(true, false)). Leaving fire() and
the rest of the OsBridge bus-event surface; command-shape coverage
of openURL/reveal can come from integration tests where a real OS
dispatcher is desired.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 08:02:37 +02:00
co-authored by Claude Opus 4.7
parent 7ba0500f75
commit 2a7875e1a9
+8 -19
View File
@@ -75,25 +75,14 @@ void main() {
}); });
group('OsBridge', () { group('OsBridge', () {
test('openURL returns false for an unsupported / unknown URL', () async { // openURL / reveal aren't exercised end-to-end here — they spawn
final bridge = OsBridge( // real xdg-open / open / explorer processes, which on a desktop
log: Logger(minLevel: LogLevel.error), // session surface a system error dialog ("Could not read file …")
events: DaemonBus(), // even when the URL is bogus. We're not in a sandbox that swallows
); // those, so the test would visibly nag the user. Coverage of the
// Use a scheme/path that xdg-open / open won't actually handle to // command-shape branches is good enough via `fire` + the platform-
// get a non-zero exit. Either an error or false is acceptable. // dispatch (left to integration tests where a real OS dispatcher
final ok = await bridge.openURL('clide://does-not-exist'); // is wanted).
expect(ok, anyOf(isFalse, isTrue));
});
test('reveal returns false for an unsupported / non-existent path', () async {
final bridge = OsBridge(
log: Logger(minLevel: LogLevel.error),
events: DaemonBus(),
);
final ok = await bridge.reveal('/tmp/clide-no-such-file-${DateTime.now().microsecondsSinceEpoch}');
expect(ok, anyOf(isFalse, isTrue));
});
test('fire emits an OsLifecycleEvent on the bus', () async { test('fire emits an OsLifecycleEvent on the bus', () async {
final bus = DaemonBus(); final bus = DaemonBus();