|
@@ -1,3 +1,6 @@
|
|
|
|
|
+import 'dart:io';
|
|
|
|
|
+
|
|
|
|
|
+import 'package:flutter/foundation.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
import 'package:xterm/xterm.dart';
|
|
import 'package:xterm/xterm.dart';
|
|
@@ -5,20 +8,24 @@ import 'package:xterm/xterm.dart';
|
|
|
import '../_fixture/_fixture.dart';
|
|
import '../_fixture/_fixture.dart';
|
|
|
|
|
|
|
|
void main() {
|
|
void main() {
|
|
|
- testWidgets('Golden test', (WidgetTester tester) async {
|
|
|
|
|
- final terminal = Terminal();
|
|
|
|
|
- await tester.pumpWidget(MaterialApp(
|
|
|
|
|
- home: Scaffold(
|
|
|
|
|
- body: TerminalView(terminal),
|
|
|
|
|
- ),
|
|
|
|
|
- ));
|
|
|
|
|
|
|
+ testWidgets(
|
|
|
|
|
+ 'Golden test',
|
|
|
|
|
+ (WidgetTester tester) async {
|
|
|
|
|
+ final terminal = Terminal();
|
|
|
|
|
+ await tester.pumpWidget(MaterialApp(
|
|
|
|
|
+ home: Scaffold(
|
|
|
|
|
+ body: TerminalView(terminal),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ));
|
|
|
|
|
|
|
|
- terminal.write(TestFixtures.htop_80x25_3s());
|
|
|
|
|
- await tester.pump();
|
|
|
|
|
|
|
+ terminal.write(TestFixtures.htop_80x25_3s());
|
|
|
|
|
+ await tester.pump();
|
|
|
|
|
|
|
|
- await expectLater(
|
|
|
|
|
- find.byType(TerminalView),
|
|
|
|
|
- matchesGoldenFile('_goldens/htop_80x25_3s.png'),
|
|
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ await expectLater(
|
|
|
|
|
+ find.byType(TerminalView),
|
|
|
|
|
+ matchesGoldenFile('_goldens/htop_80x25_3s.png'),
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ skip: !Platform.isMacOS,
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|