test / unit + widget + golden + a11y (push) Failing after 36s
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 28s
The keyboard half of panel resizing landed in T-111 (arrow-key splitters); this completes D-6 user/Claude parity with a CLI verb now that T-99's IPC dispatch path exists. `clide panel resize <slot> --to N` sets an absolute pixel size, `--by N` nudges relative to current, and the reserved `editor` slot drives the editor/bottom-panel split ratio. The handler lives in panel_commands.dart and stays Flutter-free (so test/daemon/ keeps running under `dart test`) by talking to an abstract PanelResizer; the kernel bridge in panel_resizer_kernel.dart wraps LayoutArrangement and reuses T-111's bumpedSlotSize so the CLI's relative deltas honour the same right-edge sign-flip as the drag/arrow handlers. Arguments are lifted from both the direct call shape and the argv-translator's positional/flags shape pending the typed schema in T-120. The daemonClientFactory now receives the LayoutArrangement so the dispatcher can reach it. Co-Authored-By: Claude <noreply@anthropic.com>
73 lines
2.6 KiB
Dart
73 lines
2.6 KiB
Dart
import 'dart:io';
|
|
import 'dart:ui';
|
|
|
|
import 'package:clide/app.dart';
|
|
import 'package:clide/builtin/default_layout/default_layout.dart';
|
|
import 'package:clide/builtin/ipc_status/ipc_status.dart';
|
|
import 'package:clide/builtin/welcome/welcome.dart';
|
|
import 'package:clide/kernel/kernel.dart';
|
|
import 'package:flutter/services.dart' show rootBundle;
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:integration_test/integration_test.dart';
|
|
|
|
import '../test/helpers/fake_ipc.dart';
|
|
|
|
void main() {
|
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
testWidgets('disable + re-enable an extension mounts/unmounts its UI', (tester) async {
|
|
// Welcome view overflows the default headless viewport — give it a
|
|
// desktop-sized window so layout is representative.
|
|
tester.view.physicalSize = const Size(1600, 1000);
|
|
tester.view.devicePixelRatio = 1.0;
|
|
addTearDown(() {
|
|
tester.view.resetPhysicalSize();
|
|
tester.view.resetDevicePixelRatio();
|
|
});
|
|
|
|
final themes = [
|
|
await const ThemeLoader().fromAsset(
|
|
rootBundle,
|
|
'lib/kernel/src/theme/themes/summer-night.yaml',
|
|
),
|
|
];
|
|
final services = await KernelServices.boot(
|
|
appDir: await Directory.systemTemp.createTemp('clide_lc_'),
|
|
bundledThemes: themes,
|
|
i18nLoader: AssetCatalogLoader(bundle: rootBundle),
|
|
preloadNamespaces: const [
|
|
'builtin.welcome',
|
|
'builtin.ipc-status',
|
|
'builtin.default-layout',
|
|
],
|
|
daemonClientFactory: (log, events, _) => FakeDaemonClient(log: log, events: events),
|
|
autoStartDaemonClient: false,
|
|
);
|
|
services.extensions
|
|
..register(DefaultLayoutExtension())
|
|
..register(WelcomeExtension())
|
|
..register(IpcStatusExtension());
|
|
await services.extensions.activateAll();
|
|
|
|
await tester.pumpWidget(ClideApp(services: services));
|
|
await tester.pumpAndSettle();
|
|
// The ipc-status extension contributes a ToolStatusItem to the
|
|
// statusbar; we assert its presence by widget type so the test
|
|
// doesn't depend on whichever status string (`application ok` /
|
|
// `checking…` / `<tool> not found`) the toolchain happens to be in.
|
|
expect(find.byType(ToolStatusItem), findsOneWidget);
|
|
|
|
// Disable ipc-status; status item should disappear.
|
|
await services.extensions.setEnabled('builtin.ipc-status', false);
|
|
await tester.pumpAndSettle();
|
|
expect(find.byType(ToolStatusItem), findsNothing);
|
|
|
|
// Re-enable; status item reappears.
|
|
await services.extensions.setEnabled('builtin.ipc-status', true);
|
|
await tester.pumpAndSettle();
|
|
expect(find.byType(ToolStatusItem), findsOneWidget);
|
|
|
|
await services.dispose();
|
|
});
|
|
}
|