import 'package:flutter_test/flutter_test.dart'; import 'run_detail_graph_support.dart'; void main() { for (final platform in RunDetailTestPlatform.values) { testWidgets( '${platform.name} recorded run warnings are visible and selectable', (tester) async { final run = graphRunFixture() ..['warnings'] = [ 'build visit 1: final result required one repair follow-up.', '', {'not': 'a warning'}, ]; await pumpRunDetail(tester, platform, run: run); expect(find.text('Warnings'), findsOneWidget); expect( find.text( 'build visit 1: final result required one repair follow-up.', ), findsOneWidget, ); expect(find.textContaining('not: a warning'), findsNothing); expect(tester.takeException(), isNull); }, ); testWidgets( '${platform.name} an unwarned run has no empty warnings section', (tester) async { await pumpRunDetail(tester, platform, run: graphRunFixture()); expect(find.text('Warnings'), findsNothing); }, ); } }