Added chatterbox connections

This commit is contained in:
Jeff Luke committed 2026-10-18 10:54:38 -07:00
1 parent 41ef12f954
commit e58ceeb192
58 files changed
+8931 -8

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:glitch_gm_lab/main.dart';
import 'package:http/http.dart' as http;
import 'package:http/testing.dart';
void main() {
testWidgets('commands remain disabled without cabinet state', (tester) async {
final client = MockClient((_) async => http.Response('{}', 503));
await tester.pumpWidget(MaterialApp(home: CabinetPage(client: client)));
await tester.pump();
expect(find.text('INTEGRATION LAB - SIMULATED CABINET'), findsOneWidget);
expect(find.text('Power on'), findsOneWidget);
for (final button in tester.widgetList<FilledButton>(find.byType(FilledButton))) {
expect(button.onPressed, isNull);
}
expect(find.textContaining('Disconnected'), findsOneWidget);
await tester.pumpWidget(const SizedBox());
});
}