Эх сурвалжийг харах

Skip golden test on linux

xuty 3 жил өмнө
parent
commit
b647f9a1c6

+ 21 - 14
test/src/terminal_view_test.dart

@@ -1,3 +1,6 @@
+import 'dart:io';
+
+import 'package:flutter/foundation.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_test/flutter_test.dart';
 import 'package:xterm/xterm.dart';
@@ -5,20 +8,24 @@ import 'package:xterm/xterm.dart';
 import '../_fixture/_fixture.dart';
 
 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,
+  );
 }