remove the dead ColumnHat widget; keep hatHeight (T-385)
ColumnHat was superseded by the hat bar in app.dart and survived only through a zero-coverage smoke test. Its file also carried the live hatHeight constant (D-57's 24px hats) consumed by the hat bar and the menu bar — that moves to widgets/src/chrome_metrics.dart. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
/// Smoke + branch tests for the previously-uncovered widgets under
|
||||
/// `lib/widgets/src/`: ClidePalette, ClideFilterBox, ColumnHat,
|
||||
/// `lib/widgets/src/`: ClidePalette, ClideFilterBox,
|
||||
/// ClideIconRail, ClideSpine, ClideResizeBorder.
|
||||
library;
|
||||
|
||||
import 'package:clide/clide.dart';
|
||||
import 'package:clide/extension/extension.dart';
|
||||
import 'package:clide/widgets/src/clide_column_hat.dart';
|
||||
import 'package:clide/widgets/src/clide_filter_box.dart';
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:clide/widgets/src/clide_icon_rail.dart';
|
||||
@@ -311,41 +310,6 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
group('ColumnHat', () {
|
||||
late KernelFixture f;
|
||||
setUp(() async => f = await KernelFixture.create());
|
||||
tearDown(() async => f.dispose());
|
||||
|
||||
testWidgets('left / center / right factories render', (tester) async {
|
||||
final wc = WindowControls();
|
||||
addTearDown(wc.dispose);
|
||||
await tester.pumpWidget(
|
||||
harness(
|
||||
f,
|
||||
Column(
|
||||
children: [
|
||||
SizedBox(width: 200, child: ColumnHat.left(windowControls: wc)),
|
||||
SizedBox(
|
||||
width: 200,
|
||||
child: ColumnHat.center(windowControls: wc, project: 'clide', branch: 'main'),
|
||||
),
|
||||
SizedBox(width: 200, child: ColumnHat.right(windowControls: wc)),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
// Center hat renders the joined label.
|
||||
expect(find.text('clide > main'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('center hat falls back to "clide" with no project/branch', (tester) async {
|
||||
final wc = WindowControls();
|
||||
addTearDown(wc.dispose);
|
||||
await tester.pumpWidget(harness(f, SizedBox(width: 200, child: ColumnHat.center(windowControls: wc))));
|
||||
expect(find.text('clide'), findsOneWidget);
|
||||
});
|
||||
});
|
||||
|
||||
group('ClideIconRail', () {
|
||||
late KernelFixture f;
|
||||
setUp(() async => f = await KernelFixture.create());
|
||||
|
||||
Reference in New Issue
Block a user