Files
clide/test/goldens/clide_tab_bar_goldens_test.dart
T
jpmschweitzerandClaude Opus 4.6 46329700d5 dissolve app/ into repo root (D-056)
Single Flutter package at the repo root. All code, tests, assets,
and platform directories moved from app/ to root. Package renamed
from clide_app to clide — all imports rewritten. Merged pubspec
combines core (ffi) and app (flutter, yaml, xterm) dependencies.
Makefile simplified: no APP_PRESENT conditionals, no cd, no daemon
lifecycle. 317 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 00:37:20 +02:00

61 lines
1.6 KiB
Dart

import 'package:alchemist/alchemist.dart';
import 'package:clide/widgets/widgets.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import '../helpers/kernel_fixture.dart';
import '../helpers/widget_harness.dart';
void main() {
late KernelFixture f;
setUp(() async => f = await KernelFixture.create());
tearDown(() async => f.dispose());
goldenTest(
'ClideTabBar active / inactive',
fileName: 'clide_tab_bar',
builder: () => GoldenTestGroup(
columns: 1,
children: [
GoldenTestScenario(
name: 'first tab active',
child: SizedBox(
width: 320,
child: harness(
f,
ClideTabBar(
items: const [
ClideTabItem(id: 'files', title: 'Files'),
ClideTabItem(id: 'git', title: 'Git'),
ClideTabItem(id: 'tree', title: 'Tree'),
],
activeId: 'files',
onSelect: (_) {},
),
),
),
),
GoldenTestScenario(
name: 'middle tab active',
child: SizedBox(
width: 320,
child: harness(
f,
ClideTabBar(
items: const [
ClideTabItem(id: 'files', title: 'Files'),
ClideTabItem(id: 'git', title: 'Git'),
ClideTabItem(id: 'tree', title: 'Tree'),
],
activeId: 'git',
onSelect: (_) {},
),
),
),
),
],
),
);
}