Unverified Commit 7678c2a5 authored by liyuqian's avatar liyuqian Committed by GitHub

Add golden test for text shade overflow (#18816)

Goldens for flutter/flutter#18729
parent 35e8cd83
e4920845c80ca52c8891c023f137f1c9a651523e
c0e7174ec1fad55e920b9dfd8b79291e093a9f2d
......@@ -5,6 +5,7 @@
import 'dart:io' show Platform;
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
......@@ -139,4 +140,41 @@ void main() {
skip: true, // !Platform.isLinux,
);
});
testWidgets('Text Fade', (WidgetTester tester) async {
await tester.pumpWidget(
new MaterialApp(
home: new Scaffold(
backgroundColor: Colors.transparent,
body: new RepaintBoundary(
child: Center(
child: new Container(
width: 200.0,
height: 200.0,
color: Colors.green,
child: new Center(
child: new Container(
width: 100.0,
color: Colors.blue,
child: const Text(
'Pp PPp PPPp PPPPp PPPPpp PPPPppp PPPPppppp ',
style: const TextStyle(color: Colors.black),
maxLines: 3,
overflow: TextOverflow.fade,
),
),
),
),
),
),
)
)
);
await expectLater(
find.byType(RepaintBoundary).first,
matchesGoldenFile('text_golden.Fade.1.png'),
skip: !Platform.isLinux,
);
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment