From 683c90d0af2c03442ffc6e257fdfeb7639f3c4e0 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Mon, 18 May 2026 09:47:37 +0200 Subject: [PATCH] cover vertical-axis + custom-slot branches in drag_resize_test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two more structural assertions to claw back the coverage gap the keyboard-wiring lines opened up — the vertical-axis shortcut map and the slot-name fallback label branch were both uncovered. Co-Authored-By: Claude --- test/kernel/src/panels/drag_resize_test.dart | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/kernel/src/panels/drag_resize_test.dart b/test/kernel/src/panels/drag_resize_test.dart index b0d1be3f..a720de06 100644 --- a/test/kernel/src/panels/drag_resize_test.dart +++ b/test/kernel/src/panels/drag_resize_test.dart @@ -160,6 +160,38 @@ void main() { expect(bumpedSlotSize(slot: Slots.contextPanel, current: 200, rawDelta: -10), 210); }); + testWidgets('vertical-axis handle uses arrow up/down shortcuts and "height" label', (tester) async { + final arr = LayoutArrangement(); + arr.applyPreset(const LayoutPresetContribution( + id: 'test-preset', + displayName: 'Test', + slots: [ + LayoutSlot(slot: Slots.workspace, position: SlotPosition.center, defaultSize: 300), + ], + )); + final semHandle = tester.ensureSemantics(); + await tester.pumpWidget(harness( + f, + Center( + child: SizedBox( + width: 200, + height: 40, + child: DragResizeHandle( + arrangement: arr, + slot: Slots.workspace, + axis: Axis.vertical, + ), + ), + ), + )); + await tester.pumpAndSettle(); + final data = tester.getSemantics(find.byType(DragResizeHandle)); + // Custom (non-sidebar, non-contextPanel) slots fall through to + // the slot.value-based label branch. + expect(data.label, 'workspace height'); + semHandle.dispose(); + }); + testWidgets('hovered state flips the line colour without throwing', (tester) async { final arr = LayoutArrangement(); arr.applyPreset(const LayoutPresetContribution(