Android e2e screenshot (#84472)
This commit is contained in:
@@ -352,7 +352,6 @@ void main() {
|
||||
});
|
||||
|
||||
group('matches', () {
|
||||
|
||||
testWidgets('if comparator succeeds', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(boilerplate(const Text('hello')));
|
||||
final Finder finder = find.byType(Text);
|
||||
@@ -361,6 +360,20 @@ void main() {
|
||||
expect(comparator.imageBytes, hasLength(greaterThan(0)));
|
||||
expect(comparator.golden, Uri.parse('foo.png'));
|
||||
});
|
||||
|
||||
testWidgets('list of integers', (WidgetTester tester) async {
|
||||
await expectLater(<int>[1, 2], matchesGoldenFile('foo.png'));
|
||||
expect(comparator.invocation, _ComparatorInvocation.compare);
|
||||
expect(comparator.imageBytes, equals(<int>[1, 2]));
|
||||
expect(comparator.golden, Uri.parse('foo.png'));
|
||||
});
|
||||
|
||||
testWidgets('future list of integers', (WidgetTester tester) async {
|
||||
await expectLater(Future<List<int>>.value(<int>[1, 2]), matchesGoldenFile('foo.png'));
|
||||
expect(comparator.invocation, _ComparatorInvocation.compare);
|
||||
expect(comparator.imageBytes, equals(<int>[1, 2]));
|
||||
expect(comparator.golden, Uri.parse('foo.png'));
|
||||
});
|
||||
});
|
||||
|
||||
group('does not match', () {
|
||||
|
||||
Reference in New Issue
Block a user