iop와 nomadcode가 같은 workspace에서 제품별 Flutter 콘솔을 위젯으로 삽입할 수 있어야 하므로 OTO client를 얇은 host 앱으로 정리하고 agent-shell 기반 embeddable console 패키지를 분리한다.
41 lines
1.2 KiB
Dart
41 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:oto_console/oto_console.dart';
|
|
|
|
void main() {
|
|
testWidgets('renders embeddable OTO console shell', (tester) async {
|
|
const config = OtoConsoleConfig(
|
|
serverHttpUrl: 'http://localhost:8080',
|
|
serverWireUrl: 'ws://localhost:18080/runner',
|
|
);
|
|
|
|
await tester.pumpWidget(
|
|
const MaterialApp(
|
|
home: OtoConsoleShell(
|
|
config: config,
|
|
capabilities: OtoCapabilityPack(
|
|
capabilities: [
|
|
OtoCapability(
|
|
name: 'Remote Run',
|
|
description: 'Dispatch remote build runs.',
|
|
),
|
|
],
|
|
),
|
|
overview: OtoConsoleOverview(
|
|
config: config,
|
|
statusText: 'Disconnected',
|
|
),
|
|
),
|
|
),
|
|
);
|
|
|
|
expect(find.text('Build Operations Overview'), findsOneWidget);
|
|
expect(find.byTooltip('Agent'), findsOneWidget);
|
|
|
|
await tester.tap(find.byTooltip('Agent'));
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.textContaining('OTO agent surface is ready'), findsOneWidget);
|
|
expect(find.textContaining('Remote Run'), findsOneWidget);
|
|
});
|
|
}
|