sdf
This commit is contained in:
1 parent
4d377c1336
commit
02ab7f390d
3 files changed
+84
-31
No files matched your search
@@ -1,15 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mobile_app/app.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('App smoke test - renders match results, navigates to settings',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('App smoke test - renders match results, navigates to settings', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.pumpWidget(const MobileApp());
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Match Results'), findsOneWidget);
|
||||
expect(find.text('Home'), findsWidgets);
|
||||
expect(find.text('Away'), findsWidgets);
|
||||
expect(
|
||||
find.textContaining(RegExp(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}')),
|
||||
findsWidgets,
|
||||
);
|
||||
expect(find.text('Field goal · Away · #32'), findsNothing);
|
||||
|
||||
await tester.tap(
|
||||
find.textContaining(RegExp(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}')).first,
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Field goal · Away · #32'), findsWidgets);
|
||||
expect(find.textContaining('card · Away · #5 · 120s'), findsWidgets);
|
||||
expect(find.byType(Divider), findsNothing);
|
||||
final matchTile = tester.widget<ExpansionTile>(
|
||||
find.byType(ExpansionTile).first,
|
||||
);
|
||||
expect(matchTile.shape, const Border());
|
||||
expect(matchTile.collapsedShape, const Border());
|
||||
|
||||
// Switch to Settings tab
|
||||
final settingsNav = find.text('Settings');
|
||||
|
||||
Reference in new issue
Block a user