Android e2e screenshot (#84472)

This commit is contained in:
Emmanuel Garcia
2021-07-20 13:36:04 -07:00
committed by GitHub
parent 2b7b4bdcab
commit 0504fac7e2
19 changed files with 744 additions and 73 deletions

View File

@@ -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', () {